# WorkspaceSettings

> 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.workspacesettings/
> Summary: WorkspaceSettings: Settings for the session workspace of an agent: a file area that belongs to one conversation, where the agent lists, reads, searches, writes, edits and deletes.

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

Settings for the session workspace of an agent: a file area that belongs to one
conversation, where the agent lists, reads, searches, writes, edits and deletes files.

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

## Examples

```csharp
var definition = new AgentDefinition
{
    Name = "drafter",
    Model = new ModelBinding { Provider = "openai", Model = "gpt-5.4-mini" },
    Workspace = new WorkspaceSettings { Enabled = true },
};
```

## Remarks

The workspace is private to one session of one agent. Another session does not see its
files, and it is not the agent's file memory (`MemorySettings.EnableFileMemory`): file
memory lives as long as the agent, a workspace lives as long as its session. When the session
goes, whichever way (`DELETE /api/sessions/{id}`, an erasure of its data subject, or its
retention period), its files go with it. A run that has no session has no workspace and gets no
file tools.

Microsoft Agent Framework supplies the eight `file_access_*` tools. Tracon runs them
through the same tool chain as a tool registered in code: the authorization handler, argument
validation, the timeout, and the approval step. Every tool that changes a file asks for
approval, always; there is deliberately no member that turns that off. The size of a file, of
one session's workspace and of one tenant's workspaces is limited by `Tracon:Workspace`
(`TraconWorkspaceOptions`).

An agent that is exposed over A2A or MCP has nobody to answer an approval request. The host
refuses to expose a workspace that can change a file or that asks for approval to read
one: set [WorkspaceSettings.ReadOnly](/api/tracon.workspacesettings/#Tracon_WorkspaceSettings_ReadOnly) and [WorkspaceSettings.DisableReadApproval](/api/tracon.workspacesettings/#Tracon_WorkspaceSettings_DisableReadApproval) together, or leave the
agent off the allow list.

## Constructors

### <a id="Tracon_WorkspaceSettings__ctor"></a> WorkspaceSettings\(\)

```csharp
public WorkspaceSettings()
```

## Properties

### <a id="Tracon_WorkspaceSettings_DisableReadApproval"></a> DisableReadApproval

Gets a value that makes the tools that read run without asking for approval. The tools
that change a file keep their approval.

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

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

What the agent wrote earlier in the session reaches the model again when it reads. Turn
this on when nobody should be asked about a read; the content is then a prompt-injection
surface that no person reviews at run time.

### <a id="Tracon_WorkspaceSettings_Enabled"></a> Enabled

Gets a value that gives the agent a workspace in every session that has a record.
Defaults to [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

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

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

Gets a value that offers only the tools that read: `file_access_read`,
`file_access_read_lines`, `file_access_ls` and `file_access_grep`.
The tools that write, replace and delete are not offered at all.

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

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

### <a id="Tracon_WorkspaceSettings_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_WorkspaceSettings_Equals_Tracon_WorkspaceSettings_"></a> Equals\(WorkspaceSettings?\)

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

`other` [WorkspaceSettings](/api/tracon.workspacesettings/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_WorkspaceSettings_op_Equality_Tracon_WorkspaceSettings_Tracon_WorkspaceSettings_"></a> operator ==\(WorkspaceSettings?, WorkspaceSettings?\)

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

`left` [WorkspaceSettings](/api/tracon.workspacesettings/)?

`right` [WorkspaceSettings](/api/tracon.workspacesettings/)?

#### Returns

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

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

`left` [WorkspaceSettings](/api/tracon.workspacesettings/)?

`right` [WorkspaceSettings](/api/tracon.workspacesettings/)?

#### Returns

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