Agent Io banner
lispking lispking

Agent Io

AI community

Description

A Rust SDK for building AI agents with multi-provider LLM support.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Agent IO

[![Crates.io](https://img.shields.io/crates/v/agent-io.svg)](https://crates.io/crates/agent-io) [![Documentation](https://docs.rs/agent-io/badge.svg)](https://docs.rs/agent-io) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache2.0-yellow.svg)](https://opensource.org/license/apache-2-0) [build status](https://github.com/lispking/agent-io/actions?query=branch%3Amain) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/lispking/agent-io)

A Rust SDK for building AI agents with multi-provider LLM support.

Features

  • Multi-provider LLM support: OpenAI, Anthropic, Google Gemini, and OpenAI-compatible providers
  • Tool/Function calling: Built-in tool system — define tools with a simple #[tool] macro
  • Streaming responses: Event-based real-time response handling
  • Context compaction: Automatic management of long conversation context
  • Token tracking: Usage tracking and cost calculation across providers
  • Retry mechanism: Built-in exponential backoff retry for rate limit handling
  • Memory system: In-memory memory by default, with optional LanceDB persistence via feature flag

Installation

[dependencies]
agent-io = { version = "0.3", features = ["openai"] }
tokio = { version = "1", features = ["full"] }

Enable `memory-lancedb` only if you need persistent vector-backed memory:

agent-io = { version = "0.3", features = ["openai", "memory-lancedb"] }

Quick Start

Basic Usage

use std::sync::Arc;
use agent_io::{Agent, llm::ChatOpenAI};

#[tokio::main]
async fn main() -> Result<(), Box> {
    let llm = ChatOpenAI::new("gpt-4o")?;
    let agent = Agent::builder()
        .with_llm(Arc::new(llm))
        .build()?;

    let response = agent.query("Hello!").await?;
    println!("{}", respons