All projects
Library

AgentAI

A Rust library for building AI agents.

AgentAI simplifies building AI agents in Rust. One interface for OpenAI, Anthropic, Gemini, Ollama and other OpenAI-compatible APIs, with custom tools, MCP server support and typed structured output.

  • Rust
  • Open Source
  • MCP
  • LLM

Why AgentAI?

Most agent frameworks are written in Python. AgentAI brings agents to Rust, with static typing, explicit error handling and a single binary to deploy. It is the foundation we use when building dedicated agents for our clients.

AgentAI uses the GenAI crate to talk to many LLM providers through one interface, so you can switch models without rewriting your agent.

Features

  • Connect to any major LLM provider: OpenAI, Anthropic, Gemini, Ollama and other OpenAI-compatible APIs.
  • Choose the right model for each step: pick a different model for each step of your agent’s workflow.
  • Custom tools: a simple ToolBox interface and a #[toolbox] macro for exposing your own functions to the agent.
  • MCP server support: reuse existing Model Context Protocol servers instead of writing tools from scratch.
  • Structured output: describe a Rust type and get a typed response back, with no need to parse free-form text.

Quick start

cargo add agentai
use agentai::Agent;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mut agent = Agent::new("You are a useful assistant");
    let answer: String = agent.run("gpt-4o", "Why is the sky blue?", None).await?;
    println!("Answer: {}", answer);
    Ok(())
}

Roadmap

AgentAI is under active development and its API may still change. Planned next:

  • Agent memory: control over persistence, record limits and context management.
  • User input and streaming output: for interactive agents that need to talk to the user while they work.
  • Configurable behavior: one place to configure model parameters and how tool errors are handled.

AxonPod

AI consulting and custom AI agents, from strategy to production.

Social

© 2026 AxonPod Technologies Inc. All rights reserved. Made with

We value your privacy and we don't use any tracking cookies.