Skip to content

IVersionedAgentSource

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

An IAgentSource that can resolve a specific definition version. Only sources that keep a version history implement it (the database source); the code source has no notion of a version and need not implement this interface.

public interface IVersionedAgentSource : IAgentSource

IAgentSource

ResolveVersionAsync(string, int, string?, CancellationToken)

Section titled “ ResolveVersionAsync(string, int, string?, CancellationToken)”

Resolves an agent by name and by a specific version.

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

agentName string

The agent name.

version int

The requested definition version.

culture string?

The requested culture, resolved against the definition’s culture-keyed instructions (see AgentDefinition.InstructionsByCulture). null uses the definition’s default instructions.

cancellationToken CancellationToken

The cancellation token.

ValueTask<AIAgent?>

The agent, or null when this source does not hold it or that version does not exist.