Skip to main content

Pythonic wrapper around the TypeScript SwarmKit SDK for multi-agent orchestration in E2B sandboxes

Project description

SwarmKit Python SDK

SwarmKit lets you run and orchestrate terminal-based AI agents in secure sandboxes with built-in observability.

Get Started

  1. Get your SwarmKit API key at dashboard.swarmlink.ai (new users: request access first)

  2. Get an E2B API key at e2b.dev for sandbox execution

  3. Install the SDK:

    pip install swarmkit
    

    Note: Requires Node.js 18+ (the SDK uses a lightweight Node.js bridge).

  4. Check out the official documentation and cookbooks to start shipping with SwarmKit!

Streaming Events

You can subscribe to streaming events:

  • stdout: Raw NDJSON output from the agent/CLI (may arrive in chunks).
  • stderr: Process stderr (may arrive in chunks).
  • content: Parsed ACP-style events (messages, tool calls, plan updates).

Large Outputs

The Node bridge enforces per-event size limits for responsiveness.

  • stdout/stderr are chunked when very large; your callback receives each chunk normally.
  • content events are lossless: if a payload is too large to stream safely, you receive a truncated preview plus a ref to a local JSON file containing the full payload.

Example:

def on_content(evt):
    if evt.get("truncated") and evt.get("ref"):
        full_update = open(evt["ref"]["path"], "r", encoding="utf-8").read()
        # full_update is the original ACP update JSON

swarmkit.on("content", on_content)

Reporting Bugs

We welcome your feedback. File a GitHub issue to report bugs or request features.

Connect on Discord

Join the SwarmKit Developers Discord to connect with other developers using SwarmKit. Get help, share feedback, and discuss your projects with the community.

License

See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmkit-0.1.32.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmkit-0.1.32-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file swarmkit-0.1.32.tar.gz.

File metadata

  • Download URL: swarmkit-0.1.32.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for swarmkit-0.1.32.tar.gz
Algorithm Hash digest
SHA256 4427a3cd87b3e1727f5fab9ffd0eeacda4f100168f6f85dfa7f2a75abb1eab92
MD5 496e77e127c89036aac45d2a20f8d7be
BLAKE2b-256 e5a69d9fec90c230cf28b6c870de43644854f1d0bd3756144bcdc8f78ada7a59

See more details on using hashes here.

File details

Details for the file swarmkit-0.1.32-py3-none-any.whl.

File metadata

  • Download URL: swarmkit-0.1.32-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for swarmkit-0.1.32-py3-none-any.whl
Algorithm Hash digest
SHA256 732e116a9fab989a8b6e6570e960874511dfe6f97a3c5d81b9d47c9afa9e83e7
MD5 ef5a4b2c6bd160a34df50b74f43e8292
BLAKE2b-256 b5238acf774aa4d155fea2d8d0623cf31d2a7980a2ba36023cb953da783820e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page