> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swarmd.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDKs

> Three Python packages for putting an agent on Swarmd — pick the one that matches your framework.

# Python on Swarmd

Swarmd is a control plane for agents. You bring the agent; Swarmd gives it an
identity, decides who it may talk to, brokers those calls, and records them.

The Python SDKs are how your agent plugs into that. There are three packages,
layered:

<CardGroup cols={3}>
  <Card title="swarmd-sdk" icon="cube" href="/sdks/python/core-sdk">
    **The core.** Auth, discovery, MCP calls, webhook verification. No agent
    framework assumed.
  </Card>

  <Card title="swarmd-google-adk" icon="google" href="/sdks/python/google-adk">
    **Google ADK wrapper.** Turns your subscriptions into ADK sub-agents and
    toolsets, and serves the agent over A2A.
  </Card>

  <Card title="swarmd-langchain" icon="link" href="/sdks/python/langchain">
    **LangChain wrapper.** Same, for LangGraph — subscriptions become
    `BaseTool`s, and the graph is served over A2A.
  </Card>
</CardGroup>

Both wrappers depend on `swarmd-sdk`. Installing a wrapper installs the core
too — you never install both by hand.

## Which one do I want?

<Tabs>
  <Tab title="I'm building a new agent">
    Pick the framework you'd have picked anyway:

    | If you want to write your agent in…                | Install             | Start here                            |
    | -------------------------------------------------- | ------------------- | ------------------------------------- |
    | Google ADK                                         | `swarmd-google-adk` | [Google ADK](/sdks/python/google-adk) |
    | LangChain / LangGraph                              | `swarmd-langchain`  | [LangChain](/sdks/python/langchain)   |
    | Something else (CrewAI, raw OpenAI, your own loop) | `swarmd-sdk`        | [Core SDK](/sdks/python/core-sdk)     |

    With a wrapper, a working agent is about 25 lines. With the core SDK you own
    the agent loop and the HTTP server; the SDK handles everything that touches
    Swarmd.
  </Tab>

  <Tab title="I already have an agent">
    You're migrating. Read the page for your framework first so the helpers make
    sense, then follow the migration guide — they're diff-shaped, showing what to
    delete from your existing `main.py`.

    * [Migrating from Google ADK](/sdks/python/migration-google-adk)
    * [Migrating from LangChain](/sdks/python/migration-langchain)
  </Tab>

  <Tab title="I just want to call the API">
    You don't need an agent at all to use `swarmd-sdk`. It's a normal API client:
    list your subscriptions, call an MCP server through the relay, verify a
    webhook signature.

    Skip to [Core SDK](/sdks/python/core-sdk).
  </Tab>
</Tabs>

## What the wrappers actually do for you

The two framework wrappers are thin. Everything they do, you could do yourself
with `swarmd-sdk` and 200 lines of glue — the point is that you don't have to,
and that the glue is the same across agents.

|                                             | You write it | `swarmd-sdk` | `swarmd-google-adk` / `swarmd-langchain` |
| ------------------------------------------- | :----------: | :----------: | :--------------------------------------: |
| OAuth2 tokens, caching, refresh, 401 retry  |              |       ✓      |                     ✓                    |
| Discover agents you're subscribed to        |              |       ✓      |                     ✓                    |
| Discover MCP servers you're granted         |              |       ✓      |                     ✓                    |
| Call an MCP server through the relay        |              |       ✓      |                     ✓                    |
| Verify inbound webhook signatures           |              |       ✓      |                     ✓                    |
| `/admin` endpoints for operators            |              |       ✓      |                     ✓                    |
| Subscriptions → native framework tools      |       ✓      |              |                     ✓                    |
| Poll long-running sub-agents to completion  |       ✓      |              |                     ✓                    |
| A2A server + agent card                     |       ✓      |              |                     ✓                    |
| Live catalogue refresh on platform events   |       ✓      |              |                     ✓                    |
| LLM calls routed through the Swarmd gateway |       ✓      |              |                  ✓ (ADK)                 |

## The path from here

<Steps>
  <Step title="Get set up">
    Create an agent identity, collect your three secrets, install the package,
    write a `.env` — then attach your agent card once the agent is running.
    One page, shared by all three tracks.

    [Setup →](/sdks/python/setup)
  </Step>

  <Step title="Learn the model">
    Six concepts that explain every helper you're about to call: the runtime,
    two token audiences, subscriptions, MCP grants, polling, and refresh.

    [Core concepts →](/sdks/python/concepts)
  </Step>

  <Step title="Build the agent">
    Pick your track and follow it end to end. Each one builds a running agent
    and then dissects it line by line.

    [Core SDK](/sdks/python/core-sdk) ·
    [Google ADK](/sdks/python/google-adk) ·
    [LangChain](/sdks/python/langchain)
  </Step>

  <Step title="Keep it running">
    Full API reference for all three packages, plus the failure modes you'll
    actually hit.

    [Reference](/sdks/python/reference) ·
    [Troubleshooting](/sdks/python/troubleshooting)
  </Step>
</Steps>

<Note>
  **Python 3.9+** for all three packages. The wrappers pin their framework
  dependencies to tested ranges — see [Reference](/sdks/python/reference#dependency-ranges)
  if you're resolving a conflict.
</Note>
