Cryptographic Identity for AI Agents
Prevent clones. Verify actions. Build trust.
Installation • Quick Start • How It Works • Docs
When AI agents act autonomously—making purchases, calling APIs, executing code—how do you answer:
| Question | Risk |
|---|---|
| Is this the real agent? | Impersonation, spoofing |
| Is there only ONE instance running? | Clone attacks, double-spending |
| What has this agent done before? | No audit trail, no accountability |
| Can I trust this agent? | Unknown reputation |
SigAid solves this with cryptographic identity, exclusive leasing (anti-clone), and tamper-evident action logs.
pip install sigaidWith framework integrations:
pip install sigaid[langchain] # LangChain
pip install sigaid[crewai] # CrewAI
pip install sigaid[autogen] # AutoGen
pip install sigaid[all] # All frameworksimport sigaid
# Wrap any agent with one line
agent = sigaid.wrap(my_langchain_agent, api_key="sk_xxx")
# Use exactly as before - now with verifiable identity
result = agent.invoke({"input": "Book a flight to Tokyo"})
# Agent actions are now signed and traceable
print(agent._sigaid.agent_id) # aid_7Xq9YkPz...from sigaid import AgentClient
async def main():
# Create agent with cryptographic identity
client = AgentClient.create(api_key="sk_xxx")
async with client.lease() as lease: # Exclusive - no clones allowed
# Record verifiable actions
await client.record_action(
"payment",
{"amount": 100, "to": "merchant_xyz"}
)
# Generate proof for third parties
proof = client.create_proof(challenge=b"verify_me")
await client.close()from sigaid import Verifier
verifier = Verifier(api_key="sk_xxx")
result = await verifier.verify(proof_bundle, require_lease=True)
if result.valid:
print(f"Agent {result.agent_id} verified")
print(f"Reputation: {result.reputation_score}")┌─────────────────────────────────────────────────────────────────┐
│ YOUR AGENT │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Identity │ │ Lease │ │ Actions │ │
│ │ Ed25519 │ │ (1 only) │ │ Hash Chain │ │
│ │ keypair │ │ │ │ │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
└─────────┼──────────────────┼──────────────────┼─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ SIGAID AUTHORITY │
│ │
│ • Registers agent identities │
│ • Enforces exclusive leasing (anti-clone) │
│ • Stores tamper-evident action history │
│ • Verifies proofs for third parties │
└─────────────────────────────────────────────────────────────────┘
| Primitive | What It Does | Crypto |
|---|---|---|
| Identity | Unique agent ID derived from public key | Ed25519 |
| Lease | Only ONE instance can operate at a time | PASETO v4 |
| State Chain | Immutable, signed action history | BLAKE3 + Ed25519 |
| Proof Bundle | Verifiable proof for third parties | Challenge-response |
| Scenario | How SigAid Helps |
|---|---|
| Financial agents | Prevent double-spending, audit all transactions |
| Multi-agent systems | Verify agent-to-agent interactions |
| Autonomous workflows | Ensure only one instance runs critical tasks |
| API access control | Services verify agent identity before granting access |
| Compliance & audit | Tamper-evident logs for regulatory requirements |
SigAid wraps popular agent frameworks with zero code changes:
import sigaid
# LangChain
agent = sigaid.wrap(langchain_agent, api_key="sk_xxx")
# CrewAI
crew = sigaid.wrap(my_crew, api_key="sk_xxx")
# AutoGen
agent = sigaid.wrap(autogen_agent, api_key="sk_xxx")
# Self-hosted authority
agent = sigaid.wrap(
my_agent,
authority_url="https://my-authority.com",
api_key="sk_xxx"
)| Framework | Status | Install |
|---|---|---|
| LangChain | ✅ Supported | pip install sigaid[langchain] |
| CrewAI | ✅ Supported | pip install sigaid[crewai] |
| AutoGen | ✅ Supported | pip install sigaid[autogen] |
| OpenAI Agents | ✅ Supported | Base package |
SigAid requires an Authority service for registration, leasing, and verification:
| Option | Best For | Setup |
|---|---|---|
| Hosted | Most users | https://api.sigaid.com — sign up |
| Self-hosted | Enterprise / air-gapped | Self-Hosting Guide |
| Mock | Unit tests, CI | Built-in MockAuthority |
from sigaid.testing import MockAuthority
mock = MockAuthority() # In-memory, no network
agent = mock.create_agent(public_key)
lease = mock.acquire_lease(agent.agent_id, "session-1", ttl=300)See Testing Guide for details.
export SIGAID_API_KEY=sk_xxx # Required
export SIGAID_AUTHORITY_URL=https://api.sigaid.com # Optional (default)
export SIGAID_LOG_LEVEL=INFO # Optional- Explicit parameter → 2. Environment variable → 3. Default
# All equivalent when SIGAID_API_KEY is set:
sigaid.wrap(agent)
sigaid.wrap(agent, api_key=os.environ["SIGAID_API_KEY"])Each agent has a unique AgentID derived from its Ed25519 public key:
aid_7Xq9YkPzN3mWvR5tH8jL2cBfA4dE6gS1
└─┬─┘└──────────────┬───────────────┘
prefix base58(pubkey + checksum)
Only one instance per agent can operate at a time. Clone attempts fail immediately:
# Instance A acquires lease
async with client_a.lease():
# Instance B tries to acquire → REJECTED
async with client_b.lease(): # Raises LeaseHeldByAnotherInstance
passTamper-evident log of all agent actions:
Entry 0 Entry 1 Entry 2
┌─────────┐ ┌─────────┐ ┌─────────┐
│ action │──────│ action │──────│ action │
│ hash │ prev │ hash │ prev │ hash │
│ sig │ │ sig │ │ sig │
└─────────┘ └─────────┘ └─────────┘
Complete proof package for third-party verification:
proof = client.create_proof(challenge=service_nonce)
# Contains: agent_id, lease_token, state_head, challenge_response, signature| Feature | Implementation |
|---|---|
| Identity keys | Ed25519 (256-bit) |
| Hashing | BLAKE3 |
| Lease tokens | PASETO v4 (encrypted) |
| Domain separation | Prevents cross-protocol attacks |
| Constant-time comparison | Timing attack prevention |
# Clone and install
git clone https://github.com/trustorno/sigaid.git
cd sigaid
pip install -e ".[dev]"
# Run tests (uses MockAuthority, no network)
pytest tests/ -v
# Type checking
mypy sigaid/
# Linting
ruff check sigaid/cd examples/authority
docker-compose up -d
# Test against local authority
SIGAID_AUTHORITY_URL=http://localhost:8000 pytest tests/integration/| Document | Description |
|---|---|
| API Reference | Authority API specification |
| Self-Hosting Guide | Deploy your own Authority |
| Testing Guide | MockAuthority and test patterns |
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Run tests (
pytest tests/ -v) - Run linting (
ruff check sigaid/) - Submit a Pull Request
MIT License — see LICENSE for details.
Built by Trustorno