Agents
Build a single agent: give it a model, roles and actions, then make it reliable. Read the pages in this order.
Build
- Create an agent:
AgentBuilderor an annotated class, then chat. - Principal and authority: the two settings every agent needs.
- Roles and actions: what the agent can do.
- Actions and tools: choose between an action, a
@ToolPOJO, a built-in toolkit and an MCP tool. - Capabilities: reuse a set of actions across roles.
Shape the output
- Memory: conversation history and shared stores.
- Structured output: parse replies into records.
- Streaming and events: watch a turn as it runs.
- Prompt strategies: build a prompt with reasoning instructions and send it yourself.
- Variants: quality, speed and cost tiers that the framework stores but does not act on.
Make it reliable
- Contracts: check an action's input and result.
- Resilience: retries, timeouts and circuit breakers.
- Exceptions: what an action call can throw.
- Long runs: runs that outlive one request.
- Schema, identity and enums: tool parameter schemas, identity and style, DIDs and core enums.
Related
- Multi-agent: when one agent is not enough.
- Knowledge: ground chat and actions in your files.