aiXplain SDK
Build, deploy, and govern autonomous AI agents for your business operations.
aiXplain SDK provides Python and REST APIs for agents that plan, use tools, call models and data, run code, and adapt at runtime. It also works natively with MCP-compatible coding agents and IDEs.
Become an agentic-first organization
Designed for business operations: autonomous, governed, MCP-compatible, and built for context management. Your interactive AI assistant is a click away.
We operate our business with aiXplain agents, using them across product, business development, and marketing.
Why aiXplain
- Autonomous runtime loop — plan, call tools and models, reflect, and continue without fixed flowcharts.
- Multi-agent execution — delegate work to specialized subagents at runtime.
- Governance by default — runtime access and policy enforcement on every run.
- Production observability — inspect step-level traces, tool calls, and outcomes for debugging.
- Model and tool portability — swap assets without rewriting application glue code.
- MCP-native access — connect MCP clients to 900+ aiXplain-hosted assets with one PAYG API key.
- Flexible deployment — run the same agent definition serverless or private.
| aiXplain SDK | Other agent frameworks | |
|---|---|---|
| Governance | Runtime access and policy enforcement built in | Usually custom code or external guardrails |
| Models and tools | 900+ models and tools with one API key | Provider-by-provider setup |
| Deployment | Cloud (instant) or on-prem | Usually self-assembled runtime and infra |
| Observability | Built-in traces and dashboards | Varies by framework |
| Coding-agent workflows | Works natively with MCP-compatible coding agents and IDEs | Usually not a first-class workflow target |
AgenticOS
AgenticOS is the portable runtime platform behind aiXplain agents. AgentEngine orchestrates planning, execution, and delegation for autonomous agents. AssetServing connects agents to models, tools, and data through a governed runtime layer. Observability captures traces, metrics, and monitoring for every production run across Cloud (instant) and on-prem deployments.
MCP Server Marketplace
aiXplain Marketplace now also exposes MCP servers for 900+ models and tools, allowing external clients to access selected tool, integration, and model assets, for example Opus 4.6, Kimi, Qwen, Airtable, and Slack, through aiXplain-hosted MCP endpoints with a single API key 🔑.
Read the full MCP setup guide in the MCP servers docs.
{
"ms1": {
"url": "https://models-mcp.aixplain.com/mcp/<AIXPLAIN_ASSET_ID>",
"headers": {
"Authorization": "Bearer <AIXPLAIN_APIKEY>",
"Accept": "application/json, text/event-stream"
}
}
}
Quick start
pip install aixplain
Get your API key from your aiXplain account.
v2 (default)
Create and run your first agent (v2)
from uuid import uuid4
from aixplain import Aixplain
aix = Aixplain(api_key="<AIXPLAIN_API_KEY>")
search_tool = aix.Tool.get("tavily/tavily-web-search/tavily")
search_tool.allowed_actions = ["search"]
agent = aix.Agent(
name=f"Research agent {uuid4().hex[:8]}",
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)
Build a multi-agent team (v2)
from uuid import uuid4
from aixplain import Aixplain
from aixplain.v2 import EditorConfig, EvaluatorConfig, EvaluatorType, Inspector, InspectorAction, InspectorActionConfig, InspectorSeverity, InspectorTarget
aix = Aixplain(api_key="<AIXPLAIN_API_KEY>")
search_tool = aix.Tool.get("tavily/tavily-web-search/tavily")
search_tool.allowed_actions = ["search"]
def never_edit(text: str) -> bool:
return False
def passthrough(text: str) -> str:
return text
noop_inspector = Inspector(
name=f"noop-output-inspector-{uuid4().hex[:8]}",
severity=InspectorSeverity.LOW,
targets=[InspectorTarget.OUTPUT],
action=InspectorActionConfig(type=InspectorAction.EDIT),
evaluator=EvaluatorConfig(
type=EvaluatorType.FUNCTION,
function=never_edit,
),
editor=EditorConfig(
type=EvaluatorType.FUNCTION,
function=passthrough,
),
)
researcher = aix.Agent(
name=f"Researcher {uuid4().hex[:8]}",
instructions="Find and summarize reliable sources.",
tools=[search_tool],
)
team_agent = aix.Agent(
name=f"Research team {uuid4().hex[:8]}",
instructions="Research the topic and return exactly 5 concise bullet points.",
subagents=[researcher],
inspectors=[noop_inspector],
)
team_agent.save(save_subcomponents=True)
response = team_agent.run(
query="Compare OpenAI and Anthropic in exactly 5 concise bullet points.",
)
print(response.data.output)
Execution order:
Human prompt: "Compare OpenAI and Anthropic in exactly 5 concise bullet points."
Team agent
├── Planner: breaks the goal into research and synthesis steps
├── Orchestrator: routes work to the right subagent
├── Researcher subagent
│ └── Tavily search tool: finds and summarizes reliable sources
├── Inspector: checks the final output through a simple runtime policy
├── Orchestrator: decides whether another pass is needed
└── Responder: returns one final answer
v1 (legacy)
Create and run your first agent (v1)
from aixplain.factories import AgentFactory, ModelFactory
weather_tool = ModelFactory.get("66f83c216eb563266175e201")
agent = AgentFactory.create(
name="Weather Agent",
description="Answers weather queries.",
instructions="Use the weather tool to answer user questions.",
tools=[weather_tool],
)
result = agent.run("What is the weather in Liverpool, UK?")
print(result["data"]["output"])
You can still access legacy docs at docs.aixplain.com/1.0.
Data handling and deployment
aiXplain applies runtime governance and enterprise controls by default:
- We do not train on your data — your data is not used to train foundation models.
- No data retained by default — agent memory is opt-in (short-term and long-term).
- SOC 2 Type II certified — enterprise security and compliance posture.
- Runtime policy enforcement — Inspector and Bodyguard govern every agent execution.
- Portable deployment options — Cloud (instant) or on-prem (including VPC and air-gapped environments).
- Encryption — TLS 1.2+ in transit and encrypted storage at rest.
Learn more at aiXplain Security and aiXplain pricing.
Pricing
Start free, then scale with usage-based pricing.
- Pay as you go — prepaid usage with no surprise overage bills.
- Subscription plans — reduce effective consumption-based rates.
- Custom enterprise pricing — available for advanced scale and deployment needs.
Learn more at aiXplain pricing.
Community & support
- Documentation: docs.aixplain.com
- Example agents: https://github.com/aixplain/cookbook
- Learn how to build agents: https://academy.aixplain.com/student-registration/
- Meet us in Discord: discord.gg/aixplain
- Talk with our team: care@aixplain.com
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Metadata
Release files for aiXplain 0.2.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aixplain-0.2.44.tar.gz | 1.4 MB | Without provenance | Details for aixplain-0.2.44.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aixplain-0.2.44-py3-none-any.whl | Python 3 | none | any | Details for aixplain-0.2.44-py3-none-any.whl |
Total release size: 2.1 MB
Release files / aixplain-0.2.44.tar.gz
| Download URL | aixplain-0.2.44.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af1b1a805b20ab3d7d78b1ffa27afbfb5f481295826cb0663748adb409b7e6e7
|
|
BLAKE2b-256 checksum How to use checksums |
6b201f476630524deecde075bf29eef5173d7ec61d21d4a7620490202161eed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / aixplain-0.2.44-py3-none-any.whl
| Download URL | aixplain-0.2.44-py3-none-any.whl |
|---|---|
| Size | 695.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
931c0fbbf7f95d2e67a49d14b1eb62f0d8fd66e9b6c6b67b8d4545fe89271f8f
|
|
BLAKE2b-256 checksum How to use checksums |
56a44a9951d3c2b3931babbb53349d44597541c022c5825868b1d64d31d15203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for aiXplain 0.2.44
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.