IAgentSource
AgentPrism.Abstractions.dllA source the catalog collects agents from. AgentPrism joins several sources into one catalog: the ones declared in code, the ones stored in the database and (from onwards) Microsoft Agent Framework hosting registrations.
public interface IAgentSourceRemarks
Section titled “Remarks”This abstraction keeps AgentPrism.Core from depending on the prerelease
Microsoft.Agents.AI.Hosting package. The bridge that shows MAF hosting
registrations in the catalog implements this interface inside
AgentPrism.AspNetCore.
Properties
Section titled “Properties”Gets the name of the source, used for diagnostics and user interface badges.
string Name { get; }Property Value
Section titled “Property Value”Priority
Section titled “ Priority”Gets the resolution priority. A lower value is tried first. When two agents share a name, the source with priority wins.
int Priority { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The values in use: 0 for the code source, 10 for the MAF hosting source, 100 for the database source.
Methods
Section titled “Methods”ListAsync(CancellationToken)
Section titled “ ListAsync(CancellationToken)”Lists every agent in this source.
ValueTask<IReadOnlyList<AgentDescriptor>> ListAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<AgentDescriptor>>
The agent summaries.
ResolveAsync(string, string?, CancellationToken)
Section titled “ ResolveAsync(string, string?, CancellationToken)”Resolves the agent with the given name and makes it runnable.
ValueTask<AIAgent?> ResolveAsync(string agentName, string? culture = null, CancellationToken cancellationToken = default)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 this source does not hold it.