Skip to main content

Module agents

Module agents 

Source
Expand description

The embedder-supplied seam for submilli:agents: a program hands work to a sub-agent and gets its result back.

The engine owns the guest surface, the capability check and the call log; the harness owns what an agent is and how it runs. Everything that crosses AgentProvider is owned, serializable data, so a harness may implement it in process or forward it over the wire.

The provider bounds the run. The execution timeout is checked only while Wasm runs, so it does not interrupt a pending host call: a sub-agent run lasts as long as the provider lets it. Time limits, token spend, recursion depth and cancellation of a child when its parent goes away are the provider’s to enforce. Dropping the future returned by AgentProvider::run is how the engine cancels a run.

Structs§

AgentInfo
One agent a program may hand work to.
AgentOutcome
What a finished run hands back.
AgentRequest
One sub-agent run, as the program asked for it.
AgentUsage
Tokens a run spent. None means unknown, never zero.

Enums§

AgentCallError
Why a run did not produce a result. Every message is safe to show the program: none carries the input or the agent’s output.

Constants§

AGENTS_MODULE_NAME

Traits§

AgentProvider
The harness side of submilli:agents.