Skip to main content
The agent definition file. Must export a default ToolLoopAgent and optionally accepts for payment gating and capabilities for A2A agent card configuration.
app/agent.ts

Exports

When accepts is exported, the /agent endpoint requires x402 payment. Without it, the agent is not registered on the A2A endpoint. accepts can also be an array of payment entries for multi-network support.

Capabilities

The optional capabilities export controls the A2A agent card’s capabilities field and the executor’s behavior:
When streaming is set to false, the executor uses agent.generate() instead of agent.stream(), returning the full response as a single artifact rather than streaming chunks. This is useful for agents backed by models or APIs that don’t support streaming.