Skip to main content

Crate agent_sdk_tools

Crate agent_sdk_tools 

Source
Expand description

Tool surface contracts and infrastructure for the Agent SDK.

This crate defines the traits and registries that tools implement and the runtime dispatches against, without coupling to any specific LLM provider or runtime loop implementation.

§Modules

ModuleDescription
toolsTool traits, registry, ToolContext, name types
hooksLifecycle hooks (pre/post tool, events, errors)
auditAuthoritative tool audit sink (full lifecycle outcomes)
storesPersistence traits for messages, state, events, and tool executions
environmentFilesystem / process environment abstraction
seedDurable reconstruction types (ToolContextSeed, ExecutionContextFactory)

Re-exports§

pub use audit::NoopAuditSink;
pub use audit::ToolAuditSink;
pub use authority::EventAuthority;
pub use authority::LocalEventAuthority;
pub use environment::Environment;
pub use environment::ExecResult;
pub use environment::FileEntry;
pub use environment::GrepMatch;
pub use environment::NullEnvironment;
pub use hooks::AgentHooks;
pub use hooks::AllowAllHooks;
pub use hooks::DefaultHooks;
pub use hooks::LoggingHooks;
pub use hooks::ToolDecision;
pub use seed::DefaultContextFactory;
pub use seed::ExecutionContextFactory;
pub use seed::HostDependencies;
pub use seed::ToolContextSeed;
pub use stores::EventStore;
pub use stores::InMemoryEventStore;
pub use stores::InMemoryExecutionStore;
pub use stores::InMemoryStore;
pub use stores::MessageStore;
pub use stores::StateStore;
pub use stores::StoredTurnEvents;
pub use stores::ToolExecutionStore;
pub use tools::AsyncTool;
pub use tools::DynamicToolName;
pub use tools::ErasedAsyncTool;
pub use tools::ErasedListenTool;
pub use tools::ErasedTool;
pub use tools::ErasedToolStatus;
pub use tools::ListenExecuteTool;
pub use tools::ListenStopReason;
pub use tools::ListenToolUpdate;
pub use tools::PrimitiveToolName;
pub use tools::ProgressStage;
pub use tools::SimpleTool;
pub use tools::SimpleToolAdapter;
pub use tools::Tool;
pub use tools::ToolContext;
pub use tools::ToolName;
pub use tools::ToolRegistry;
pub use tools::ToolStatus;
pub use tools::TypedTool;
pub use tools::TypedToolAdapter;
pub use tools::invalid_tool_input_result;
pub use tools::stage_to_string;
pub use tools::tool_name_from_str;
pub use tools::tool_name_to_string;
pub use tools::validate_tool_input;

Modules§

audit
Authoritative tool audit sink.
authority
Event envelope authority — governs how raw events are wrapped in AgentEventEnvelopes with unique IDs, sequence numbers, and timestamps.
environment
hooks
Agent lifecycle hooks for customization.
seed
Durable reconstruction types for worker-context recovery.
stores
Storage traits for message history, agent state, and event persistence.
tools
Tool definition and registry.

Structs§

AuditProvenance
Provider / model provenance for an audit record.
ToolAuditRecord
Single authoritative audit record for one tool-call lifecycle event.
ToolAuditRecordParams
Arguments for building a ToolAuditRecord via ToolAuditRecord::new.

Enums§

ToolAuditOutcome
Lifecycle outcome for a single tool call.