Python SDK
The official Elydora SDK for Python 3.9+. Supports both sync and async usage patterns.
Installation
bash
pip install elydoraQuick Start
python
from elydora import ElydoraClient
client = ElydoraClient(
org_id="org_acme",
agent_id="agent_underwriter",
private_key=os.environ["ELYDORA_KEY"],
)Register an Agent
python
agent = client.register_agent({
"agent_id": "agent_underwriter",
"display_name": "Loan Underwriter v2",
"responsible_entity": "Underwriting Team",
"keys": [{
"kid": "agent_underwriter-key-1",
"public_key": public_key_base64,
"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) # TrueAsync Usage
python
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 hook installation in supported AI coding tools (Claude Code, Cursor, Gemini CLI, Kiro CLI, Kiro IDE, OpenCode, Copilot CLI, Letta Code). See the AI Agent Integration guide for details.
bash
pip install elydora && elydora install --agent claudecode \
--org_id "your_org_id" --agent_id "your_agent_id" \
--private_key "your_private_key" --kid "your_key_id" \
--token "your_api_token"Configuration Options
- org_id — Your organization identifier (required)
- agent_id — The agent identifier (required)
- private_key — Ed25519 private key in PEM or base64 format (required)
- base_url — API base URL (defaults to production)
- ttl_ms — Default TTL in milliseconds (default: 30000)
- max_retries — Number of retry attempts (default: 3)