Skip to main content

swarmd-langchain

Swarmd integration for LangChain. Wires a LangChain agent into the Swarmd platform: authenticated A2A clients, discovery of the agents and MCP servers you are subscribed to, a polling tool that proxies to remote A2A agents, and an executor that bridges incoming A2A requests into a LangChain AgentExecutor.

pip install swarmd-langchain

Requires Python 3.9+. Pulls in swarmd-sdk and langchain.

Quick start

from swarmd_langchain import create_runtime, create_llm_agent, fetch_remote_agents, serve

runtime = create_runtime()

agent = create_llm_agent(
    runtime,
    name="my_agent",
    description="Does the thing",
    instruction="You are a helpful assistant.",
    tools=fetch_remote_agents(runtime),
)

serve(agent, runtime)

create_runtime() reads the same SWARMD_* environment variables as swarmd-sdk — see that package for the full list.

What's in the box

create_runtime a SwarmDRuntime wired for LangChain
create_llm_agent a LangChain agent configured against the platform
fetch_remote_agents the agents you are subscribed to, as LangChain tools
fetch_mcp_tools the MCP servers you are subscribed to, as LangChain tools
create_a2a_client_factory authenticated A2A clients
PollingA2aTool tool that proxies to a remote A2A agent, polling non-terminal states
LangChainA2aExecutor serves an AgentExecutor over the A2A protocol
serve serve the agent over A2A with the admin/webhook app mounted

Documentation and support

Full documentation is at docs.swarmd.ai. For help, email support@swarmd.ai.

MIT licensed.

Download files

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

Source Distribution

swarmd_langchain-0.3.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

swarmd_langchain-0.3.3-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file swarmd_langchain-0.3.3.tar.gz.

File metadata

  • Download URL: swarmd_langchain-0.3.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for swarmd_langchain-0.3.3.tar.gz
Algorithm Hash digest
SHA256 66a9f1dad7589651b1a7a65bca65cd92bbd98b175af886fb96ccedbc806b3d27
MD5 ea4386a3a6d4f1d97e521b4d4a1af93a
BLAKE2b-256 645333c3df8be3dea31528a644ae0c5e49a919f2adc1854655c30ddcd73ce563

See more details on using hashes here.

File details

Details for the file swarmd_langchain-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmd_langchain-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71a6ba11c364631189cbabacddfc19f5dbfb7030ca409a5118275885cc71ae90
MD5 b3fb2c660eb270bde879e3e5bf196875
BLAKE2b-256 a8c70fe194f5eae7ebce56d6f1a5847f0d05de496fe008c8d3f23a90103cbf17

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.2

2 files

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