v2 introduces a redesigned API with simplified agent creation, improved async execution, and first-class support for multi-agent workflows. If you're starting a new project, we recommend v2.
aiXplain SDK
Build autonomous AI agents in a few lines of Python.
The fastest way to deploy managed, multi-agent systems with runtime governance — on any infrastructure.
The operating system for autonomous AI — one runtime to build, deploy, scale, and govern them across the full lifecycle: development → evaluation → deployment → monitoring → evolution.
What you get
- ✓ Deploy in one call –
agent.save()promotes to a persistent, versioned endpoint. No Dockerfiles, queues, or autoscaling. - ✓ 900+ models, tools, MCPs from 70+ vendors – One PAYG key, swap providers without rewriting glue code.
- ✓ Single agents or teams – Subagents delegate at runtime — no hardcoded flowcharts.
- ✓ Governance you don't code – Allow-lists, per-asset permissions, rate limits, and RBAC — e.g. block pip installs or network access.
- ✓ Memory, traces, dashboards – Step-level traces of every plan and tool call; monitor every run.
- ✓ Cloud, On-Prem, edge, or air-gapped – Serverless by default; sovereign deploys via Sovereignty.
Prerequisite: create a PAYG API key .
pip install aixplain
from aixplain import Aixplain
aix = Aixplain(api_key="YOUR_API_KEY")
agent = aix.Agent(
name="Research agent",
description="Answers questions with cited web findings.",
instructions="Use web search when needed and keep answers concise.",
tools=[aix.Tool.get("tavily/tavily-web-search/tavily")],
).save()
print(agent.run("What are the top 3 trending AI papers this week?").data.output)
.save() deploys the agent; .run() executes it and returns a typed result.
Ground responses in your docs and knowledge bases with RAG workflows.
Query operational data sources and return structured answers from live tables.
Add Python tools and business logic to execute domain-specific actions.
Connect to MCP servers and services like Slack, Salesforce, and more.
Coordinate specialized agents for multi-step, multi-role execution.
Enforce runtime quality and policy checks with inspectors and controls.
Extend 900+ models and tools with aixplain-hosted MCP endpoints — accessible from any MCP client with a single PAYG API key.