Skip to main content
╔══════════════════════════════════════════════════════════════════════════════╗
║                                                                              ║
║    ███╗   ███╗██╗   ██╗████████╗ █████╗  ██████╗ ███████╗███╗   ██╗████████╗ ║
║    ████╗ ████║██║   ██║╚══██╔══╝██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝ ║
║    ██╔████╔██║██║   ██║   ██║   ███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║    ║
║    ██║╚██╔╝██║██║   ██║   ██║   ██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║    ║
║    ██║ ╚═╝ ██║╚██████╔╝   ██║   ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║    ║
║    ╚═╝     ╚═╝ ╚═════╝    ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝    ║
║                                                                              ║
║              ██████╗ ██╗   ██╗████████╗██╗  ██╗ ██████╗ ███╗   ██╗           ║
║              ██╔══██╗╚██╗ ██╔╝╚══██╔══╝██║  ██║██╔═══██╗████╗  ██║           ║
║              ██████╔╝ ╚████╔╝    ██║   ███████║██║   ██║██╔██╗ ██║           ║
║              ██╔═══╝   ╚██╔╝     ██║   ██╔══██║██║   ██║██║╚██╗██║           ║
║              ██║        ██║      ██║   ██║  ██║╚██████╔╝██║ ╚████║           ║
║              ╚═╝        ╚═╝      ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝           ║
║                                                                              ║
║                    Python SDK for AI-Native Development.                     ║
║                                                                              ║
╚══════════════════════════════════════════════════════════════════════════════╝

PyPI Python 3.10+ httpx Pydantic v2 Apache 2.0

Type-safe. Async-first. Production-ready.
The official Python SDK for the MutagenT AI platform.


🎯 What is MutagenT Python SDK?

The MutagenT Python SDK is a developer-friendly, fully typed client for the MutagenT AI platform. Built for modern AI applications, it provides:

  • 🔒 Typed Models — a Pydantic v2 model for every request and response body in the API spec
  • ⚡ Sync + Async — Mutagent (sync) and AsyncMutagent (async) dual surface
  • 🐍 Python 3.10+ — three runtime dependencies: httpx, pydantic, typing-extensions
  • 🔐 HTTPS by Default — plain-HTTP server URLs are refused for non-local hosts unless you opt in
  • 🧩 Spec-Generated — every namespace is emitted from the platform's OpenAPI document

Core Capabilities

Feature Description
Agents Create, list, update, and delete agents; fetch one by id or by slug
Organizations & Workspaces Administer organizations and workspaces, check slugs, set a default workspace
Members & Invitations Add, re-role, and remove members; send, resend, and revoke invitations
Model Providers Register provider credentials, browse the model catalog, test a connection
Account & Sessions Read and update your profile, change your password, list and revoke sessions
Cloud Sandboxes Spawn isolated sandboxes, run a command or a single agent turn, watch output live, read captured spans

📦 Installation

pip install mutagent-sdk

The PyPI distribution is mutagent-sdk; the import path remains from mutagent import ....

from mutagent import Mutagent, AsyncMutagent

🚀 Quick Start

Sync client

from mutagent import Mutagent

client = Mutagent(api_key="YOUR_API_KEY", server_url="https://api.mutagent.io")

agents = client.agents.list_agents(limit=10)
print(f"Found {len(agents['data'])} agents")

server_url defaults to MUTAGENT_SERVER_URL, and to http://localhost:3003 when that is unset — point it at your host explicitly when you are not running the platform locally.

Set MUTAGENT_API_KEY in your environment and omit the argument entirely:

export MUTAGENT_API_KEY="sk_live_xxxxxxxx"
from mutagent import Mutagent

client = Mutagent()  # reads MUTAGENT_API_KEY automatically

Async client

import asyncio
from mutagent import AsyncMutagent

async def main():
    async with AsyncMutagent(
        api_key="YOUR_API_KEY",
        server_url="https://api.mutagent.io",
    ) as client:
        # Who am I?
        profile = await client.user_profile.get_profile()
        print(profile)

        # Which workspaces can I see?
        workspaces = await client.workspaces.list_workspaces()
        print(workspaces)

