Skip to main content

Cryptographic identity and audit trails for autonomous AI agents

Project description

plyra-id

Cryptographic identity and audit trails for autonomous AI agents.

When your agents go into production, compliance teams ask: "Who did this? Who authorized it? Can you prove it?"

You have logs. You don't have proof.

plyra-id gives you cryptographically signed, tamper-evident receipts proving who did what and who authorized it.


The Problem

Autonomous agents are moving into production across enterprises—in financial services, healthcare, insurance, and legal. But there's a compliance wall:

  • Who authorized this action? Logs don't prove authorization.
  • Who is responsible if something goes wrong? You can't trace accountability.
  • Can you prove this in an audit? Logs can be tampered with. Receipts can't.

plyra-id solves this with one decorator.


The Solution

from plyra_id import AgentID, sign_action

# Create agent identity (once)
agent = AgentID.create(owner="compliance@company.com", name="document-analyzer")

# Sign every action (automatic with frameworks)
signature = sign_action("analyzed_document_123", agent.private_key_pem)

# Verify in audit (tamper-evident)
is_valid = verify_signature("analyzed_document_123", signature, agent.public_key_pem)
# True ✓ (can be proven in court)

One decorator. Framework-agnostic. Compliance-ready.


Framework Support

plyra-id integrates seamlessly with the frameworks you're already using:

LangGraph

from langgraph.graph import StateGraph
from plyra_id.frameworks.langgraph import PlyraCheckpointSaver, sign_node

@sign_node(name="research", agent_id=agent.id, authorizer="human@company.com")
def research_node(state):
    return {"result": web_search(state.query)}

# Every checkpoint is now a signed receipt
checkpointer = PlyraCheckpointSaver()
compiled = graph.compile(checkpointer=checkpointer)

# Export compliance report
audit_trail = checkpointer.export_audit_trail(format="json")

AutoGen

from autogen import AssistantAgent
from plyra_id.frameworks.autogen import PlyraAgentWrapper

assistant = AssistantAgent(...)
wrapped = PlyraAgentWrapper(
    agent=assistant,
    agent_id=agent.id,
    authorizer="human@company.com"
)

reply = wrapped.generate_reply(messages)
# Returns both: {"reply": ..., "audit_entry": {...}}

CrewAI

from crewai import Task
from plyra_id.frameworks.crewai import PlyraTaskWrapper

task = Task(description="Analyze financial report")
wrapped = PlyraTaskWrapper(task, agent_id=agent.id, authorizer="human@company.com")

result = wrapped.execute()
# Returns both: {"result": ..., "audit_entry": {...}}

Plain Python

from plyra_id.frameworks.python import sign_action

with sign_action(agent_id, "fetch_data", authorizer) as log:
    data = fetch_from_api()
    # log now contains signed audit entry

Export & Compliance

Export signed audit trails in any format:

# JSON (for APIs, pipelines)
json_trail = audit_log.to_json(pretty=True)

# CSV (for Excel, compliance reports)
csv_trail = audit_log.to_csv()

# SIEM integration (Datadog, Splunk, Sumo Logic)
exporter = DatadogExporter(api_key="...")
for entry in audit_log.entries:
    exporter.export(entry)

Every entry includes:

  • Agent ID
  • Action taken
  • Timestamp (ISO8601)
  • Signature (Ed25519, tamper-proof)
  • Authorization (who approved)
  • Policy constraints (what was forbidden)
  • Success/failure status

Use Cases

Financial Services

  • KYC/AML agents: Prove who performed customer verification
  • Trade execution: Audit trail for every agent-initiated trade
  • Compliance: Meet GLBA, SOX, OCC requirements

Healthcare

  • Prior authorization: Signed receipts for agent approvals
  • Patient data access: Who accessed what, when, why
  • HIPAA audits: Tamper-evident proof of compliance

Insurance

  • Claims processing: Agent decisions with authorization proof
  • Underwriting: Signed audit trail for every agent assessment
  • State compliance: Meet state-by-state AI regulations

Legal

  • Contract review: Agent analysis with attorney sign-off
  • Due diligence: Verified agent findings for M&A
  • Legal research: Traceable agent citations

Installation

# Core library only
pip install plyra-id

# With LangGraph support
pip install plyra-id[langgraph]

# With all frameworks
pip install plyra-id[langgraph,autogen,crewai]

# With SIEM exporters
pip install plyra-id[otel,datadog]

# With PostgreSQL backend
pip install plyra-id[postgres]

Quick Start (5 minutes)

  1. Create an agent identity:
from plyra_id import AgentID

agent = AgentID.create(
    owner="compliance@company.com",
    name="document-analyzer"
)
print(f"Agent ID: {agent.id}")
  1. Sign an action:
from plyra_id import sign_action, verify_signature

action = "analyzed_report_2024_q1"
signature = sign_action(action, agent.private_key_pem)
print(f"Signature: {signature}")

