Generation Callbacks
Agents support beforegeneration and aftergeneration callbacks, letting you hook into the lifecycle of a single run without overriding it yourself.
Run Entrypoints
OmniAgent::Agent always exposes the low-level run method, but you'll usually call an agent through one of its higher-level entrypoints.
Change an Agent's Provider or Model
By default, agents use the configured defaultprovider and defaultmodel. You can override these settings on a per-agent basis using one of the following DSL directives.
Multi-Agent Delegation
delegate_to wraps another agent as a tool your agent's LLM can call, turning your agent into a supervisor that routes work to sub-agents. The delegated agent is defined and used like any other agent — a normal class under app/agents/, not a manual tool file.
Streaming Responses
Any run entrypoint — run, an implicit entrypoint, or a run_aliases method — can stream its response by prefixing the call with .stream and passing a block. Without .stream (or without a block), behavior is completely unchanged.