Skip to main content

Identity, discovery, trust, and runtime for AI agents

Project description

AgentID

PyPI version PyPI downloads License: MIT Python 3.11+

Identity, discovery, and trust for AI agents.

The internet was built for humans. AI agents have no standard way to identify themselves, find each other, or verify that messages are genuine. AgentID is the missing protocol layer.

from agentid import Agent

# Every agent gets a cryptographic identity
agent = Agent.create(
    name="research-agent",
    capabilities=["web-search", "summarization"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)
print(agent.did)
# did:agentid:7sP3V2mNkQxRtYbLcDfHgJwAeUiMoZnXvBqKpTsWyE

# Find agents by what they can do
results = Agent.find(capability="web-search", registry_url="https://api.agentid-protocol.com")

# Sign and verify messages between agents
signed = agent.sign({"task": "summarize this document"})
Agent.verify_from_did(signed)  # → True

What it solves

Multi-agent systems break down without trust infrastructure:

  • Who is this agent? No standard identity — every team hand-rolls auth
  • Which agent can do X? No discovery — agents are hardcoded or manually configured
  • Did this message come from who it claims? No signing — outputs can be spoofed or tampered

AgentID fixes all three with a single open protocol.


Installation

macOS users: use pip3 instead of pip if pip is not found.

pip3 install agentid-protocol

For the LangChain integration:

pip3 install agentid-protocol langchain-agentid

For AutoGen:

pip3 install agentid-protocol autogen-agentid

For CrewAI:

pip3 install agentid-protocol crewai-agentid

Core concepts

Identity

Every agent gets a DID (Decentralized Identifier) derived from an Ed25519 keypair:

did:agentid:<base58-encoded-public-key>

No central authority issues it. Any agent generates one instantly, offline.

Capabilities

Agents declare what they can do using string identifiers:

capabilities=["web-search", "code-review", "translation"]

Registry

A registry stores agent documents and makes them discoverable. Use the hosted registry or run your own.

Signed messages

Every agent can sign payloads. Any third party can verify a signature using only the signer's DID — no shared secrets, no central authority.


Usage

Local registry (dev, no server needed)

from agentid import Agent

# Create
agent = Agent.create(
    name="my-agent",
    capabilities=["search", "summarize"],
    owner="you@company.com",
)

# Discover
agents = Agent.find(capability="search")

# Resolve a DID
doc = Agent.resolve("did:agentid:...")

# Sign
signed = agent.sign({"task": "analyze this dataset"})

# Verify
Agent.verify_from_did(signed)  # → True

Remote registry (production, shared across machines)

Use the hosted public registry or run your own:

REGISTRY_URL = "https://api.agentid-protocol.com"

agent = Agent.create(
    name="my-agent",
    capabilities=["search"],
    owner="you@company.com",
    registry_url=REGISTRY_URL,
)

agents = Agent.find(capability="search", registry_url=REGISTRY_URL)

Load an existing agent

# Load by DID — private key is stored locally in ~/.agentid/keys/
agent = Agent.load("did:agentid:...")
signed = agent.sign({"task": "run pipeline"})

LangChain integration

Give any LangChain agent a verifiable identity and agent-discovery tools:

import os
from agentid.integrations.langchain import (
    load_or_create,
    AgentIDCallbackHandler,
    AgentIDFindTool,
    AgentIDVerifyTool,
)

# First run — creates a new identity. Save the printed DID to an env var.
identity = load_or_create(
    name="research-agent",
    capabilities=["web-search", "summarization"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)
print(f"DID (save this): {identity.did}")

# Subsequent runs — reload the same identity by DID
identity = load_or_create(
    did=os.environ["MY_AGENT_DID"],
    name="research-agent",           # ignored when did is given
    capabilities=["web-search"],     # ignored when did is given
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)

# 1. Attach identity — signs every final output automatically
handler = AgentIDCallbackHandler(identity)

# 2. Add discovery + verification tools
tools = [
    AgentIDFindTool(registry_url="https://api.agentid-protocol.com"),
    AgentIDVerifyTool(registry_url="https://api.agentid-protocol.com"),
    # ...your other tools
]

# 3. Wire up
executor = AgentExecutor(agent=agent, tools=tools, callbacks=[handler])

# Every output is signed — verify downstream:
result = executor.invoke({"input": "Research the latest AI papers"})
# result["_agentid_did"]       → signer's DID
# result["_agentid_signature"] → Ed25519 signature
# result["_agentid_payload"]   → signed payload (verify with Agent.verify_from_did)

AutoGen integration

Works with both AutoGen v0.2.x (pyautogen) and v0.4+ (autogen-agentchat):

import os
from agentid.integrations.autogen import AgentIDTools, load_or_create

# First run — create identity, save the DID
identity = load_or_create(
    name="my-autogen-agent",
    capabilities=["data-analysis", "code-execution"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)
print(f"DID (save this): {identity.did}")

# Subsequent runs — reload
identity = load_or_create(
    did=os.environ["MY_AGENT_DID"],
    name="my-autogen-agent",
    capabilities=["data-analysis"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)

agentid = AgentIDTools(
    registry_url="https://api.agentid-protocol.com",
    agent=identity,   # enables the sign tool
)

# AutoGen v0.2 — register as function tools on assistant + user_proxy
agentid.register_v2(assistant, user_proxy)

# AutoGen v0.4+ — pass as a tools list
tools = agentid.as_tools()
assistant = AssistantAgent(name="assistant", tools=tools)

# Sign outputs before handing off to other agents
signed = identity.sign({"result": "analysis complete", "data": [1, 2, 3]})

CrewAI integration

import os
from crewai import Agent as CrewAgent, Task, Crew
from agentid.integrations.crewai import (
    load_or_create,
    AgentIDFindTool,
    AgentIDVerifyTool,
)

# First run — create identity, save the DID
identity, sign_tool = load_or_create(
    name="research-agent",
    capabilities=["web-search", "summarization"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)
print(f"DID (save this): {identity.did}")

# Subsequent runs — reload
identity, sign_tool = load_or_create(
    did=os.environ["MY_AGENT_DID"],
    name="research-agent",
    capabilities=["web-search"],
    owner="team@company.com",
    registry_url="https://api.agentid-protocol.com",
)

tools = [
    AgentIDFindTool(registry_url="https://api.agentid-protocol.com"),
    AgentIDVerifyTool(registry_url="https://api.agentid-protocol.com"),
    sign_tool,   # lets the agent sign its own outputs
]

researcher = CrewAgent(
    role="Senior Researcher",
    goal="Find trusted agents and verify their outputs",
    backstory="Expert researcher specializing in multi-agent systems",
    tools=tools,
)

Registry server

The hosted public registry is at https://api.agentid-protocol.com.

# Check it's live
curl https://api.agentid-protocol.com/health

# Resolve any DID
curl https://api.agentid-protocol.com/agents/<did>

# Search by capability (paginated)
curl "https://api.agentid-protocol.com/agents?capability=research&limit=50&offset=0"

Or run your own:

cd registry
pip3 install -r requirements.txt
DATABASE_URL=postgresql://... uvicorn server:app --host 0.0.0.0 --port 8000

REST API:

POST   /agents                         Register an agent (proof required)
GET    /agents/{did}                   Resolve a DID
GET    /agents?capability=&limit=&offset=  Discover agents (paginated, max 500)
POST   /agents/{did}/verify            Verify a signature → {valid, did, reason}
DELETE /agents/{did}                   Deregister (signed proof required)
GET    /health                         Health check

Note: Registration requires a cryptographic proof field — an Ed25519 signature proving you own the private key for the DID. The SDK handles this automatically.


Pro features

The hosted registry includes commercial features for teams:

Feature Free Pro Enterprise
Agents 100 10,000 Unlimited
Audit log exports (CSV/JSON)
Analytics dashboard
Verified identity badges

Dashboard: agentid.dev/dashboard

Contact hello@vikhulus.com for a Pro or Enterprise API key.


Protocol

AgentID uses:

  • Ed25519 — fast, small, battle-tested signatures
  • W3C DID formatdid:agentid:<base58-public-key>
  • JSON canonical form — deterministic serialization for signing
  • Mandatory proof-of-ownership — registration requires signing the document with the private key

Full protocol spec →


Project structure

sdk/python/agentid/
  agent.py              Agent class — create, load, sign, verify, find
  identity.py           DID generation, Ed25519 keypairs
  crypto.py             Sign and verify payloads
  registry.py           Local file-based registry
  http_registry.py      Remote HTTP registry client
  integrations/
    langchain.py        LangChain callback handler + tools

integrations/
  langchain-agentid/    Standalone LangChain package
  autogen-agentid/      Standalone AutoGen package
  crewai-agentid/       Standalone CrewAI package

registry/
  server.py             FastAPI registry server

spec/
  protocol.md           Open protocol specification

Roadmap

  • Ed25519 identity + DIDs
  • Local and remote registry
  • LangChain integration
  • AutoGen integration
  • CrewAI integration
  • Hosted public registry
  • Pro: audit log exports (CSV/JSON)
  • Pro: analytics dashboard
  • Enterprise: verified identity badges
  • TypeScript SDK
  • Stripe self-serve signup
  • Interaction receipts + reputation layer

Contributing

AgentID is an open protocol. The more frameworks adopt it as the default identity layer, the more useful it becomes for everyone building multi-agent systems.

PRs welcome — especially framework integrations and SDK ports.

git clone https://github.com/bekisol/agentid
cd agentid/sdk/python
pip3 install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentid_protocol-0.3.0.tar.gz (78.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentid_protocol-0.3.0-py3-none-any.whl (84.8 kB view details)

Uploaded Python 3

File details

Details for the file agentid_protocol-0.3.0.tar.gz.

File metadata

  • Download URL: agentid_protocol-0.3.0.tar.gz
  • Upload date:
  • Size: 78.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for agentid_protocol-0.3.0.tar.gz
Algorithm Hash digest
SHA256 72bf0a0382f262ac2b72907da2f8318003f02b0f76e614337cfb22b133419492
MD5 b35a3113594ab3ed0262fba9280c2aea
BLAKE2b-256 ea06fbc431ea231bea8fa1d707b3623375e94fd31837100f6fb1a14bd9e2fc91

See more details on using hashes here.

File details

Details for the file agentid_protocol-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentid_protocol-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 126fb52dbe2e5877d0b24a735fc2330be18798215c2b29f4db74f48bb531d015
MD5 ee1a733051533c56766dd347c1034493
BLAKE2b-256 41e780d3ac5021cf33e82e37be96d87fe95755fd7419fee60c96d6f98cfcc15e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page