Skip to main content

aixplain

aixplain SDK

License Marketplace size Discord

Build, deploy, and run autonomous AI agents — governed by default, in a few lines of Python.

aixplain is the operating system for autonomous AI: multi-agent orchestration with runtime governance on every action, across cloud, on-prem, and local. The full lifecycle — build → evaluate → deploy → monitor → evolve — on one runtime, instead of stitching tools together.

On your terms — your data in your perimeter, your cost free on local models and tools, pay as you go in the cloud, your independence across any model or infrastructure, no lock-in.

Build any agent — knowledge (RAG), data, custom-logic, integration, and team — via SDK, API, CLI, or MCP, on a marketplace of 900+ models, tools, and integrations.

Why aixplain

Less to build, less to operate:

  • Deploy with one call — agent.save() promotes an agent to a persistent, versioned endpoint; no Dockerfiles, queues, or autoscaling to manage.
  • No integration glue — reach 900+ models, tools, and integrations through one key; skip per-provider SDKs, auth, and rate-limit handling.
  • Guardrails you don't have to build — allow-lists, per-asset permissions, rate and usage limits, and access control enforced at runtime.
  • Self-debugging — step-level traces of every plan, tool call, and outcome.
  • Run it anywhere — the same definition runs in the cloud, on-prem, or locally.
  • Works with your coding agent — native MCP support for MCP-compatible IDEs and coding agents.

How it works

The portable runtime behind aixplain agents: orchestration, governed asset serving, and observability across cloud, on-prem, and local. See the documentation for the full architecture.

aixplain Agentic OS architecture — governed execution loop (Planner, Orchestrator, Inspector, Bodyguard) over the infrastructure services, deployable on cloud, on-prem, and local


Quick start

This README documents SDK v2, the default API. SDK v1 (the legacy factory API) is deprecated and will be removed on February 1, 2027 (2027-02-01), after which v2 is the only supported surface. Importing v1 now emits a DeprecationWarning — see the migration guide for the factory-by-factory map.

pip install aixplain

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

export AIXPLAIN_API_KEY=<your-key>

Create and run your first agent

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)

Runs return typed objects — read outputs with result.data.output, not dict indexing.

Build a multi-agent team

from aixplain import Aixplain
from aixplain.v2 import Inspector

aix = Aixplain()  # reads AIXPLAIN_API_KEY from the environment
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

# Config is plain data — strings for action/targets/severity, and a Metric,
# asset-id string, or callable for the `metric` (the universal judge).
noop_inspector = Inspector(
    name="noop-output-inspector",
    severity="low",
    targets=["output"],
    action="edit",
    metric=never_edit,
    editor=passthrough,
)

researcher = aix.Agent(
    name="Researcher",
    instructions="Find and summarize reliable sources.",
    tools=[search_tool],
)

team_agent = aix.Agent(
    name="Research team",
    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: validates the output against a runtime policy
└── Orchestrator: composes and returns the final answer

SDK v1 (legacy): deprecated, supported until February 1, 2027 (2027-02-01) — see the migration guide and the SDK v1 docs.


Marketplace

The aixplain Marketplace is a catalog of 900+ models, tools, and integrations. Every asset is reachable through the same three outlets — SDK, API, and MCP — with a single API key 🔑.

For MCP-compatible clients and IDEs, assets (for example Opus 4.6, Kimi, Qwen, Airtable, Slack) are served through aixplain-hosted MCP endpoints. See the Marketplace docs.

{
  "ms1": {
    "url": "https://models-mcp.aixplain.com/mcp/<AIXPLAIN_ASSET_ID>",
    "headers": {
      "Authorization": "Bearer <AIXPLAIN_APIKEY>",
      "Accept": "application/json, text/event-stream"
    }
  }
}

Data handling and deployment

  • Your data stays yours — never used to train foundation models; agent memory is opt-in. SOC 2 Type II; TLS 1.2+ in transit, encrypted at rest.
  • Governed at runtime — Inspector and Bodyguard enforce allow-lists, per-asset permissions, rate and usage limits, and access control on every execution.
  • Deploy anywhere — cloud, on-prem, or local; air-gapped and VPC available on-prem or local.
  • Run metadata is sent with agent runs — userAgent, plus region, language, ipAddress, latitude, longitude and timezone from a one-time ipinfo.io lookup. See docs/run-metadata.md.

Learn more at aixplain Security and aixplain pricing.


Run metadata

Agent runs send a metaData object alongside your query. It carries userAgent and — derived from a one-time https://ipinfo.io/json lookup made from the machine running the SDK — region, language, ipAddress, latitude, longitude, and timezone. The platform uses region/language/timezone for locale-aware agent execution.

  • The lookup runs once per process, on your first agent run, with a 2-second timeout.
  • If it fails or is blocked, the run proceeds normally with those fields null.
  • It applies to direct agent runs on both SDK v2 and SDK v1. Runs routed through a v2 session (agent.run(query, session=...)), model runs and pipeline runs do not send it.

Full field-by-field disclosure: docs/run-metadata.md.


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


License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Metadata

Release files for aiXplain 0.2.48

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiXplain 0.2.48
File Size Uploaded
aixplain-0.2.48.tar.gz 548.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiXplain 0.2.48
File Interpreter ABI Platform
aixplain-0.2.48-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / aixplain-0.2.48.tar.gz

Download URL aixplain-0.2.48.tar.gz
Size 548.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f398e472208b97bd0b53dd8559ac64ddedfd74d6e22d98698a626920945e1218
BLAKE2b-256 checksum
How to use checksums
2dda832ece2370e20adf24612713797acedcc710d578251ca882cf77774e5620
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.48-py3-none-any.whl

Download URL aixplain-0.2.48-py3-none-any.whl
Size 653.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9561ca4fc05e1cebfd0ff3c5b63ff9a92f3b6a435228fee024744b4a2a8af02
BLAKE2b-256 checksum
How to use checksums
d92c250868a1f49739649e044920a9febb9b51b51912e606c683b09f42a20233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.48 This release

2 release files

0.2.47

2 release files

0.2.46

2 release files

0.2.43

2 release files

0.2.41

2 release files

0.2.40

2 release files

0.2.39

2 release files

0.2.38

2 release files

0.2.36

2 release files

0.2.34

2 release files

0.2.33

2 release files

0.2.32

2 release files

0.2.31

2 release files

0.2.29

2 release files

0.2.27

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.23

2 release files

0.2.22

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.14

2 release files

0.2.11

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page