Skip to main content

Creduent Protocol SDK - open standard for cryptographic AI agent identity, Ed25519 signing, DNS verification, and attestation registry

Project description

Creduent Python SDK

PyPI version License Python Compatibility

The official Python SDK for the Creduent Protocol — a federated, open trust-verification layer and cryptographic identity infrastructure for autonomous AI agents.

Creduent enables autonomous agents to cryptographically sign metadata, verify identities across administrative domains via DNS bindings, and interact with the Creduent registry for secure, machine-to-machine trust checks.


Key Features

  • Cryptographic Identity Management: Generate secure Ed25519 keypairs for AI agents (multi-key support enabled).
  • RFC 8785 Canonical Signatures: Compute cryptographic signatures over JSON agent documents using JCS and Ed25519.
  • DNS Trust Binding: Verify cryptographic bindings between agent:// identifiers and web domains.
  • Registry Integration: Register agents and resolve signed attestations from the Creduent Registry.
  • Discovery API: Directly fetch and parse an agent's agent.json from their well-known endpoint without needing the registry.
  • Framework Integrations: Native middleware/tools for CrewAI, LangGraph, and AutoGen.
  • Unified CLI creduent: Out-of-the-box CLI commands for CRD scaffolding, signing, and capability discovery.

Installation

pip install creduent

To install with specific framework integration support:

pip install "creduent[crewai]"
pip install "creduent[langgraph]"
pip install "creduent[autogen]"
pip install "creduent[all]"

Agent Framework Integrations

Creduent provides native verification adapters for major AI agent frameworks, ensuring you can verify another agent's identity before interacting with it.

CrewAI

from creduent.integrations.crewai import CreduentVerificationTool
from crewai import Agent, Task, Crew

verify_tool = CreduentVerificationTool()

security_agent = Agent(
    role='Security Verifier',
    goal='Verify the identity of external agents before interacting',
    backstory='You are a strict security officer enforcing the Creduent protocol.',
    tools=[verify_tool]
)

LangGraph

from creduent.integrations.langgraph import create_verification_node
from langgraph.graph import StateGraph

def my_agent_node(state):
    # your logic
    pass

workflow = StateGraph(MyState)
# Insert verification middleware before interaction
workflow.add_node("verify_agent", create_verification_node("agent://example/target_agent"))
workflow.add_node("interact", my_agent_node)
workflow.add_edge("verify_agent", "interact")

AutoGen

from creduent.integrations.autogen import CreduentAgentMiddleware
import autogen

# Wrap your assistant to automatically verify incoming/outgoing agent messages
secure_assistant = CreduentAgentMiddleware(
    autogen.AssistantAgent(name="assistant", llm_config=llm_config)
)

Command Line Interface (CLI v2)

The new unified creduent CLI uses a YAML-first CRD (Custom Resource Definition) approach to manage your agent identities.

1. Scaffold agent.yaml

creduent init

Creates a draft agent.yaml in the current directory.

2. Generate Keys

creduent keygen

Generates Ed25519 keys inside .creduent/keys/ and prints your public key.

3. Build & Sign agent.json

creduent build

Reads agent.yaml and .creduent/keys/private.pem (or CREDUENT_PRIVATE_KEY env var) and compiles a fully canonicalized, signed agent.json ready for deployment.

4. Discover Agent Capabilities

# Public discovery
creduent discover agent://idevsec/reconbot

# Authenticated discovery (presents your agent identity)
creduent discover agent://idevsec/reconbot --as agent://my_org/my_agent

API Reference

discover(target_agent_id: str, my_agent_id: str = None, private_key_pem: str = None) -> DiscoveryResult

Resolves an agent's URL from the registry, fetches their agent.json, verifies its cryptographic signature and DNS bindings offline, and returns their capabilities. Can optionally perform authenticated discovery using your own key.

sign(draft: dict, private_key_pem: str) -> dict

Signs a draft agent document using JCS canonicalization (RFC 8785) + Ed25519. Returns signed document with the keys and signature fields.

verify(target: str | dict) -> VerifyResult

Verifies a self-signed agent.json. Accepts dict, HTTPS URL, domain, local path, or agent:// URI.

  • result.valid — bool
  • result.agent_id, result.keys, result.endpoint, result.capabilities
  • result.error — str or None

register(agent_id, domain, agent_json_url, registry_url?) -> RegisterResult

Registers an agent with the Creduent registry.

  • result.success — bool
  • result.attestation — dict (level, issued_at, expires_at, ...)

attest(agent_id, registry_url?) -> AttestResult

Fetches attestation status for an agent from the registry.


Contributing

Bugs, feature requests, and pull requests welcome via GitHub Issues.

License

Dual Licensed under Apache License 2.0 (Open Source) and Commercial License — see 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

creduent-0.5.2.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

creduent-0.5.2-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file creduent-0.5.2.tar.gz.

File metadata

  • Download URL: creduent-0.5.2.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for creduent-0.5.2.tar.gz
Algorithm Hash digest
SHA256 88074a299503c025948a16b6e4f0d01051ece3b45761f6c42d63026feb35d7e9
MD5 4e2d88dda3391349ed63233c08aa06b1
BLAKE2b-256 788db9c5402359e841b9de745c12ed147bed4caa450675d210c8048cf15fc6cc

See more details on using hashes here.

File details

Details for the file creduent-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: creduent-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for creduent-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4153eaba8294688e6c4efd44084b150d4ea54873f2dd6cfd8301ce377ab92fe
MD5 f7db34b81696b047ce4a2680931a344d
BLAKE2b-256 94c33f51fd7118d66beca362fd0880323f8ca09cb74470e2fc74a468a871f39b

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