LlamaIndex AgentMesh Integration
AgentMesh trust layer integration for LlamaIndex - enabling cryptographic identity verification and trust-gated agent workflows.
Overview
This integration provides:
- TrustedAgentWorker: Agent worker with cryptographic identity and trust verification
- TrustGatedQueryEngine: Query engines with access control based on trust
- Secure Data Access: Governance layer for RAG pipelines with identity-based policies
Installation
pip install llama-index-agent-agentmesh
Quick Start
Creating a Trusted Agent
from llama_index.agent.agentmesh import TrustedAgentWorker, CMVKIdentity
# Generate cryptographic identity
identity = CMVKIdentity.generate(
agent_name="research-agent",
capabilities=["document_search", "summarization"],
)
# Create trusted agent worker
worker = TrustedAgentWorker.from_tools(
tools=[search_tool, summarize_tool],
identity=identity,
llm=llm,
)
# Create agent with trust verification
agent = worker.as_agent()
Trust-Gated Query Engine
from llama_index.agent.agentmesh import TrustGatedQueryEngine, TrustPolicy
# Wrap query engine with trust policy
trusted_engine = TrustGatedQueryEngine(
query_engine=base_engine,
policy=TrustPolicy(
min_trust_score=0.8,
required_capabilities=["document_access"],
audit_queries=True,
),
)
# Query requires verified identity
response = trusted_engine.query(
"What are the quarterly results?",
invoker_card=requester_card,
)
Multi-Agent Trust Handoffs
from llama_index.agent.agentmesh import TrustHandshake, TrustedAgentCard
# Create agent card for discovery
card = TrustedAgentCard(
name="research-agent",
description="Performs document research",
capabilities=["search", "summarize"],
identity=identity,
)
card.sign(identity)
# Verify peer before task handoff
handshake = TrustHandshake(my_identity=identity)
result = handshake.verify_peer(peer_card)
if result.trusted:
# Safe to delegate task
pass
Features
TrustedAgentWorker
An agent worker that:
- Has cryptographic identity for authentication
- Verifies peer agents before accepting tasks
- Signs outputs for verification by recipients
- Supports capability-based access control
TrustGatedQueryEngine
A query engine wrapper that:
- Requires identity verification for queries
- Enforces trust score thresholds
- Restricts access based on capabilities
- Provides audit logging of all queries
Data Access Governance
Control access to your RAG pipeline:
from llama_index.agent.agentmesh import DataAccessPolicy
policy = DataAccessPolicy(
allowed_collections=["public", "internal"],
denied_collections=["confidential"],
require_audit=True,
max_results_per_query=100,
)
# Apply policy to index
trusted_index = TrustedVectorStoreIndex(
index=base_index,
policy=policy,
)
Security Model
AgentMesh uses Ed25519 cryptography for:
- Identity Generation: Unique DID per agent
- Request Signing: All queries are signed
- Response Verification: Outputs can be verified
API Reference
| Class | Description |
|---|---|
CMVKIdentity |
Cryptographic agent identity |
TrustedAgentWorker |
Agent worker with trust verification |
TrustGatedQueryEngine |
Query engine with access control |
TrustHandshake |
Peer verification protocol |
TrustedAgentCard |
Agent discovery card |
DataAccessPolicy |
RAG access governance |
License
MIT License
Metadata
Release files for llama-index-agent-agentmesh 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| llama_index_agent_agentmesh-0.3.0.tar.gz | 9.0 kB | Without provenance | Details for llama_index_agent_agentmesh-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_agent_agentmesh-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_agent_agentmesh-0.3.0-py3-none-any.whl |
Total release size: 20.9 kB
Release files / llama_index_agent_agentmesh-0.3.0.tar.gz
| Download URL | llama_index_agent_agentmesh-0.3.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a3f204e5673095d570f1dd86c183b3d69ffa0b767f628c1b5b50a6e8a25124b
|
|
BLAKE2b-256 checksum How to use checksums |
7fce58e67c97a22f12334506a7ac020dc216a0af91fa077579107cb1f7d74fc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_agent_agentmesh-0.3.0-py3-none-any.whl
| Download URL | llama_index_agent_agentmesh-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0c908320b477783d773df01506dde539ea57766e0c2bb0f74ad243756729608
|
|
BLAKE2b-256 checksum How to use checksums |
1d4ba97722088995151032ae8bc59c2fe464523605591e76f1a6e9e6b8340e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-agent-agentmesh 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.