# TraconRetentionOptions

> 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.traconretentionoptions/
> Summary: TraconRetentionOptions: Defines data retention and archival options.

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

Defines data retention and archival options.

```csharp
public sealed class TraconRetentionOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconretentionoptions/">TraconRetentionOptions</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

Read from the `Tracon:Retention` configuration section. This class
carries only **configuration-based defaults**; the source of
truth is the `retention_policies` database table through
[IRetentionPolicyStore](/api/tracon.iretentionpolicystore/). These settings are ignored when a
database record exists for a target.

[TraconRetentionOptions.Enabled](/api/tracon.traconretentionoptions/#Tracon_TraconRetentionOptions_Enabled) defaults to [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). A package
upgrade must not delete data before a consumer adds configuration. This flag
must explicitly be [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) before configuration defaults apply.

## Constructors

### <a id="Tracon_TraconRetentionOptions__ctor"></a> TraconRetentionOptions\(\)

```csharp
public TraconRetentionOptions()
```

## Fields

### <a id="Tracon_TraconRetentionOptions_SectionName"></a> SectionName

Gets the configuration section name.

```csharp
public const string SectionName = "Tracon:Retention"
```

#### Field Value

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

### <a id="Tracon_TraconRetentionOptions_Attachments"></a> Attachments

Gets the default for orphaned [RetentionTargets.Attachments](/api/tracon.retentiontargets/#Tracon_RetentionTargets_Attachments).

```csharp
public RetentionTargetOptions Attachments { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_BatchDelay"></a> BatchDelay

Gets or sets the delay between batches to avoid saturating production load.

```csharp
public TimeSpan BatchDelay { get; set; }
```

#### Property Value

 [TimeSpan](https://learn.microsoft.com/dotnet/api/system.timespan)

### <a id="Tracon_TraconRetentionOptions_BatchSize"></a> BatchSize

Gets or sets the maximum row count in a deletion batch.

```csharp
public int BatchSize { get; set; }
```

#### Property Value

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

Gets the default for [RetentionTargets.Conversations](/api/tracon.retentiontargets/#Tracon_RetentionTargets_Conversations). Its
[RetentionTargetOptions.MaxAgeDays](/api/tracon.retentiontargetoptions/#Tracon_RetentionTargetOptions_MaxAgeDays) defaults to [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null):
this is user data, supported but disabled.

```csharp
public RetentionTargetOptions Conversations { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_DocumentEmbeddings"></a> DocumentEmbeddings

Gets the default for [RetentionTargets.DocumentEmbeddings](/api/tracon.retentiontargets/#Tracon_RetentionTargets_DocumentEmbeddings).
[RetentionTargetOptions.MaxAgeDays](/api/tracon.retentiontargetoptions/#Tracon_RetentionTargetOptions_MaxAgeDays) defaults to [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null):
knowledge-base content is reference data uploaded by the user, not a log
or event. Automatic deletion must be explicitly enabled.

```csharp
public RetentionTargetOptions DocumentEmbeddings { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_Enabled"></a> Enabled

Gets or sets whether configuration-based defaults are enabled. When
disabled, no data is deleted even if target settings below are read; only
explicit database policies apply.

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

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

Gets the default for [RetentionTargets.EvalCaseResults](/api/tracon.retentiontargets/#Tracon_RetentionTargets_EvalCaseResults).

```csharp
public RetentionTargetOptions EvalCaseResults { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_IdempotencyKeys"></a> IdempotencyKeys

Gets the default for [RetentionTargets.IdempotencyKeys](/api/tracon.retentiontargets/#Tracon_RetentionTargets_IdempotencyKeys).
The stored response was already sent to the client, so it does not expose
new data, but its lifetime is still bounded (43.5).

```csharp
public RetentionTargetOptions IdempotencyKeys { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_Jobs"></a> Jobs

Gets the default for [RetentionTargets.Jobs](/api/tracon.retentiontargets/#Tracon_RetentionTargets_Jobs), limited to completed jobs.

```csharp
public RetentionTargetOptions Jobs { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_RunEvents"></a> RunEvents

Gets the default for [RetentionTargets.RunEvents](/api/tracon.retentiontargets/#Tracon_RetentionTargets_RunEvents).

```csharp
public RetentionTargetOptions RunEvents { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_RunInputs"></a> RunInputs

Gets the default for [RetentionTargets.RunInputs](/api/tracon.retentiontargets/#Tracon_RetentionTargets_RunInputs).
It is not user data; see the note on [RetentionTargets.RunInputs](/api/tracon.retentiontargets/#Tracon_RetentionTargets_RunInputs).
It is absent from [RetentionTargets.UserDataTargets](/api/tracon.retentiontargets/#Tracon_RetentionTargets_UserDataTargets), so the
configuration-based default applies.

```csharp
public RetentionTargetOptions RunInputs { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_RunScores"></a> RunScores

Gets the default for [RetentionTargets.RunScores](/api/tracon.retentiontargets/#Tracon_RetentionTargets_RunScores).
It has the same lifetime class as [TraconRetentionOptions.EvalCaseResults](/api/tracon.traconretentionoptions/#Tracon_TraconRetentionOptions_EvalCaseResults): evaluation history.

```csharp
public RetentionTargetOptions RunScores { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_Sessions"></a> Sessions

Gets the default for [RetentionTargets.Sessions](/api/tracon.retentiontargets/#Tracon_RetentionTargets_Sessions). Its
[RetentionTargetOptions.MaxAgeDays](/api/tracon.retentiontargetoptions/#Tracon_RetentionTargetOptions_MaxAgeDays) defaults to [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null):
this is user data, supported but disabled.

```csharp
public RetentionTargetOptions Sessions { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_SkillScriptGrants"></a> SkillScriptGrants

Gets the default for expired or revoked [RetentionTargets.SkillScriptGrants](/api/tracon.retentiontargets/#Tracon_RetentionTargets_SkillScriptGrants).

```csharp
public RetentionTargetOptions SkillScriptGrants { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_Spans"></a> Spans

Gets the default for [RetentionTargets.Traces](/api/tracon.retentiontargets/#Tracon_RetentionTargets_Traces), including traces and spans.

```csharp
public RetentionTargetOptions Spans { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_ToolInvocations"></a> ToolInvocations

Gets the default for [RetentionTargets.ToolInvocations](/api/tracon.retentiontargets/#Tracon_RetentionTargets_ToolInvocations).

```csharp
public RetentionTargetOptions ToolInvocations { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_VoiceSessions"></a> VoiceSessions

Gets the default for [RetentionTargets.VoiceSessions](/api/tracon.retentiontargets/#Tracon_RetentionTargets_VoiceSessions).
The record contains summary metrics only, not audio bytes; see the target note.

```csharp
public RetentionTargetOptions VoiceSessions { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_WebhookDeliveries"></a> WebhookDeliveries

Gets the default for [RetentionTargets.WebhookDeliveries](/api/tracon.retentiontargets/#Tracon_RetentionTargets_WebhookDeliveries), limited to delivered webhooks.

```csharp
public RetentionTargetOptions WebhookDeliveries { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_WorkflowCheckpoints"></a> WorkflowCheckpoints

Gets the default for [RetentionTargets.WorkflowCheckpoints](/api/tracon.retentiontargets/#Tracon_RetentionTargets_WorkflowCheckpoints) after a run completes.

```csharp
public RetentionTargetOptions WorkflowCheckpoints { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)

### <a id="Tracon_TraconRetentionOptions_WorkflowRequests"></a> WorkflowRequests

Gets the default for [RetentionTargets.WorkflowRequests](/api/tracon.retentiontargets/#Tracon_RetentionTargets_WorkflowRequests). A closed row names a
request that expired; it carries no prompt and no answer, so it is kept for a short while
(the run that owns it is kept by the run history, not by this target).

```csharp
public RetentionTargetOptions WorkflowRequests { get; }
```

#### Property Value

 [RetentionTargetOptions](/api/tracon.retentiontargetoptions/)
