Rust-native agent runtime
Define providers, tools, memory, states, approvals, evaluation, and observability in YAML. Run them with a safe, extensible Rust runtime.
$ cargo install ai-agents-cli --version {{ config.extra.version }}
name: SupportAgent
system_prompt: "You help customers safely."
llm:
provider: openai
model: gpt-4.1-nano
tools:
- calculator
$ ai-agents-cli run agent.yaml
Everything you need to build production-ready agents, out of the box.
Define agents entirely in YAML. No boilerplate, no compile step — just describe what you want.
OpenAI, Anthropic, Google, Ollama, DeepSeek, Groq, and more. Swap providers in one line.
Hierarchical states with automatic transitions. Model complex workflows as simple YAML trees.
Connect to any MCP server for instant tool access. File systems, databases, APIs — all via standard protocol.
Built-in tool policies, human-in-the-loop approvals, and error recovery. Ship with confidence.
Works with any human language out of the box. No regex, no hardcoded strings — truly multilingual.
Three ways to get going in under a minute.
# Install the CLI
$ cargo install ai-agents-cli --version 1.0.0-rc.14
# Create agent.yaml
$ cat agent.yaml
name: MyAgent
system_prompt: "You are a helpful assistant."
llm:
provider: openai
model: gpt-4.1-nano
# Run it
$ ai-agents-cli run agent.yaml
use ai_agents::{Agent, AgentBuilder};
#[tokio::main]
async fn main() -> ai_agents::Result<()> {
let agent = AgentBuilder::from_yaml_file("agent.yaml")?
.auto_configure_llms()?
.auto_configure_features()?
.auto_configure_mcp().await?
.auto_configure_spawner().await?
.build()?;
let response = agent.chat("Hello!").await?;
println!("{}", response.content);
Ok(())
}
use ai_agents::{AgentBuilder, UnifiedLLMProvider, ProviderType};
use std::sync::Arc;
#[tokio::main]
async fn main() -> ai_agents::Result<()> {
let llm = UnifiedLLMProvider::from_env(
ProviderType::OpenAI, "gpt-4.1-nano"
)?;
let agent = AgentBuilder::new()
.system_prompt("You are a helpful assistant.")
.llm(Arc::new(llm))
.build()?;
let response = agent.chat("Hello!").await?;
println!("{}", response.content);
Ok(())
}
Plus any OpenAI-compatible server via
openai-compatible provider.