Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

agent-sdk-rs is a minimal Rust SDK for tool-using LLM agents.

Design goals:

  • explicit agent loop (query, query_stream)
  • provider swap without loop rewrite (ChatModel trait)
  • JSON-schema tools + dependency injection
  • explicit completion support (ToolOutcome::Done)
  • hard safety bounds (max_iterations)

Current provider adapters:

  • Anthropic (AnthropicModel)
  • Google Gemini (GoogleModel)
  • xAI Grok (GrokModel)

Core modules:

  • agent: run loop, events, builder
  • llm: provider interface + adapters
  • tools: tool specs, argument validation, DI map
  • error: runtime + provider + schema errors

Evidence in repo: