Handle all AI models with a single codebase
You do not need to handle the APIs of various AI services like OpenAI, Anthropic, and Google separately. By simply prefixing the model name with the provider's name, you can switch between all services using the same code. aisuite provides this unified interface and makes it easy to create agents that perform actual tasks.
Calling all models with one syntax
aisuite uses an OpenAI-style interface as its standard, masking the differences between multiple AI providers. If you specify a model name like openai:gpt-4o, the library automatically finds the corresponding provider's SDK and sends the request with the correct parameters. Core parameters like temperature and max_tokens work identically across all providers. This allows you to avoid being locked into a specific service and easily switch to a different model when needed.
Simplifying agents and tool calls
It includes built-in agent features to help models perform actual tasks. You only need to pass a plain Python function as a tool, and aisuite handles the entire flow from schema generation to execution and result return. Setting max_turns allows the model to automatically perform the iterative process of calling tools and accepting results. You can also plug in pre-made toolkits for files, git, and shell, or directly connect tools from an MCP server.
Installation and getting started
Install the base package in a Python environment with pip install aisuite. If you need a specific provider's SDK, install it by specifying an option like pip install 'aisuite[anthropic]'. You must prepare the API key for the AI service you intend to use, and if you want to run local models, you must also set up Ollama.
License and extensibility
This project is released under the MIT license, allowing free use for both commercial and non-commercial purposes. To add a new AI provider, you only need to implement a lightweight adapter class; it is automatically recognized as long as you follow the file name and class name conventions. A desktop AI assistant called OpenWorker is also developed based on this library, demonstrating its potential for use in real-world environments.