Elydora Docs

Python SDK

The official Elydora SDK for Python 3.10+. Supports both sync and async usage patterns.

Installation

bash
pip install elydora

Quick Start

python
import os

from elydora import ElydoraClient

client = ElydoraClient(
    org_id="org_acme",
    agent_id="agent_underwriter",
    private_key=os.environ["ELYDORA_KEY"],
)

Register an Agent

python
from elydora import get_public_key_base64url

agent = client.register_agent({
    "agent_id": "agent_underwriter",
    "display_name": "Loan Underwriter v2",
    "responsible_entity": "Underwriting Team",
    "integration_type": "sdk",
    "keys": [{
        "kid": "agent_underwriter-key-1",
        "public_key": get_public_key_base64url(os.environ["ELYDORA_KEY"]),
        "algorithm": "ed25519",
    }],
})

print(agent["agent"]["status"])  # 'active'

Submit an Operation

python
record = client.create_operation(
    operation_type="loan.approve",
    subject={"id": "borrower:BRW-2026-0042", "type": "borrower"},
    action={"name": "approve", "type": "decision"},
    payload={"loanId": "LN-2026-001", "amount": 50000},
)

response = client.submit_operation(record)
receipt = response["receipt"]

# receipt is the EAR (Elydora Acknowledgement Receipt)
print(receipt["receipt_id"])   # 'rcpt_xyz789'
print(receipt["seq_no"])       # 42
print(receipt["chain_hash"])   # 'sha256:...'

Verify an Operation

python
result = client.verify_operation(operation_id)

print(result["valid"])                 # True
print(result["checks"]["signature"])   # True
print(result["checks"]["chain"])       # True

Async Usage

python
import os

from elydora import AsyncElydoraClient

client = AsyncElydoraClient(
    org_id="org_acme",
    agent_id="agent_underwriter",
    private_key=os.environ["ELYDORA_KEY"],
)

response = await client.submit_operation(record)
receipt = response["receipt"]

Error Handling

python
from elydora import ElydoraError

try:
    client.submit_operation(record)
except ElydoraError as e:
    print(e.code)     # 'AGENT_FROZEN'
    print(e.message)  # 'Agent is frozen...'

CLI Installation

The Python SDK includes a CLI for one-command installation across all 15 hook integrations in the AI Agent Integration catalog. Interactive installs collect secrets through echo-disabled prompts; automation uses owner-only secret files. See the integration guide for details.

Interactive install
python -m pip install elydora
elydora install --agent claudecode \
  --org_id "your_org_id" --agent_id "your_agent_id" \
  --kid "your_key_id" --base_url "https://api.elydora.com"
Automation with owner-only secret files
python -m pip install elydora
elydora install --agent claudecode \
  --org_id "your_org_id" --agent_id "your_agent_id" \
  --kid "your_key_id" --base_url "https://api.elydora.com" \
  --private_key_file "/secure/path/private.key" \
  --token_file "/secure/path/api.token"

Configuration Options