# AgentRunDocument

> 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.agentrundocument/
> Summary: AgentRunDocument: A piece of reference text attached to a single run, kept apart from the model's instructions.

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

A piece of reference text attached to a single run, kept apart from the
model's instructions.

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

**This is a convention and an audit trail, not a security
guarantee.** No provider gives a hard guarantee that text wrapped
this way is never treated as an instruction; a capable-enough model can
still be steered by content inside a document. The value is in keeping the
data channel visibly separate in the transcript and the run record, and in
the boundary marker surviving content that tries to imitate it.

A document is carried as its own `ChatMessage`, wrapped in a
delimiter, and marked through `AIContent.AdditionalProperties` so the
recording path can tell it apart from the instructions text. The run
record keeps only the document's name and size — never its content.

## Constructors

### <a id="Tracon_AgentRunDocument__ctor"></a> AgentRunDocument\(\)

```csharp
public AgentRunDocument()
```

## Properties

### <a id="Tracon_AgentRunDocument_Content"></a> Content

Gets the document's text. Never treated as instructions.

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

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

Gets the document's name, shown to the model inside the delimiter.

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

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

### <a id="Tracon_AgentRunDocument_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_AgentRunDocument_Equals_Tracon_AgentRunDocument_"></a> Equals\(AgentRunDocument?\)

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

`other` [AgentRunDocument](/api/tracon.agentrundocument/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_AgentRunDocument_op_Equality_Tracon_AgentRunDocument_Tracon_AgentRunDocument_"></a> operator ==\(AgentRunDocument?, AgentRunDocument?\)

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

`left` [AgentRunDocument](/api/tracon.agentrundocument/)?

`right` [AgentRunDocument](/api/tracon.agentrundocument/)?

#### Returns

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

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

`left` [AgentRunDocument](/api/tracon.agentrundocument/)?

`right` [AgentRunDocument](/api/tracon.agentrundocument/)?

#### Returns

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