Expand description
§Rust Deep Agents SDK
High-performance Rust framework for composing reusable “deep” AI agents with custom tools, sub-agents, and prompts.
§Quick Start
[dependencies]
agents-sdk = "0.0.1" # Includes toolkit by defaultuse agents_sdk::{ConfigurableAgentBuilder, get_default_model, create_tool};
use serde_json::Value;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Create a simple tool
let my_tool = create_tool(
"greet",
"Greets a person by name",
|args: Value| async move {
let name = args.get("name")
.and_then(|v| v.as_str())
.unwrap_or("World");
Ok(format!("Hello, {}!", name))
}
);
// Build an agent with the default Claude model
let agent = ConfigurableAgentBuilder::new("You are a helpful assistant.")
.with_model(get_default_model()?)
.with_tool(my_tool)
.build()?;
// Use the agent
use agents_sdk::state::AgentStateSnapshot;
use std::sync::Arc;
let response = agent.handle_message(
"Please greet Alice using the greet tool",
Arc::new(AgentStateSnapshot::default())
).await?;
println!("{:?}", response);
Ok(())
}§Features
toolkit(default): Includes agents-toolkit with built-in toolsaws: Includes AWS integrations (DynamoDB, Secrets Manager, etc.)full: Includes all features
§Installation Options
# Default installation with toolkit
agents-sdk = "0.0.1"
# Core only (minimal installation)
agents-sdk = { version = "0.0.1", default-features = false }
# With AWS integrations
agents-sdk = { version = "0.0.1", features = ["aws"] }
# Everything included
agents-sdk = { version = "0.0.1", features = ["full"] }Modules§
- agent
- filesystem
toolkit - hitl
- llm
- messaging
- persistence
- Persistence traits for checkpointing agent state between runs.
- prelude
- Prelude module for common imports
- state
- todos
toolkit - tools
toolkit - Helper functions for creating user tools from regular Rust functions
Macros§
- tool_fn
toolkit - Macro for creating tools with typed parameters (advanced usage)
Structs§
- Configurable
Agent Builder - Builder API to assemble a DeepAgent in a single fluent flow, mirroring the Python
create_configurable_agentexperience. Prefer this for ergonomic construction. - Deep
Agent - Core Deep Agent runtime implementation
- Edit
File Tool toolkit - LsTool
toolkit - Read
File Tool toolkit - Unimplemented
Secrets Provider aws - Stub Secrets Manager provider; real implementation will sit behind the
aws-sdkfeature. - Write
File Tool toolkit - Write
Todos Tool toolkit
Traits§
- Secrets
Provider aws - Placeholder trait for loading configuration secrets.
Functions§
- create_
async_ deep_ agent - Async constructor alias to mirror the Python API surface.
- create_
deep_ agent - Create a deep agent - matches Python create_deep_agent() API exactly
- create_
sync_ tool toolkit - Create a tool from a synchronous function
- create_
tool toolkit - get_
default_ model - Returns the default language model configured Uses Claude Sonnet 4 with 64000 max tokens, mirroring the Python SDK defaults.