This is an early release preview. You may encounter bugs.
Aisuite logo
Unclaimed

Tool coding inference

Aisuite

Simple, unified interface to multiple Generative AI providers

B 72/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What Aisuite is.

aisuite is a Python library for building with language models in two layers. The lower layer is a chat-completions interface that follows the OpenAI request and response shape across providers, so switching model backends means changing one string. The upper layer is an agents interface that turns plain Python functions into tools, runs multi-turn loops, and attaches prebuilt toolkits or MCP servers.

Model names take the form : , and the call is routed to the matching provider with the right parameters. Core parameters such as temperature, maxtokens, and tools are handled provider-agnostically. Providers covered include OpenAI, Anthropic, Google, Mistral, Hugging Face, AWS, Cohere, Ollama, OpenRouter, and Requesty. Streaming yields OpenAI-shaped chunks from providers that support it, with an async variant; streamed tool calls arrive as incremental delta.toolcalls fragments that you assemble and execute yourself, so streaming cannot be combined with max_turns.

For tool calling, you pass Python functions directly and the library generates the schemas, executes the requested calls, feeds results back to the model, and repeats up to maxturns, with the full tool exchange available on intermediatemessages. Omitting max_turns returns the model's tool-call requests for you to run the loop manually with OpenAI-format JSON specs.

The agents interface declares an agent once — name, model, instructions, tools — and runs it with a Runner. Toolkits provide sandboxed tool families for files, git, and shell. Around that sit tool policies (approval requirements, allow and deny lists, or a custom callable), state stores backed by memory, a file, or Postgres for resuming runs across processes, and artifact and trace capture. MCP servers are supported natively, either inline in a tool spec or through an explicit MCPClient for reusable connections, security filters, and tool prefixing. New providers are added by implementing an adapter that follows a _provider.py and Provider naming convention.

Features

  • Unified chat completions: one OpenAI-style interface across OpenAI, Anthropic, Google, Mistral, Hugging Face, AWS, Cohere, Ollama, OpenRouter, Requesty, and others
  • Provider switching: : selects the backend, so the same code runs against several models
  • Streaming: synchronous and async iterators of OpenAI-shaped chunks, including incremental tool-call fragments
  • Automatic tool calling: plain Python functions become tools, with schema generation, execution, and result feedback governed by max_turns
  • Agents API: declare an agent with instructions and tools, then run it with a Runner that returns a final output
  • Toolkits: prebuilt sandboxed tool families for files, git, and shell
  • Tool policies: approval requirements, allow and deny lists, or a custom callable decide which tool calls run
  • State stores: in-memory, file, or Postgres persistence for resuming runs and continuing conversations across processes
  • Artifacts and tracing: capture what an agent produced and each step it took
  • MCP support: any MCP server's tools can be handed to a model inline or through an explicit client
  • Provider extension: new backends are added with a naming-convention adapter that is discovered automatically

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Aisuite.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Aisuite →

Browse the catalogue