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.2.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.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmd_langchain-0.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 67c0545a971ae8c3b06c6d9911a8f81b3c3a56ce50daee188ac3dda931e304bc
MD5 af50aa890335636bf6016079177e5fe0
BLAKE2b-256 c91cc23736c612533036a692efc58bb283f49ce42068aa39dd7b8ff1573840c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmd_langchain-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf0d4ced3f247ef29864324b74fecab073b071b6b95b052db8d62e77853005f
MD5 4e24ac454a1751f8890d1b0c0ca60f10
BLAKE2b-256 35ba9096344235775530a411a581c24d47ed79d8c4be048e3e0563f1bbeb5ce2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.3

2 files

This release

0.3.2 This release

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