# HarnessSettings

> 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.harnesssettings/
> Summary: HarnessSettings: Settings for the harness capabilities. It mirrors a safe subset of the HarnessAgentOptions structure of Microsoft Agent Framework.

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

Settings for the harness capabilities. It mirrors a safe subset of the
`HarnessAgentOptions` structure of Microsoft Agent Framework.

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

Shell access and background agents are *deliberately absent* from these
settings. Those two capabilities open a code execution surface on the server and
need a separate security review.

## Constructors

### <a id="Tracon_HarnessSettings__ctor"></a> HarnessSettings\(\)

```csharp
public HarnessSettings()
```

## Properties

### <a id="Tracon_HarnessSettings_DisableAgentModeProvider"></a> DisableAgentModeProvider

Gets a value that turns off the agent mode provider.

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

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

Gets a value that turns off the agent skills provider.

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

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

The provider is on only when the definition names skills
(`AgentDefinition.SkillNames`), and it offers only those skills;
it never reads skills from the server's working directory. A definition
that names skills and sets this value is refused when the agent is
compiled.

### <a id="Tracon_HarnessSettings_DisableCompaction"></a> DisableCompaction

Gets a value that turns off context compaction.

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

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

Gets a value that turns off file memory.

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

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

File memory is off unless `MemorySettings.EnableFileMemory` turns
it on; it then uses the registered `AgentFileStore`, never a
directory of the server. A definition that sets both is refused when
the agent is compiled.

### <a id="Tracon_HarnessSettings_DisableTodoProvider"></a> DisableTodoProvider

Gets a value that turns off todo tracking.

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

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

Gets a value that turns off automatic tool approval. Once turned off, every tool
call waits for an explicit approval.

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

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

Gets a value that turns off web search.

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

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

Web search is off unless [HarnessSettings.EnableWebSearch](/api/tracon.harnesssettings/#Tracon_HarnessSettings_EnableWebSearch) turns it on. A
definition that sets both is refused when the agent is compiled.

### <a id="Tracon_HarnessSettings_EnableWebSearch"></a> EnableWebSearch

Gets a value that turns on the model provider's hosted web search.

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

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

The search runs at the model provider and is billed by it. Not every
provider surface offers it: the OpenAI Chat Completions surface accepts
it only for search models and answers `400` otherwise, while the
Responses surface (`openai-responses`) offers it to every model.

### <a id="Tracon_HarnessSettings_HarnessInstructions"></a> HarnessInstructions

Gets the extra instructions passed to the harness.

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

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

Gets the loop (run-until-done) settings. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), the
default, leaves the loop off.

```csharp
public LoopSettings? Loop { get; init; }
```

#### Property Value

 [LoopSettings](/api/tracon.loopsettings/)?

#### Remarks

Not to be confused with `MaximumIterationsPerRequest`, which
bounds the harness's INNER tool-calling loop within a single invocation.
`LoopSettings` bounds the OUTER loop that re-invokes the whole
agent until a stop criterion is satisfied. See `LoopSettings`
for the comparison in full.

### <a id="Tracon_HarnessSettings_MaxContextWindowTokens"></a> MaxContextWindowTokens

Gets the token limit of the context window. Compaction starts once it is exceeded.

```csharp
public int? MaxContextWindowTokens { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)?

### <a id="Tracon_HarnessSettings_MaxOutputTokens"></a> MaxOutputTokens

Gets the upper token limit produced in a single response.

```csharp
public int? MaxOutputTokens { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)?

### <a id="Tracon_HarnessSettings_MaximumIterationsPerRequest"></a> MaximumIterationsPerRequest

Gets the upper number of iterations allowed within a single request.

```csharp
public int? MaximumIterationsPerRequest { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)?

## Methods

### <a id="Tracon_HarnessSettings_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_HarnessSettings_Equals_Tracon_HarnessSettings_"></a> Equals\(HarnessSettings?\)

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

`other` [HarnessSettings](/api/tracon.harnesssettings/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_HarnessSettings_op_Equality_Tracon_HarnessSettings_Tracon_HarnessSettings_"></a> operator ==\(HarnessSettings?, HarnessSettings?\)

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

`left` [HarnessSettings](/api/tracon.harnesssettings/)?

`right` [HarnessSettings](/api/tracon.harnesssettings/)?

#### Returns

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

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

`left` [HarnessSettings](/api/tracon.harnesssettings/)?

`right` [HarnessSettings](/api/tracon.harnesssettings/)?

#### Returns

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