Skip to content

aisuite

A Python library that gives one simple interface for calling many AI model providers.

Stars
16.4k
Forks
1.7k
Licence
MIT
Language
Python
Last update
2 months ago
Type
Library

What it is

aisuite is a Python library that lets a developer call language models from several providers, such as OpenAI, Anthropic, and Google, using one common format. You switch providers by changing a model name string like "openai:gpt-4o". It also includes an Agents layer that lets models call Python functions as tools.

  • Send the same prompt to OpenAI and Anthropic models and compare the answers
  • Give a model a Python function, such as a weather check, and let aisuite run the tool-call loop
  • Stream model responses chunk by chunk using one loop for several providers
  • Attach MCP servers, such as a filesystem server, as tools for a model

Great for

  • Python developers who want to compare or switch between LLM providers without rewriting code
  • Developers building simple tool-using agents with plain Python functions
  • Teams that want an MCP server's tools available to a model with little setup

Not ideal for

  • Non-programmers, since it is a code library and requires writing Python
  • People who only want a ready-made chat app; the README points to the separate OpenWorker desktop app for that
Step-by-step guide: how to use aisuiteInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python

    Install base package

    pip install aisuite

    Install with all provider SDKs

    pip install 'aisuite[all]'
  2. 2

    Run it

    • Install the package with pip
    • Set API keys for the providers you plan to use, following the Chat Completions quickstart
    • Create a client with ai.Client()
    • Call client.chat.completions.create with a model string such as openai:gpt-4o
  3. 3

    Get the most out of it

    • Use stream=True for incremental output across supporting providers
    • Pass Python functions as tools with max_turns to let aisuite run the tool loop
    • Use toolkits such as files, git, and shell for prebuilt agent tools
    • Connect any MCP server with pip install 'aisuite[mcp]'

Downloads

Strengths

  • One OpenAI-style interface across many providers, switched by changing one string
  • Plain Python functions can be passed as tools and their schemas are generated automatically
  • Has a clear split between a simple chat API and a fuller Agents API for longer tasks

Trade-offs

  • You must install and configure API keys and provider SDKs yourself
  • The README is truncated and says little about maturity, versioning, or stability guarantees
  • Some features, such as state stores and tool policies, are described only briefly here

How it compares

ProjectStarsTypeLevelUpdatedBest for
aisuite (this)16.4kLibraryintermediate2 months agoPython developers who want to compare or switch between LLM providers without rewriting code
langchain149kFrameworkintermediate4 days agoPython developers building LLM-powered applications
llama_index52.8kLibraryintermediate10 days agoPython developers building retrieval-augmented generation (RAG) apps over private documents

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.