# AgentSourcePriority

> 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.agentsourcepriority/
> Summary: AgentSourcePriority: The priority values Tracon's own built-in agent sources use.

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

The priority values Tracon's own built-in agent sources use.

```csharp
public static class AgentSourcePriority
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.agentsourcepriority/">AgentSourcePriority</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.memberwiseclone">object.MemberwiseClone()</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

Nothing enforces these values against a custom [IAgentSource](/api/tracon.iagentsource/): a
third-party source may use any [Int32](https://learn.microsoft.com/dotnet/api/system.int32), including [AgentSourcePriority.Code](/api/tracon.agentsourcepriority/#Tracon_AgentSourcePriority_Code) or
[AgentSourcePriority.Database](/api/tracon.agentsourcepriority/#Tracon_AgentSourcePriority_Database) themselves. A source that shares a built-in value ties with
it, and DI registration order breaks the tie (see [IAgentSource.Priority](/api/tracon.iagentsource/#Tracon_IAgentSource_Priority)).
A custom source usually picks a value between [AgentSourcePriority.Code](/api/tracon.agentsourcepriority/#Tracon_AgentSourcePriority_Code) and
[AgentSourcePriority.Database](/api/tracon.agentsourcepriority/#Tracon_AgentSourcePriority_Database) to run after code but before the database, or a value above
[AgentSourcePriority.Database](/api/tracon.agentsourcepriority/#Tracon_AgentSourcePriority_Database) to run last.

## Fields

### <a id="Tracon_AgentSourcePriority_Code"></a> Code

Priority of the code-defined agent source.

```csharp
public const int Code = 0
```

#### Field Value

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

Priority of the database-backed agent source.

```csharp
public const int Database = 100
```

#### Field Value

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