Skip to main content

Crate opi_agent

Crate opi_agent 

Source
Expand description

General-purpose agent runtime with tool calling and transport abstraction.

Provides the foundation for building specialized agents with pluggable tool systems and communication transports.

Re-exports§

pub use agent::Agent;
pub use event::AgentEvent;
pub use event::AgentEventSink;
pub use hooks::AgentHooks;
pub use loop_types::AgentError;
pub use loop_types::AgentLoopConfig;
pub use loop_types::AgentLoopContext;
pub use message::AgentMessage;
pub use session_event::AgentSessionEvent;
pub use state::AgentState;
pub use tool::ExecutionMode;
pub use tool::Tool;
pub use tool::ToolError;
pub use tool::ToolResult;
pub use transport::Transport;

Modules§

agent
Stateful Agent wrapper around the agent loop (S8.2).
compaction
Compaction engine for managing conversation context size (S9.5).
event
Agent event protocol (S7.4).
hooks
Hook trait for agent loop customization (S8.2).
loop_types
Types for the agent loop (S6.1, S8.2).
message
Agent-level message types (S7.2).
session
Session v1 JSONL storage (S9.3).
session_event
Session-level event protocol (S7.5).
state
Agent state management.
tool
Tool calling abstraction (S8.2).
transport
Transport abstraction for agent communication.
validation
JSON Schema validation for tool arguments.

Structs§

ToolDef

Functions§

agent_loop
Run the agent loop until completion or cancellation.