Observed since 20 Oct, 16:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
a2a-langchain-adapters
Integrate A2A protocol agents into LangChain/LangGraph applications
A production-ready Python package for integrating A2A protocol agents into LangChain/LangGraph. Enables stateful conversations, streaming, multi-turn context management, and seamless LLM tool binding with A2A agents.
Integrating A2A protocol agents into LangChain/LangGraph required custom implementations each time. This package standardizes that pattern with a production-ready, well-tested solution. Currently in early release—feedback and contributions welcome.
A2ARunnable preserves full A2A protocol semantics (streaming, task lifecycle, multi-turn conversations)pip install a2a-langchain-adapters
pip install a2a-langchain-adapters[grpc]
import asyncio
from a2a_langchain_adapters import A2ARunnable
async def main():
# Create agent runnable by discovering agent card
agent = await A2ARunnable.from_agent_url("http://agent.example.com")
# Send a message and get result
result = await agent.ainvoke("What is 2 + 2?")
print(f"Response: {result.text}")
await agent.close()
asyncio.run(main())
async for event in agent.astream("Explain quantum computing"):
if event.text:
print(event.text, end="", flush=True)
# Initial message
result = await agent.ainvoke("Tell me about Python")
# Follow-up in same context
agent_conv = agent.with_context(result.context_id)
followup = await agent_conv.ainvoke("What about async?")
# Send JSON data
data = {"action": "analyze", "target": "sales_q4"}
result = await agent.ainvoke(data)
print(result.data) # Structured response
This project uses Just for task automation. All commands are defined in the Justfile.
just setup
just help # Show all available commands
just setup # Setup development environment
just build # Build the project
just qa # Run quality assurance (format, lint, type check, dependency check)
just test # Run tests
just coverage # Run tests with coverage report
# Setup
uv sync --python=3.13
# Run tests
pytest tests/ -v
# Type checking
mypy src/ --strict
# Linting and formatting
ruff format src/ tests/
ruff check --fix src/ tests/
ruff check --select I --fix src/ tests/
# Dependency checking
deptry .
# Coverage
pytest --cov=src --cov-report=html tests/
If this project helps you, consider supporting its development:
Your support helps keep the project maintained and growing ❤️
This project is licensed under the MIT License. See the LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
a2a-sdkEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | a2a-sdk>=0.3.19 | runtime |
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | httpx>=0.28.1 | runtime |
langchain-coreEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | langchain-core<2.0.0,>=1.0.0 | runtime |
pydanticEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | pydantic>=2.12.5 | runtime |
grpcioEnvironment{
"extras": "",
"marker": "extra == \"grpc\"",
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | grpcio>=1.60.0; extra == "grpc" | runtime |
bdist_wheel · 24.29 KB · Python py3
sdist · 130.09 KB · Python source
Observed since 20 Oct, 16:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:9d49bf7cf6697314e5b873ed0b1dd0614b0863c11495c8dcd5cee45f79320376