Skip to main content

AgentDNA: Verifiable and Auditable AI Agents

Project description

AgentDNA

AgentDNA is a package that helps in auditing and verifiability of Agents within a multi-agent communication system.

Key Features

  • Unified trust layer for multi-agent systems
  • Automatically manages:
    • DID setup
    • Signing traces of conversation
    • Verification of Agent conversation
  • Immutable audit logging
  • Fully compatible with:
    • Google A2A protocol
    • ADK, Crew and LangGraph frameworks

Installation

# Installation via pip
pip install agent-dna

# Installation via uv
uv add agent-dna

Architecture

AgentDNA internally wraps several layers to keep agent developers free from Rubix-specific complexity.

┌─────────────────────────┐
│      Agent Developer    │
│  dna.build() / handle() │
└─────────────┬───────────┘
              │
┌─────────────────────────┐
│       AgentDNA          │
│ role = "host" | "remote"│
└─────────────┬───────────┘
              │
┌─────────────────────────┐
│   RubixMessageHandler   |
│ - build host/agent msgs │
│ - parse & verify inbound│
│ - NFT execution (host)  │
└─────────────┬───────────┘
              │
┌───────────────────────────┐
│    RubixTrustService      │
│ - DID management          │
│ - sign_envelope()         │
│ - verify_envelope()       │
│ - verify_message_payload()│
└─────────────┬─────────────┘
              │
┌─────────────────────────┐
│       rubix-py SDK      │
│ RubixClient             │
│ Signer                  │
│ Querier                 │
└─────────────────────────┘

Agent Roles

AgentDNA supports two roles:

Host Agent

Responsible for:

  • Signing and sending outgoing host_request
  • Verifying inbound agent_response
  • Optional NFT execution for audit logging

Remote Agent

Responsible for:

  • Verifying inbound host_request
  • Signing outbound agent_response

Quick Start Example

Initializing

from agentdna import AgentDNA

dna = AgentDNA(alias="<agent alias>", role="<host/remote>")

Remote Agents

verify_info = await dna.handle(raw_text=raw_message, verify_mode="<light/heavy>")

reply = run_llm(original_msg)

built = dna.build(
    original_message=original_msg,
    response=reply,
    host_block=host_block,
)

Host Agent

outbound = dna.build(
    original_message="Are you free tomorrow?",
    state={"task_id": tid, "context_id": cid}
)

result = await self.dna.handle(
    resp_parts=resp_parts,
    original_task=task,
    remote_name=agent_name,
)

Project Structure

agentdna/
 ├── core.py
 ├── handler.py
 ├── trust.py
 ├── node_client.py
 └── ...

Examples

Full Host, ADK, and LangGraph examples can be found inside examples/.

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

agent_dna-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

agent_dna-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_dna-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for agent_dna-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96e2ef81fd5488e871f171562514897933721f2cb667721e6d20a9ef578c5295
MD5 bdbc87e3fadeb16caa33301e4c358218
BLAKE2b-256 3f9143f5bb54c81bbb211a824c332edcd802954d4a701e282d9bd8f1c16f1bd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agent_dna-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for agent_dna-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfd4f2d6adb74bf42b5ce92fd0519e727470d8d25cf8a5920711d2e32378a86c
MD5 737ebda1cb3932242d474944579a49d9
BLAKE2b-256 2b2c82e6e1de14856804245e3df51c083ee4aef382eaa885ca1ab90f1af9efec

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