Source

GitHub · aisuite: Simple, unified interface to multiple Generative AI providers

Open the source

The source presents aisuite as a lightweight, two-layer Python library: a provider-agnostic Chat Completions API and an Agents API for tool-enabled, structured work. It teaches developers to separate application logic from provider-specific SDK details, equip models with governed tools, and extend the library through convention-based adapters.

- The Chat Completions API standardizes core parameters and request-response structures across multiple LLM providers. - Developers can switch providers by changing the model string, which follows the `<provider>:<model-name>` format. - Plain Python functions can become model tools, with aisuite generating schemas, executing calls, and returning results to the model. - The Agents API supports longer-running work through reusable agent declarations, sandboxed toolkits, policies, persistent state, artifacts, and tracing. - MCP servers can supply tools directly, while an explicit MCP client adds reusable connections, security filters, and tool prefixing. - New providers are integrated through lightweight adapters that follow prescribed module and class naming conventions.

Based on Andrew Ng's public content. Not affiliated with or endorsed by Andrew Ng.

Supports these rules

Quotes from this video

“The chat API provides a high-level abstraction for model interactions.”

“It supports all core parameters (`temperature`, `max_tokens`, `tools`, etc.) in a provider-agnostic way, and standardizes request and response structures so you can focus on logic rather than SDK differences.”

“Model names use the format `<provider>:<model-name>`; aisuite routes the call to the right provider with the right parameters:”

“aisuite turns tool calling into a one-liner: pass plain Python functions and it generates the schemas, executes the calls, and feeds results back to the model.”

“With `max_turns` set, aisuite sends your message, executes any tool calls the model requests, returns the results to the model, and repeats until the conversation completes.”

“Prefer full manual control? Omit `max_turns` and pass OpenAI-format JSON tool specs aisuite returns the model's tool-call requests and you run the loop yourself.”

“for both styles. The Agents API For longer-running, structured work there is a first-class Agents API: declare an agent once, run it with a `Runner`, and attach **toolkits** prebuilt, sandboxed tool families for files, git, and shell:”

“The Agents API also gives you the pieces a production harness needs:”

“New providers can be added by implementing a lightweight adapter.”

“This convention ensures consistency and enables automatic loading of new integrations.”

Topics