Skip to main content

AgentMesh trust layer integration for LlamaIndex agents

Project description

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

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

llama_index_agent_agentmesh-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

llama_index_agent_agentmesh-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_agent_agentmesh-0.1.0.tar.gz.

File metadata

  • Download URL: llama_index_agent_agentmesh-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for llama_index_agent_agentmesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f860b33997d3150581b69af33085f8447964440294a82d5aae99a69620f83ab3
MD5 df6b92186984b4f732558f0d17b7df71
BLAKE2b-256 4a9a2bb847092841ab28b658017110190d145b9fac8fc3310785568706ab4a2b

See more details on using hashes here.

File details

Details for the file llama_index_agent_agentmesh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_agent_agentmesh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for llama_index_agent_agentmesh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c34d478116b93109c2a8057840f68502feb05c86fdd3ed0c1e5a823d0e0778
MD5 73fb7a07f88e0f55d5825ded5a77ab59
BLAKE2b-256 d16b4d9aca8e6d0c4c77017790067035ea0820e78aa0280a6dbd7112553f2863

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