Expand description
Rig’s classic agent runtime.
This crate owns the mature builder, run state machine, typed hook system,
contextual tool registry, memory orchestration, extraction, and shared
blocking/streaming driver. Portable provider, message, tool, and storage
contracts remain in rig_core and are reachable here through the
explicit core namespace; this crate’s root deliberately exports only
runtime-owned items. The comprehensive end-user facade is the root rig
crate.
§Target support
Native targets are fully supported. wasm32-unknown-unknown (browser) is
supported with no feature flags to set — the relaxed async bounds follow
from the target alone.
The rmcp feature is unavailable on wasm: rmcp’s ClientHandler requires
Send + Sync unconditionally, which this crate’s wasm tool registry cannot
satisfy, so asking for it there raises a targeted compile_error!. WASI
(wasm32-wasip1/wasip2) is not supported: the dependency graph does
not build for it. See the crate README for the full matrix and the
reasoning.
Re-exports§
pub use agent::Agent;pub use agent::AgentBuilder;pub use agent::AgentRun;pub use agent::AgentRunner;pub use extractor::ExtractionResponse;
Modules§
- agent
- This module contains the implementation of the Agent struct and its builder.
- client
- Classic runtime construction extensions for portable completion clients and models.
- completion
- High-level prompting traits and runtime errors for the classic agent runtime.
- core
- Direct access to portable provider, data, memory, and tool contracts.
- extractor
- This module provides high-level abstractions for extracting structured data from text using LLMs.
- integrations
- prelude
- Common imports for Rig’s classic runtime.
- streaming
- High-level streaming prompting traits for the classic agent runtime.
- test_
utils test-utils - Test utilities for the classic runtime and its provider-facing acceptance tests.
- tool
- Tool authoring, registration, and canonical structured execution.
Attribute Macros§
- rig_
tool derive - A procedural macro that transforms a function into a portable
rig_core::tool::PortableTool, or into the classic contextualrig::tool::Toolwhen the function accepts classic runtime context. - tool_
macro derive - A procedural macro that transforms a function into a portable
rig_core::tool::PortableTool, or into the classic contextualrig::tool::Toolwhen the function accepts classic runtime context.