# IVersionedAgentSource

> 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.iversionedagentsource/
> Summary: IVersionedAgentSource: An IAgentSource that can resolve a specific definition version. Only sources that keep a version history implement it. A source without version history need not.

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

An [IAgentSource](/api/tracon.iagentsource/) that can resolve a specific definition version. Only
sources that keep a version history implement it. A source without version history
need not implement this interface.

```csharp
public interface IVersionedAgentSource : IAgentSource
```

<dl class="api-relations"><dt>Implements</dt><dd><a href="/api/tracon.iagentsource/">IAgentSource</a></dd></dl>

## Methods

### <a id="Tracon_IVersionedAgentSource_ResolveVersionAsync_System_String_System_Int32_System_String_System_Threading_CancellationToken_"></a> ResolveVersionAsync\(string, int, string?, CancellationToken\)

Resolves an agent by name and by a specific version.

```csharp
ValueTask<AIAgent?> ResolveVersionAsync(string agentName, int version, string? culture = null, CancellationToken cancellationToken = default)
```

#### Parameters

`agentName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The agent name.

`version` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The requested definition version.

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)?

The requested culture, resolved against the definition's culture-keyed instructions
(see `AgentDefinition.InstructionsByCulture`). [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) uses the
definition's default instructions.

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

The cancellation token.

#### Returns

 [ValueTask](https://learn.microsoft.com/dotnet/api/system.threading.tasks.valuetask\-1)<AIAgent?\>

The agent, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when this source does not hold it or that version does not exist.
