IAgentCatalog
AgentPrism.Abstractions.dllThe catalog that joins every agent source into a single view. The user interface and the HTTP layer reach agents only through this interface.
public interface IAgentCatalogMethods
Section titled “Methods”ListAsync(CancellationToken)
Section titled “ ListAsync(CancellationToken)”Lists the agents from every source. On a name clash the source with the higher priority wins, and the lower-priority one is not added to the list.
ValueTask<IReadOnlyList<AgentDescriptor>> ListAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<AgentDescriptor>>
Agent summaries ordered by name.
ResolveAsync(string, string?, CancellationToken)
Section titled “ ResolveAsync(string, string?, CancellationToken)”Resolves the agent with the given name. The returned agent is wrapped by the run recording decorator; every run is written into IRunStore.
ValueTask<AIAgent?> ResolveAsync(string agentName, string? culture, CancellationToken cancellationToken)Parameters
Section titled “Parameters”agentName string
The agent name.
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.
Returns
Section titled “Returns”ValueTask<AIAgent?>
The agent, or null when no source holds it.
ResolveAsync(string, int?, string?, CancellationToken)
Section titled “ ResolveAsync(string, int?, string?, CancellationToken)”Resolves an agent by name and by a specific definition version.
Code agents (AgentDefinitionOrigin.Code) have no version history;
AgentPrismException is thrown when version is
given for a code agent.
ValueTask<AIAgent?> ResolveAsync(string agentName, int? version, string? culture = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”agentName string
The agent name.
version int?
The requested definition version. When null it behaves like IAgentCatalog.ResolveAsync (the current version).
culture string?
See IAgentCatalog.ResolveAsync.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<AIAgent?>
The agent, or null when it is not found.
Exceptions
Section titled “Exceptions”version is given and the agent comes from code, or that version
does not exist.