llamaindex-agentid
AgentID identity and trust for LlamaIndex — sign every query response, discover agents by capability, verify output provenance.
pip install llamaindex-agentid
Query engine wrapper
Wrap any LlamaIndex query engine — every response is automatically signed with your agent's Ed25519 key:
import os
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llamaindex_agentid import AgentIDQueryEngine
documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents)
# First run: creates a new identity. Save the DID to an env var.
engine = AgentIDQueryEngine(
query_engine=index.as_query_engine(),
name="research-agent",
capabilities=["research", "summarization"],
owner="team@company.com",
registry_url="https://api.agentid-protocol.com",
)
print(f"DID (save this): {engine.did}")
# Subsequent runs: reload the same identity
engine = AgentIDQueryEngine(
query_engine=index.as_query_engine(),
did=os.environ["MY_AGENT_DID"],
name="research-agent",
capabilities=["research", "summarization"],
owner="team@company.com",
registry_url="https://api.agentid-protocol.com",
)
response = engine.query("What are the main AI safety concerns?")
print(response.response)
# Verify the response came from who it claims
assert engine.verify_response(response) # True
# Or verify from another process using only the DID
from agentid import Agent
Agent.verify_from_did({
"payload": response.metadata["_agentid_payload"],
"signature": response.metadata["_agentid_signature"],
}) # True
Agent tools
Add AgentID discovery and verification tools to any LlamaIndex ReAct agent:
from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
from llamaindex_agentid import get_agentid_tools
tools = get_agentid_tools(registry_url="https://api.agentid-protocol.com")
agent = ReActAgent.from_tools(
tools,
llm=OpenAI(model="gpt-4o"),
verbose=True,
)
# The agent can now:
# - Call agentid_find("web-search") to discover other agents
# - Call agentid_verify(signed_message) to verify messages from other agents
response = agent.chat("Find a web-search agent and tell me what it can do")
Response metadata
Every response from AgentIDQueryEngine.query() includes:
| Key | Description |
|---|---|
_agentid_did |
Signer's DID |
_agentid_signature |
Base64 Ed25519 signature |
_agentid_payload |
Signed payload (pass to Agent.verify_from_did) |
License
MIT
Metadata
Release files for llamaindex-agentid 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 | |
|---|---|---|---|
| llamaindex_agentid-0.1.0.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llamaindex_agentid-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / llamaindex_agentid-0.1.0.tar.gz
| Download URL | llamaindex_agentid-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a5b8df6324d5fe998ecff756d3aea8a2c2ab0242105f50d9837f37694170139
|
|
BLAKE2b-256 checksum How to use checksums |
27b85d89fefbfaf257c8cce0c0019a51d99e5369edb5836c340101649373e927
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / llamaindex_agentid-0.1.0-py3-none-any.whl
| Download URL | llamaindex_agentid-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02d7883b5f25fd497aa73235b06d0b7b9051b103d7e220d0341f990014739176
|
|
BLAKE2b-256 checksum How to use checksums |
3c8cda6a176e97aaa99ba5ffad7f031cf033d1cbbfaeee7aa459ca7354e413be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|