AI Agent Integration

Integrate Elydora into your AI agent workflows to create cryptographically signed, tamper-evident records of every autonomous action.

Why AI Agents Need Accountability

Autonomous AI agents make decisions and take actions without direct human oversight. In regulated industries — finance, healthcare, insurance — every agent action must be auditable. Elydora wraps each action in a signed Elydora Operation Record (EOR) that proves what the agent did, when it did it, and that the record has not been altered.

Integration Pattern

The core pattern is straightforward: wrap each agent action with an Elydora operation. Before the agent executes an action, create and submit a signed EOR. After Elydora returns an Elydora Acknowledgement Receipt (EAR), proceed with execution.

Agent Action Loop
while agent is running:
    action = agent.decide_next_action()

    // 1. Create a signed EOR for the action
    eor = elydora.create_operation(
        operation_type: action.type,
        subject: action.target,
        action: action.name,
        payload: action.parameters
    )

    // 2. Submit the EOR to Elydora
    ear = elydora.submit_operation(eor)

    // 3. Execute the action only after receiving the receipt
    result = agent.execute(action)

    // 4. Optionally verify the record
    verification = elydora.verify_operation(ear.operation_id)

Example: LLM Tool-Calling Agent

In an LLM-based agent that uses tool calling, each tool invocation is a natural unit of accountability. Log every tool call as an Elydora operation before executing it.

Tool-Calling Agent Integration
import { ElydoraClient } from '@elydora/sdk';

const client = new ElydoraClient({
  orgId: 'org_acme',
  agentId: 'agent_assistant',
  privateKey: process.env.ELYDORA_KEY,
});

async function handleToolCall(toolName: string, args: Record<string, unknown>) {
  // Create and submit a signed operation record before executing
  const record = client.createOperation({
    type: `tool.${toolName}`,
    payload: { tool: toolName, arguments: args },
  });

  const receipt = await client.submitOperation(record);
  // receipt contains the EAR with receipt_id, seq_no, chain_hash

  // Now execute the tool call
  const result = await executeTool(toolName, args);

  return { result, operationId: receipt.operationId };
}

Raw API Equivalent

Under the hood, the SDK constructs a full EOR and sends it to POST /v1/operations. Here is what the raw request looks like:

bash
curl -X POST https://api.elydora.com/v1/operations \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "op_version": 1,
    "operation_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "org_id": "org_acme",
    "agent_id": "agent_assistant",
    "issued_at": "2026-02-28T14:30:00Z",
    "ttl_ms": 30000,
    "nonce": "x9k2m4p7q1w3",
    "operation_type": "tool.search_database",
    "subject": "customer_records",
    "action": "search",
    "payload": {
      "tool": "search_database",
      "arguments": { "query": "overdue accounts", "limit": 50 }
    },
    "payload_hash": "sha256:b5bb9d8014a0f9b1d61e21e796d78dc...",
    "prev_chain_hash": "sha256:7d793037a0760186574b0282f2f435e7...",
    "agent_pubkey_kid": "kid_ast_001",
    "signature": "base64:ed25519-signature-bytes..."
  }'

Example: Multi-Agent System

In a multi-agent architecture, each agent has its own Ed25519 key pair and its own chain of operations. Register each agent separately, then instantiate a client per agent.

Multi-Agent Setup
import { ElydoraClient } from '@elydora/sdk';

// Each agent gets its own client with its own key pair
const researchAgent = new ElydoraClient({
  orgId: 'org_acme',
  agentId: 'agent_researcher',
  privateKey: process.env.RESEARCHER_KEY,
});

const reviewAgent = new ElydoraClient({
  orgId: 'org_acme',
  agentId: 'agent_reviewer',
  privateKey: process.env.REVIEWER_KEY,
});

// Agent 1: Research agent finds and summarizes data
const researchRecord = researchAgent.createOperation({
  type: 'research.summarize',
  payload: { source: 'quarterly_reports', findings: summaryData },
});
const researchReceipt = await researchAgent.submitOperation(researchRecord);

// Agent 2: Review agent evaluates the research
const reviewRecord = reviewAgent.createOperation({
  type: 'review.evaluate',
  payload: {
    sourceOperationId: researchReceipt.operationId,
    decision: 'approved',
    notes: 'Findings consistent with source data',
  },
});
const reviewReceipt = await reviewAgent.submitOperation(reviewRecord);

Registering Multiple Agents

Before agents can submit operations, register each one with its Ed25519 public key via POST /v1/agents/register.

bash
# Register the research agent
curl -X POST https://api.elydora.com/v1/agents/register \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "agent_researcher",
    "publicKey": "MCowBQYDK2VwAyEA...",
    "label": "Research Agent v1"
  }'

# Register the review agent
curl -X POST https://api.elydora.com/v1/agents/register \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "agent_reviewer",
    "publicKey": "MCowBQYDK2VwAyEB...",
    "label": "Review Agent v1"
  }'

EOR Field Reference

Every EOR submitted to Elydora contains these fields. The SDK auto-generates operation_id, issued_at, nonce, payload_hash, prev_chain_hash, and signature.

Next Steps