# AgentParameter

> 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.agentparameter/
> Summary: AgentParameter: A single named placeholder an AgentDefinition's instructions can reference as {{name}}.

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

A single named placeholder an [AgentDefinition](/api/tracon.agentdefinition/)'s instructions can
reference as `{{name}}`.

```csharp
public sealed record AgentParameter : IEquatable<AgentParameter>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.agentparameter/">AgentParameter</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;AgentParameter&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

The definition's compiler validates every definition's schema at compile
time: every `{{name}}` that appears in the instructions text must be
declared here, every declared name must be a valid identifier, and no name
may repeat. Every culture variant in
[AgentDefinition.InstructionsByCulture](/api/tracon.agentdefinition/#Tracon_AgentDefinition_InstructionsByCulture) is checked against this
same schema — a variant that references an undeclared name fails compilation
even if another variant does not use it.

A schema entry that never appears in the instructions text is not an error;
the reverse direction (used but undeclared) is what compilation rejects.

## Constructors

### <a id="Tracon_AgentParameter__ctor"></a> AgentParameter\(\)

```csharp
public AgentParameter()
```

## Properties

### <a id="Tracon_AgentParameter_DefaultValue"></a> DefaultValue

Gets the value used when a run does not supply this parameter. Applies
whether or not `Required` is set.

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

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

Gets a short description shown to the person authoring a run.

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

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

Gets the parameter's data kind.

```csharp
public required AgentParameterKind Kind { get; init; }
```

#### Property Value

 [AgentParameterKind](/api/tracon.agentparameterkind/)

### <a id="Tracon_AgentParameter_Name"></a> Name

Gets the parameter name, as referenced by `{{name}}` in the instructions text.

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

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

Gets whether a run must supply this parameter. A run missing a required
parameter with no `DefaultValue` does not start.

```csharp
public bool Required { get; init; }
```

#### Property Value

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

### <a id="Tracon_AgentParameter_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_AgentParameter_Equals_Tracon_AgentParameter_"></a> Equals\(AgentParameter?\)

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

`other` [AgentParameter](/api/tracon.agentparameter/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_AgentParameter_op_Equality_Tracon_AgentParameter_Tracon_AgentParameter_"></a> operator ==\(AgentParameter?, AgentParameter?\)

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

`left` [AgentParameter](/api/tracon.agentparameter/)?

`right` [AgentParameter](/api/tracon.agentparameter/)?

#### Returns

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

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

`left` [AgentParameter](/api/tracon.agentparameter/)?

`right` [AgentParameter](/api/tracon.agentparameter/)?

#### Returns

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