Skip to main content

Module agents

Module agents 

Source
Expand description

Who @<name> is, when it is a remote agent (ADR-0037) — the contract between spawn’s grammar and whoever answers it.

A workspace open answers @<name> through one or more resolvers, asked in order: the one a host installs (WorkspaceBuilder::with_agent_resolver), then whatever the build adds (the a2a feature’s configured set, when it is on). A resolver that does not know a name says Unresolved::Unknown and the next one is asked; the first other answer stands.

What crosses the seam is small on purpose: a name in, a Peer out — something a task can be handed to and that answers (ADR-0038). A2A is one peer, behind its feature; naming needs none. Connecting, caching, credentials and retries are the resolver’s. basis keeps everything around it — the conversation with each agent, the hop metadata, the exchange, and the one spawn door — so a host never reimplements ADR-0029 §5 to answer a name its own way.

spawn asks twice. Its authorization preview runs before the approver and cannot wait on the network, so AgentResolver::route answers from what the resolver already knows. Its execution can wait, so AgentResolver::resolve does the work.

Structs§

Attachment
A file crossing to or from a peer: its bytes, the media type describing them, and the name it goes by when it has one (ADR-0041).
ExchangeBounds
The run’s bounds on an exchange, and where to report while it waits.
Message
One message to a peer.
Resolved
A remote agent, resolved: the peer to talk to, and who it is.
Started
A task a request started, as the peer knows it before waiting.
Taught
What a resolver teaches: the names it can list, and a sentence for the ones it cannot.
TaughtAgent
One remote agent as the model is taught it.

Enums§

Failure
How a task ended without doing the work.
Outcome
What came back.
PeerError
Why an exchange has no outcome.
Request
What spawn hands a peer.
Route
Where @<name> stands, decided without waiting on anything.
StillWorking
Why a wait ended with the task still running.
Unresolved
Why a resolver has no client to hand back.

Traits§

AgentResolver
Who @<name> is, for one workspace open.
Peer
Something a task can be handed to, and that answers.

Type Aliases§

OnChange
What a resolver calls after its set changes — an agent added, removed or reached — so the description spawn is registered with is captured again (ADR-0031 §3). Shared, because every resolver of one open is handed the same hook. Never called with a resolver’s own lock held, because what it does reads the resolver.