Skip to main content

Module agent

Module agent 

Source

Re-exports§

pub use error::AgentResultError;

Modules§

error
memory
prebuilt
task
turn_engine

Structs§

ActorAgent
Marker type for actor-based agents.
ActorAgentHandle
Handle for an actor-based agent that contains both the agent and the address of its actor. Use addr() to send messages directly or publish Tasks to subscribed Topic<Task>.
AgentBuilder
Builder for creating BaseAgent instances from AgentDeriveT implementations
AgentConfig
BaseAgent
Base agent type that wraps an AgentDeriveT implementation with additional runtime components
Context
Execution context shared across an agent run.
DirectAgent
Marker type for direct (non-actor) agents.
DirectAgentHandle
Handle for a direct agent containing the agent instance and an event stream receiver. Use agent.run(...) for one-shot calls or agent.run_stream(...) to receive streaming outputs.
EventHelper
Helper for managing event emissions
ExecutorConfig
Configuration for executors
MemoryHelper
Helper for managing agent memory operations
ToolProcessor
Handles all tool-related operations in a centralized manner

Enums§

AgentProtocol
ContextError
HookOutcome
Outcome for hook execution: continue or abort the run.
TurnResult
Result of processing a single turn in the agent’s execution

Traits§

AgentDeriveT
Core trait that defines agent metadata and behavior This trait is implemented via the #[agent] macro
AgentExecutor
Base trait for agent execution strategies
AgentHooks
Lifecycle hooks that allow observing and customizing agent behavior. Implementers can observe agent creation, per-run lifecycle (start/complete), per-turn lifecycle (start/complete) for multi-turn executors, and tool execution (pre-call gating, start, result, error).
AgentOutputT
Trait for agent output types that can generate structured output schemas