Overview of yoagent features and capabilities
mainyoagent is a Rust library for building LLM-powered agents with the following core capabilities:
Control & Lifecycle
- Streaming & Events: Full
AgentEventstream for text deltas, thinking, and tool execution. - Tool Middleware: Async hooks to allow, modify, or deny tool calls.
- Execution Limits: Control via max turns, max tokens, wall-clock time, and
CancellationToken. - Error Handling: Built-in retry logic with exponential backoff and jitter for rate-limits and network errors.
Models & Tools
- Multi-Provider Support: Native implementations for Anthropic, OpenAI (Completions and Responses), Azure, Gemini, Vertex, Bedrock, and OpenAI-compatible gateways.
- Tool Integration: Built-in tools (bash, file operations, ripgrep) and support for MCP (Model Context Protocol) servers and OpenAPI specs.
- Structured Outputs: Native schema-validated replies where supported by the provider.
Scaling & Production
- Sub-agents: Delegate to child loops with independent models, tools, and limits.
- Context Management: Token tracking and tiered compaction (truncating tool outputs, summarizing old turns, or dropping middle turns).
- Persistence: Save/restore runs and session trees (branching history with checkpoints).
- Observability:
tracingintegration for spans (loop, LLM stream, tools) including token and cost tracking.