AgentCard v1.0 adapters for LangChain, CrewAI, and AutoGen
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentcard_adapters-0.1.0.tar.gz.
File metadata
- Download URL: agentcard_adapters-0.1.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1ceb6579c5b46a7237569b415536a0b73c3ec9fae41482aeaabad1af3b683b
|
|
| MD5 |
cc64e423b09af771bd8282c772e41f2d
|
|
| BLAKE2b-256 |
3b6f067a2458433566e3fa79465d8f064c94a0853867445e0dde7b886d5eda32
|
File details
Details for the file agentcard_adapters-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentcard_adapters-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
328d3aa08a6f87973fb61be1f8ca1ff2050b4bf4f8ec3084ccf45170ec25c199
|
|
| MD5 |
4f630dc2ba59650e9a184a12e595137e
|
|
| BLAKE2b-256 |
a47f6397f149cfdf1b49f7152b064c49ee33e3db82d1dc6c6e619cd5daf26a37
|