Repository navigation
v0.1.0 — The agent loop is the product
🎉 First Release
yoagent is a simple, effective agent loop with tool execution and event streaming in Rust. Inspired by pi-agent-core.
Features
Agent Loop
- Stateful agent with steering (interrupt mid-run) and follow-up queues
- Full event stream: AgentStart → TurnStart → MessageUpdate (deltas) → ToolExecution → TurnEnd → AgentEnd
- Parallel tool execution by default — sequential and batched strategies available
- Streaming tool output via
on_updatecallback - Automatic retry with exponential backoff and jitter
Multi-Provider
- 7 API protocols, 20+ providers through a modular registry
- Anthropic, OpenAI, Google Gemini, Azure, Bedrock, Vertex, and OpenAI-compatible providers
Built-in Tools
bash— shell execution with timeout, deny patterns, confirmation callbacksread_file/write_file— file I/O with line numbers and path restrictionsedit_file— surgical search/replace with fuzzy match hintslist_files— directory explorationsearch— pattern search via ripgrep/grep
Context Management
- Token estimation and smart truncation
- Execution limits (max turns, max tokens, timeout)
- Prompt caching (Anthropic)
MCP Support
- stdio and HTTP transports
- McpToolAdapter wraps MCP tools as AgentTool
Quick Start
[dependencies]
yoagent = "0.1"
tokio = { version = "1", features = ["full"] }CLI Example
A ~200-line interactive coding agent:
ANTHROPIC_API_KEY=sk-... cargo run --example cliStats
- 77 tests (+ 3 integration)
- Zero clippy warnings
- Full documentation