aiXplain

Platforms & APIs 💻 Python ⚖️ Apache-2.0 🟢 Actively maintained
57 stars

aixplain is a Python SDK for building, deploying, and running autonomous AI agents with runtime governance. It solves the problem of orchestrating multi-agent systems across cloud, on-prem, edge, and local environments without stitching together multiple tools. It is for developers who need to create governed, production-ready AI agents with access to a marketplace of models and tools.

✨ Key features

  • Deploy agents with one call: agent.save() creates a versioned endpoint.
  • Access 900+ models, tools, and integrations through a single API key.
  • Runtime governance with Inspectors and Bodyguard for access control.
  • Step-level traces for self-debugging of every plan and tool call.
  • Run the same agent definition anywhere: cloud, on-prem, edge, or local.
  • Native MCP support for coding agents and IDEs.

🎯 Use cases

  • Build a research agent that answers questions with web-grounded findings.
  • Create a multi-agent team that delegates tasks to specialized subagents.
  • Deploy governed agents with runtime policies for enterprise compliance.
  • Integrate AI agents into existing workflows via MCP-compatible clients.
  • Run agents locally or on-prem for data privacy and air-gapped environments.

📦 Installation

🧰 Requirements: Python environment with pip; requires an aixplain API key (set as AIXPLAIN_API_KEY).

pip install aixplain

Get your API key from your aixplain account, then expose it to the SDK:

export AIXPLAIN_API_KEY=<your-key>

🚀 Usage

from aixplain import Aixplain

aix = Aixplain()  # reads AIXPLAIN_API_KEY from the environment

search_tool = aix.Tool.get("tavily/tavily-web-search/tavily")
search_tool.allowed_actions = ["search"]

agent = aix.Agent(
    name="Research agent",
    description="Answers questions with concise web-grounded findings.",
    instructions="Use the search tool when needed and cite key findings.",
    tools=[search_tool],
)
agent.save()

result = agent.run(
    query="Who is the CEO of OpenAI? Answer in one sentence.",
)
print(result.data.output)

⚠️ Good to know

SDK v1 (legacy) is supported until August 1, 2026, after which only v2 is available.

❓ FAQ

How do I get an API key?

You get your API key from your aixplain account, then expose it to the SDK via the AIXPLAIN_API_KEY environment variable.

What is the difference between SDK v1 and v2?

SDK v2 is the default API documented in this README. SDK v1 (legacy factory API) works until August 1, 2026, after which v2 is the only supported surface.

Can I run agents locally or on-prem?

Yes, the same agent definition can run in the cloud, on-prem, at the edge, or locally, with air-gapped and VPC options available.

How do I access marketplace assets?

Marketplace assets are reachable through the SDK, API, and MCP with a single API key. For MCP, use the aixplain-hosted MCP endpoints as shown in the README.

📊 Repository

Stars★ 57
Forks🍴 23
Open issues🐛 4
Last commit🕒 Sep 4, 2026
Created📅 May 2022
Language💻 Python
License⚖️ Apache-2.0

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.