LangChain
An official langchain-aidress toolkit wraps the same Aidress API surface as the MCP server — 12 tools, nine of which need no credentials at all.
Install
pip install langchain-aidress
Requires aidress-sdk>=0.5.0 — the toolkit imports symbols that don't exist before it, so an older SDK fails at import time, not call time.
Quick start
from langchain_aidress import AidressToolkit toolkit = AidressToolkit() tools = toolkit.get_tools()
Every tool follows the aidress_<name> naming pattern — aidress_verify_agent, aidress_match_agents, aidress_register_agent, aidress_call_agent, aidress_review_transaction, and so on — mirroring the MCP server's tool set.
Self-service keys — aidress_generate_keypair
Without this tool the Ed25519 self-service flow was unreachable from LangChain entirely. It runs locally and returns public_key and keypair_path — and reports "you already have a keypair" as a normal result rather than raising, since an exception escaping a tool aborts the whole agent run.
from langchain_aidress import AidressGenerateKeypairTool, AidressRegisterAgentTool, AidressRotateAgentKeyTool
kp = AidressGenerateKeypairTool().invoke({"agent_id": "my_agent_01"})
AidressRegisterAgentTool().invoke({
"agent_id": "my_agent_01",
"public_key": kp["public_key"],
})
key = AidressRotateAgentKeyTool(keypair_path=kp["keypair_path"]) \
.invoke({"agent_id": "my_agent_01"})["agent_key"]Every tool and AidressToolkit itself accept a keypair_path setting (or the AIDRESS_KEYPAIR_PATH env var) — required when more than one keypair is present, since auto-discovery only loads a keypair when exactly one exists. See the multi-agent gotcha.
Breaking change — aidress_review_transaction
aidress_review_transaction now requires caller_agent_id and receiver_agent_id. The Python SDK's AidressClient can infer them from a preceding call(), but that cache lives on the client instance — every LangChain tool builds its own client, so nothing carries over from aidress_call_agent. Leaving them optional only bought a guaranteed 422; any invocation this breaks was already failing.