# AgentDefinitionRequest

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.agentdefinitionrequest/
> Summary: AgentDefinitionRequest: Request to create or update an agent definition.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.AspNetCore.dll</code></div>

Request to create or update an agent definition.

```csharp
public sealed record AgentDefinitionRequest : IEquatable<AgentDefinitionRequest>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.agentdefinitionrequest/">AgentDefinitionRequest</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;AgentDefinitionRequest&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Does not bind directly to [AgentDefinition](/api/tracon.agentdefinition/). The definition's
`Origin`, `Version`, `TenantId`, and `UpdatedAt` fields
belong to the server; letting the client set these would break version
history and tenant isolation.

## Constructors

### <a id="Tracon_AgentDefinitionRequest__ctor"></a> AgentDefinitionRequest\(\)

```csharp
public AgentDefinitionRequest()
```

## Properties

### <a id="Tracon_AgentDefinitionRequest_CallableAgents"></a> CallableAgents

The other agents this agent may call, each with the version of it that runs.

```csharp
public IReadOnlyList<CallableAgentReference> CallableAgents { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[CallableAgentReference](/api/tracon.callableagentreference/)\>

#### Remarks

Checked at the moment the call graph is saved: an unknown name,
self-calling, and indirect cycles are rejected with `400 Bad Request`. So is a
`version` below 1, one the agent does not have, one on an agent defined in code,
and a name that appears twice. Leave `version` out to run the agent's current version.

### <a id="Tracon_AgentDefinitionRequest_Compaction"></a> Compaction

Context compaction settings. If left empty, no compaction is applied.

```csharp
public CompactionSettings? Compaction { get; init; }
```

#### Property Value

 [CompactionSettings](/api/tracon.compactionsettings/)?

### <a id="Tracon_AgentDefinitionRequest_Description"></a> Description

Short description.

```csharp
public string? Description { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AgentDefinitionRequest_DisplayName"></a> DisplayName

Name shown in the UI.

```csharp
public string? DisplayName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AgentDefinitionRequest_ExtensionNames"></a> ExtensionNames

Names of agent extensions to compile the agent with, in call order. Extensions
are defined only in code; only the name of an already registered extension may
be given here. See `AgentDefinition.ExtensionNames`.

```csharp
public IReadOnlyList<string> ExtensionNames { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_AgentDefinitionRequest_Harness"></a> Harness

Harness settings. If left empty, a plain chat agent is compiled.

```csharp
public HarnessSettings? Harness { get; init; }
```

#### Property Value

 [HarnessSettings](/api/tracon.harnesssettings/)?

### <a id="Tracon_AgentDefinitionRequest_Instructions"></a> Instructions

System instructions.

```csharp
public string? Instructions { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AgentDefinitionRequest_InstructionsByCulture"></a> InstructionsByCulture

Culture-keyed instructions. See [AgentDefinition.InstructionsByCulture](/api/tracon.agentdefinition/#Tracon_AgentDefinition_InstructionsByCulture).

```csharp
public IReadOnlyDictionary<string, string>? InstructionsByCulture { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

### <a id="Tracon_AgentDefinitionRequest_McpResourceUris"></a> McpResourceUris

MCP resources added to the run context, each of the form
`"{server}:{uri}"`. See `AgentDefinition.McpResourceUris`.

```csharp
public IReadOnlyList<string> McpResourceUris { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_AgentDefinitionRequest_Memory"></a> Memory

Memory provider settings. If left empty, no memory provider is added.

```csharp
public MemorySettings? Memory { get; init; }
```

#### Property Value

 [MemorySettings](/api/tracon.memorysettings/)?

### <a id="Tracon_AgentDefinitionRequest_Metadata"></a> Metadata

Free-form, application-specific metadata. See `AgentDefinition.Metadata`.

```csharp
public IReadOnlyDictionary<string, JsonElement> Metadata { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)\>

#### Remarks

Owned by the application, not the server: unlike `Origin`, `Version`,
`TenantId` and `UpdatedAt`, this travels on the request so that an
update does not erase it. Tracon itself never reads these keys.

### <a id="Tracon_AgentDefinitionRequest_Model"></a> Model

Model binding: provider, model, and sampling settings.

```csharp
public required ModelBinding Model { get; init; }
```

#### Property Value

 [ModelBinding](/api/tracon.modelbinding/)

### <a id="Tracon_AgentDefinitionRequest_Name"></a> Name

Agent name. Unique within the catalog.

```csharp
public required string Name { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_AgentDefinitionRequest_Parameters"></a> Parameters

The parameter schema. See [AgentDefinition.Parameters](/api/tracon.agentdefinition/#Tracon_AgentDefinition_Parameters).

```csharp
public IReadOnlyList<AgentParameter> Parameters { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[AgentParameter](/api/tracon.agentparameter/)\>

### <a id="Tracon_AgentDefinitionRequest_SharedInstructionsName"></a> SharedInstructionsName

The referenced shared instructions block. See `AgentDefinition.SharedInstructionsName`.

```csharp
public string? SharedInstructionsName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AgentDefinitionRequest_SkillNames"></a> SkillNames

Names of skills that can be loaded at runtime.

```csharp
public IReadOnlyList<string> SkillNames { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_AgentDefinitionRequest_Skills"></a> Skills

How the agent uses its skills. See `AgentDefinition.Skills`. If left empty, all
three skill tools ask for approval.

```csharp
public SkillSettings? Skills { get; init; }
```

#### Property Value

 [SkillSettings](/api/tracon.skillsettings/)?

### <a id="Tracon_AgentDefinitionRequest_SubAgents"></a> SubAgents

How long this agent waits for the agents it calls. See
`AgentDefinition.SubAgents`. Ignored when
`CallableAgents` is empty.

```csharp
public SubAgentSettings? SubAgents { get; init; }
```

#### Property Value

 [SubAgentSettings](/api/tracon.subagentsettings/)?

### <a id="Tracon_AgentDefinitionRequest_ToolNames"></a> ToolNames

Names of tools to use. Tools are defined only in code; only the name of
an already registered tool may be given here.

```csharp
public IReadOnlyList<string> ToolNames { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_AgentDefinitionRequest_Workspace"></a> Workspace

The session workspace of the agent: a file area that belongs to one conversation. See
`AgentDefinition.Workspace`. If left empty, the agent has no workspace.

```csharp
public WorkspaceSettings? Workspace { get; init; }
```

#### Property Value

 [WorkspaceSettings](/api/tracon.workspacesettings/)?

## Methods

### <a id="Tracon_AgentDefinitionRequest_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_AgentDefinitionRequest_Equals_Tracon_AgentDefinitionRequest_"></a> Equals\(AgentDefinitionRequest?\)

```csharp
public bool Equals(AgentDefinitionRequest? other)
```

#### Parameters

`other` [AgentDefinitionRequest](/api/tracon.agentdefinitionrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_AgentDefinitionRequest_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_AgentDefinitionRequest_ToDefinition"></a> ToDefinition\(\)

Converts the request into a persistable definition.

```csharp
public AgentDefinition ToDefinition()
```

#### Returns

 [AgentDefinition](/api/tracon.agentdefinition/)

A definition ready to be written to the database.

### <a id="Tracon_AgentDefinitionRequest_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_AgentDefinitionRequest_op_Equality_Tracon_AgentDefinitionRequest_Tracon_AgentDefinitionRequest_"></a> operator ==\(AgentDefinitionRequest?, AgentDefinitionRequest?\)

```csharp
public static bool operator ==(AgentDefinitionRequest? left, AgentDefinitionRequest? right)
```

#### Parameters

`left` [AgentDefinitionRequest](/api/tracon.agentdefinitionrequest/)?

`right` [AgentDefinitionRequest](/api/tracon.agentdefinitionrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_AgentDefinitionRequest_op_Inequality_Tracon_AgentDefinitionRequest_Tracon_AgentDefinitionRequest_"></a> operator \!=\(AgentDefinitionRequest?, AgentDefinitionRequest?\)

```csharp
public static bool operator !=(AgentDefinitionRequest? left, AgentDefinitionRequest? right)
```

#### Parameters

`left` [AgentDefinitionRequest](/api/tracon.agentdefinitionrequest/)?

`right` [AgentDefinitionRequest](/api/tracon.agentdefinitionrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