asyncio.run(main())

📚 Namespaces

The client exposes one namespace per API tag. Every method has a sync and an async form:

Namespace Covers
client.user_profile Profile, password, and active sessions
client.agents Agent CRUD and slug lookup
client.organizations Organization CRUD, slug checks, member counts
client.workspaces Workspace CRUD and default-workspace selection
client.organization_members Organization membership and roles
client.workspace_members Workspace membership and roles
client.provider_configs Provider credentials, model catalog, connection tests
client.invitations Organization invitations

Per-method reference lives in docs/sdks/.


☁️ Cloud Sandboxes

The platform runs disposable, isolated cloud sandboxes: you spawn one, execute commands or a single agent turn inside it, watch its output as it happens, read the spans it captured, and tear it down.

Operation Route
Spawn a sandbox POST /api/sandbox
List sandboxes GET /api/sandbox
Get sandbox status GET /api/sandbox/{id}
Tear down a sandbox DELETE /api/sandbox/{id}
Run a command in a sandbox POST /api/sandbox/{id}/exec
Watch a sandbox's output live GET /api/sandbox/{id}/stream
Read a sandbox's captured spans GET /api/sandbox/{id}/traces
Run one command in a fresh sandbox POST /api/sandbox/run
Run one agent turn in a fresh sandbox POST /api/sandbox/agent/run
List sandbox presets GET /api/sandbox/presets
List sandbox providers GET /api/sandbox/providers
Preflight a sandbox definition POST /api/sandbox/preflight
Exchange an API key for a sandbox operator token POST /api/sandbox/token
Ingest OTLP spans from inside a sandbox POST /api/sandbox/telemetry/v1/traces

Availability: these routes are live in the platform API. This release of the Python client does not yet generate a sandbox namespace for them — until it does, call them over HTTPS with your API key in the x-api-key header.


🧪 Testing

The SDK ships a dev extras group with everything needed for testing:

pip install "mutagent-sdk[dev]"
# Includes: pytest, pytest-asyncio, pytest-httpx, ruff, mypy

Run the test suite:

pytest tests/

pytest-httpx is used to mock outgoing HTTP calls without spinning up a server. Tests live in tests/ at the package root.


🏗️ Generated by mutagent-xgen

This package is generated by mutagent-xgen — MutagenT's proprietary in-house SDK generator. The generator ensures the Python client stays in sync with the API specification.

To regenerate after API changes:

# Fetch latest spec from running server
bash scripts/dump-spec.sh

# Regenerate SDK
mutagent-xgen run

Note: README.md is emitted once and is never rewritten by a regeneration, so the hand-written content here is safe.


📜 License

This SDK is released under the Apache License 2.0.

Copyright 2026 MutagenT. All rights reserved.


Built with care by the MutagenT Team • mutagent.io

Metadata

Release files for mutagent-sdk 0.3.0

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

Source distribution (sdist)

Source distribution for mutagent-sdk 0.3.0
File Size Uploaded Provenance
mutagent_sdk-0.3.0.tar.gz 131.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mutagent-sdk 0.3.0
File Interpreter ABI Platform
mutagent_sdk-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 242.2 kB

Release files / mutagent_sdk-0.3.0.tar.gz

Download URL mutagent_sdk-0.3.0.tar.gz
Size 131.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab95ef28d71f62d78b768adc49ba5b054163146f4d3e771381af76c34ee73214
BLAKE2b-256 checksum
How to use checksums
e8485a9ee22a05525666842ffa699ba76ab7aab40dc1272c2dbe1e6b2a2002b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mutagent_sdk-0.3.0-py3-none-any.whl

Download URL mutagent_sdk-0.3.0-py3-none-any.whl
Size 110.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66c3565849c752f42bcec8c2226d089624e0c28077f1afd49135462cfba5cde1
BLAKE2b-256 checksum
How to use checksums
06e6d9529027d2bca0cfdc81703a4a84431ad86305f27e31d985f2bd209d1923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mutagent-sdk 0.3.0

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.

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