Skip to content
Tracon

TraconA2ABuilderExtensions

Namespace Tracon · Assembly Tracon.AspNetCore.dll

Extensions that register the services needed to publish Tracon agents over A2A.

public static class TraconA2ABuilderExtensions
Inheritance
object ← TraconA2ABuilderExtensions
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

UseA2A(ITraconBuilder, Action<TraconA2AOptions>?)

Section titled “ UseA2A(ITraconBuilder, Action<TraconA2AOptions>?)”

Registers an A2A server for each agent in TraconA2AOptions.ExposedAgents. The HTTP endpoint must still be connected separately with app.MapTraconA2A(...).

public static ITraconBuilder UseA2A(this ITraconBuilder builder, Action<TraconA2AOptions>? configure = null)

builder ITraconBuilder

The Tracon configuration chain.

configure Action<TraconA2AOptions>?

Options mutator.

ITraconBuilder

The chain, for further configuration.

ExposedAgents is read and FROZEN HERE, at registration time. AddA2AServer requires an agent INSTANCE; because Tracon’s catalog can change at runtime (MAF’s own registry is not used), a lazily-resolved Tracon.ExternalAgentProxy is registered for each name — the real agent is resolved from the catalog on every call, but which names exist in A2A is frozen at registration time.

By default no agent is exposed.

A message that carries a contextId continues a conversation: the session is stored, and the agent sees the earlier turns. A conversation belongs to the caller (the signed-in user, the API key, or, with no identity at all, the local operator); another caller that sends the same contextId starts a new one. A consumer replaces the storage by registering an AgentSessionStore, keyed by the agent name or without a key, and the caller identification by registering an AgentIsolationKeyProvider.

builder.AddTracon()
.UseA2A(o => o.ExposedAgents.Add("support"));

ArgumentNullException

builder is null.