Skip to main content

Babelagent

PyPI Docs DOI License: MIT

The Babel that lets AI agents understand each other. One shared tongue for agents that were never meant to talk.

Every agent framework has its own idea of what an agent is. LangChain has Runnables with .invoke, CrewAI has Crews with .kickoff, AutoGen has agents with .generate_reply, an LLM has messages.create, a microservice has an HTTP route. None of them agree on a shape, so connecting any two means writing glue.

Babelagent is the neutral layer in between. You bring your own agents, whatever they are (a callable, an HTTP/OpenAPI endpoint, an MCP tool, a framework agent, or an LLM), and it wraps each one in a single shared interface so they can exchange messages and collaborate on a task, agent-to-agent (A2A). The value is not any single adapter. It is that once something is adapted, it works with everything else you have adapted.

The headline is adapt(): hand Babelagent almost anything and it builds the connector on the fly.

import asyncio
from babelagent import Graph

async def main():
    graph = (
        Graph()
        .node("clean",   str.strip)
        .node("shout",   str.upper)
        .node("exclaim", lambda s: s + "!")
    )
    result = await graph.run("  hello  ")
    print(result.output)   # "HELLO!"

asyncio.run(main())

Let different agents work in parallel and hand their results to each other, with barrier policies on the join:

from babelagent import Graph, adapt

g = Graph()
g.node("src",     lambda text: text)
g.node("summary", adapt(langchain_agent), after=["src"])   # a LangChain agent
g.node("labels",  adapt("https://api.example.com/classify"), after=["src"])  # an HTTP service
# merge receives {"summary": ..., "labels": ...} keyed by node name (>=2 upstreams)
g.join("merge", after=["summary", "labels"], agent=combine, barrier="all")
result = await g.run(document)

Concepts

Concept What it is
Graph Builds the network of agents (linear chaining and a DAG API)
CompiledGraph The validated, runnable graph; await graph.run(payload)
Node One participant: an agent plus an optional quality check/gate
Agent The uniform async run(message, ctx) -> message interface
adapt() Turns any brought object into an Agent, inferring the adapter
Message / Result The envelope agents exchange / the final output + run trace
Barrier Fan-in join policy: all · k_of_n · optional

Install

pip install babelagent                 # light base (callables + HTTP)
pip install "babelagent[mcp]"          # MCP tools
pip install "babelagent[cloud]"        # Anthropic / OpenAI
pip install "babelagent[ollama]"       # local models
pip install "babelagent[frameworks]"   # LangChain (CrewAI/AutoGen detected if installed)
pip install "babelagent[serve]"        # REST service
pip install "babelagent[all]"

Try it (no API key)

babelagent demo      # a broken agent (gated FAIL) then a fixed one (PASS)
babelagent doctor    # which adapter families are available
babelagent inspect   # print a graph's topology as JSON

Cite

If you use Babelagent, please cite it (concept DOI, always resolves to the latest version):

Amit Patole. Babelagent. https://doi.org/10.5281/zenodo.22129957

A machine-readable CITATION.cff is in the repo.

Status

Alpha, in active development. MIT licensed.

— amitpatole

Metadata

Release files for babelagent 0.1.3

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

Source distribution (sdist)

Source distribution for babelagent 0.1.3
File Size Uploaded Provenance
babelagent-0.1.3.tar.gz 242.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for babelagent 0.1.3
File Interpreter ABI Platform
babelagent-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 286.6 kB

Release files / babelagent-0.1.3.tar.gz

Download URL babelagent-0.1.3.tar.gz
Size 242.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2b5cd79a17ca1adda4b8576c6ca4fd9e0a2309501d2f2c4316860d4526574163
BLAKE2b-256 checksum
How to use checksums
43cae1507b9957ca6321c7864baee53c833eaf9c3ff1fe593d87b1ba69b78929
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / babelagent-0.1.3-py3-none-any.whl

Download URL babelagent-0.1.3-py3-none-any.whl
Size 43.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96575f2a13e5918baccf81b34a5d5a7f818fcd06cb6e5eb7564be2329a45eeb5
BLAKE2b-256 checksum
How to use checksums
e084b15291706439d1420647b2e62408bdf7717489b1863a81470ab91e6fd98d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Security for babelagent 0.1.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for babelagent-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

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.

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