# Verify
is_valid = verify_signature(action, signature, agent.public_key_pem)
print(f"Valid: {is_valid}")  # True ✓
  1. Create an audit log entry:
from plyra_id.core.audit_log import AuditLogEntry, ActionStatus
from datetime import datetime, timezone

entry = AuditLogEntry(
    agent_id=agent.id,
    action="analyzed_report_2024_q1",
    input_hash="sha256:abc123...",
    authorized_by="compliance@company.com",
    timestamp=datetime.now(timezone.utc).isoformat(),
    signature=signature,
    policy_constraints=["no_external_payments", "max_token_usage:10000"],
    status=ActionStatus.SUCCESS,
)

print(entry.to_json(pretty=True))
  1. Export for compliance:
from plyra_id.core.audit_log import AuditLog

audit_log = AuditLog()
audit_log.add_entry(entry)

# JSON for your API
json_output = audit_log.to_json(pretty=True)

# CSV for audit committee
csv_output = audit_log.to_csv()

Command-Line Interface

# Export audit trail from a database
plyra-audit export --from langgraph --format json --output audit.json

# Verify a signature
plyra-audit verify \
  --signature "ed25519:abc123..." \
  --public-key pubkey.pem \
  --message "analyzed_report_2024_q1"

# Start audit dashboard
plyra-audit serve --port 8765 --db ~/.plyra/checkpoints.db

Documentation


Architecture

plyra-id is built in layers:

  1. Core Identity (plyra_id.core)

    • Ed25519 keypair generation
    • Cryptographic signing & verification
    • Audit log schema & serialization
    • Policy constraint enforcement
  2. Framework Integrations (plyra_id.frameworks)

    • LangGraph checkpoint saver
    • AutoGen agent wrapper
    • CrewAI task wrapper
    • Plain Python context manager
  3. Exporters (plyra_id.exporters)

    • StdoutExporter (logging)
    • OpenTelemetryExporter (OTel)
    • DatadogExporter (Datadog)
    • SidecarExporter (webhooks)
  4. Storage (plyra_id.storage)

    • SQLiteStorage (local)
    • PostgresStorage (cloud)
  5. CLI (plyra_id.cli)

    • plyra-audit export
    • plyra-audit verify
    • plyra-audit serve

Security

plyra-id uses Ed25519 (NIST-standard public-key cryptography) for all signatures.

  • Private keys are never logged; export only with explicit flag
  • Signatures are tamper-evident (any modification invalidates)
  • Audit trails are immutable by design
  • Policy constraints are enforced before action execution

For security issues, please email: security@plyra.dev


Open Source

plyra-id is licensed under Apache 2.0. Build on it, extend it, integrate it. No proprietary lockdown.


Contributing

We welcome contributions. See CONTRIBUTING.md for guidelines.


Support


Roadmap

v0.1.0 (now)

  • Core signing & verification
  • Framework integrations (LangGraph, AutoGen, CrewAI)
  • Exporters & storage backends
  • CLI tool

v0.2.0 (Month 2)

  • Enterprise dashboard (SaaS)
  • SIEM integration (Datadog, Splunk, Sumo Logic)
  • Advanced policy engine
  • Compliance report generation

v0.3.0+ (Months 3+)

  • Agent reputation scoring (plyra-cred)
  • Payment integration (plyra-pay)
  • Agent marketplace (plyra-marketplace)

Citation

If you use plyra-id in your research or product, please cite:

@software{plyra_id,
  title={plyra-id: Cryptographic identity and audit trails for autonomous AI agents},
  author={Plyra AI},
  url={https://github.com/plyraAI/plyra-id},
  year={2026},
}

Built with precision. Deployed with confidence. Scaled globally.

plyra-id: Identity infrastructure for the autonomous agent economy.

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

plyra_id-0.1.1.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

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

plyra_id-0.1.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file plyra_id-0.1.1.tar.gz.

File metadata

  • Download URL: plyra_id-0.1.1.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plyra_id-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6b74f5aaa8f86c2c4217ac1a7deabd3c35b863bf03dfd72a7800df760eb0c86
MD5 e43b36f2300fa1dcba2a232b5a946166
BLAKE2b-256 75261432a49f7e735e642f2111aba45e83a3f62494004fd259601d0fc47906ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for plyra_id-0.1.1.tar.gz:

Publisher: ci.yml on plyraAI/plyra-id

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plyra_id-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: plyra_id-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plyra_id-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d65d50b17296b9f13c1670fcfc92e02b85bf1ea6c53f6cdc69303811eaa2d96c
MD5 6f5513591ee9b782886e0b800690648f
BLAKE2b-256 301a7121c0f8522e5affaafc595fe45b5f08958db186250aa3f088a59de93048

See more details on using hashes here.

Provenance

The following attestation bundles were made for plyra_id-0.1.1-py3-none-any.whl:

Publisher: ci.yml on plyraAI/plyra-id

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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