agentcard-adapters
AgentCard v1.0 adapters for LangChain, CrewAI, AutoGen, and the Aevum PACR runtime.
What is AgentCard?
AgentCard is an open standard for machine-readable agent identity and capability declarations in agent-to-agent (A2A) communication. Think of it as HTTP headers for AI agents.
This package provides bidirectional adapters between AgentCard and major Python AI frameworks.
Installation
# Core (zero dependencies)
pip install agentcard-adapters
# With framework support
pip install agentcard-adapters[langchain]
pip install agentcard-adapters[crewai]
pip install agentcard-adapters[autogen]
pip install agentcard-adapters[all]
Quick Start
Core Schema (Framework-Independent)
from agentcard_adapters import AgentCard, Capability, Endpoint
card = AgentCard(
agent_id="01HZQK3P8EMXR9V7T5N2W4J6C0",
name="DataAnalysisAgent",
version="1.0.0",
capabilities=[
Capability(id="data.analyze", description="Analyze datasets"),
Capability(id="data.visualize", description="Create charts"),
],
endpoint=Endpoint(protocol="https", url="https://my-agent.example.com/api"),
)
card.validate() # raises if invalid
print(card.to_json())
LangChain
from agentcard_adapters import tool_to_agentcard, agentcard_to_tool
# LangChain Tool → AgentCard
card = tool_to_agentcard(
my_tool,
agent_id="01HZQK3P8EMXR9V7T5N2W4J6C0",
endpoint_url="https://my-agent.example.com",
)
# AgentCard → LangChain Tool
tool = agentcard_to_tool(card)
CrewAI
from agentcard_adapters import agent_to_agentcard, crew_to_agentcards
# CrewAI Agent → AgentCard
card = agent_to_agentcard(
researcher,
agent_id="01HZQK3P8EMXR9V7T5N2W4J6C0",
endpoint_url="https://my-crew.example.com",
)
# Entire Crew → AgentCard list
cards = crew_to_agentcards(my_crew, base_url="https://my-crew.example.com")
AutoGen
from agentcard_adapters.autogen_adapter import agent_to_agentcard
card = agent_to_agentcard(
assistant,
agent_id="01HZQK3P8EMXR9V7T5N2W4J6C0",
endpoint_url="https://my-autogen.example.com",
)
Aevum PACR Runtime Bridge
from agentcard_adapters import AevumChatModel
# Drop-in replacement for LangChain ChatOpenAI that records
# every LLM call as a PACR record with Landauer cost
model = AevumChatModel(
base_url="http://localhost:8889",
model="qwen-plus",
)
response = model.invoke("What is PACR?")
print(response.pacr_causal_id) # real CausalId from the DAG
IETF Standards
This package implements the schemas defined in two IETF Internet-Drafts:
- draft-aevum-agentcard-00 — Agent identity & capability
- draft-aevum-causal-intervention-record-00 — PACR wire format
Related Packages
| Package | Description |
|---|---|
agentcard-mcp |
MCP server for Claude Desktop |
agentcard |
TypeScript/Node.js implementation |
License
Apache-2.0. See NOTICE for patent non-reservation.
Metadata
Release files for agentcard-adapters 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentcard_adapters-0.1.0.tar.gz | 29.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentcard_adapters-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / agentcard_adapters-0.1.0.tar.gz
| Download URL | agentcard_adapters-0.1.0.tar.gz |
|---|---|
| Size | 29.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a1ceb6579c5b46a7237569b415536a0b73c3ec9fae41482aeaabad1af3b683b
|
|
BLAKE2b-256 checksum How to use checksums |
3b6f067a2458433566e3fa79465d8f064c94a0853867445e0dde7b886d5eda32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / agentcard_adapters-0.1.0-py3-none-any.whl
| Download URL | agentcard_adapters-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
328d3aa08a6f87973fb61be1f8ca1ff2050b4bf4f8ec3084ccf45170ec25c199
|
|
BLAKE2b-256 checksum How to use checksums |
a47f6397f149cfdf1b49f7152b064c49ee33e3db82d1dc6c6e619cd5daf26a37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|