Getting Started
Go from zero to a verified operation record in under five minutes.
1. Create an Account
Register your organization to get API credentials.
# Step 1: Register via Better Auth
curl -X POST https://api.elydora.com/api/auth/sign-up/email \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your-secure-password",
"name": "Admin User"
}'
# Step 2: Issue an API token for SDK use
# (After logging in via the console or POST /api/auth/sign-in/email)
curl -X POST https://api.elydora.com/v1/auth/token \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-session-token>" \
-d '{"ttl_seconds": 7776000}'2. Install an SDK
Choose your language and install the Elydora client library. If you use one of the 15 hook integrations in the AI Agent Integration catalog, skip to the one-command install.
# Node.js
npm install @elydora/sdk
# Python
pip install elydora
# Go
go get github.com/Elydora-Infrastructure/Elydora-Go-SDK/v23. Initialize the Client
Configure the client with your organization ID, agent ID, and private key.
import { ElydoraClient } from '@elydora/sdk';
const client = new ElydoraClient({
orgId: 'org_acme',
agentId: 'agent_underwriter',
privateKey: process.env.ELYDORA_KEY,
});4. Register an Agent
Before submitting operations, register the agent with its Ed25519 public key.
const agent = await client.registerAgent({
agent_id: 'agent_underwriter',
display_name: 'Loan Underwriter v2',
responsible_entity: 'Underwriting Team',
integration_type: 'sdk',
keys: [{
kid: 'agent_underwriter-key-1',
public_key: client.getPublicKey(),
algorithm: 'ed25519',
}],
});
console.log(agent.agent.status); // 'active'5. Submit an Operation
Create and submit a signed operation record. The SDK signs the record, computes the chain hash, and generates the nonce.
const record = client.createOperation({
operationType: 'loan.approve',
subject: { id: 'borrower:BRW-2026-0042', type: 'borrower' },
action: { name: 'approve', type: 'decision' },
payload: { loanId: 'LN-2026-001', amount: 50000 },
});
const { receipt } = await client.submitOperation(record);
// receipt is the Elydora Acknowledgement Receipt (EAR)
// receipt.chain_hash is the Elydora Chain Hash (ECH)6. Verify the Record
Verify that a submitted operation is intact and correctly chain-linked.
const verification = await client.verifyOperation(receipt.operation_id);
console.log(verification.valid); // trueComplete Example: Logging an AI Agent Decision
This end-to-end Node.js script demonstrates the full lifecycle: creating a client, constructing an EOR with real fields, signing and submitting the operation, receiving an EAR, and verifying the record.
import { ElydoraClient } from '@elydora/sdk';
async function main() {
// 1. Create the client with your org, agent, and private key
const client = new ElydoraClient({
orgId: 'org_acme',
agentId: 'agent_underwriter',
privateKey: process.env.ELYDORA_KEY,
});
// 2. Construct an operation record for a loan approval decision
// The SDK auto-generates: operation_id, issued_at, nonce,
// payload_hash, prev_chain_hash, and signature.
const record = client.createOperation({
operationType: 'loan.approve',
subject: { id: 'borrower:BRW-2026-0042', type: 'borrower' },
action: { name: 'approve', type: 'decision' },
payload: {
loanId: 'LN-2026-001',
borrowerId: 'BRW-2026-0042',
amount: 50000,
currency: 'USD',
term: '30y',
interestRate: 6.25,
riskScore: 'A2',
approvalReason: 'Debt-to-income ratio within threshold',
},
});
// The full EOR that gets submitted contains all 15 fields:
// op_version, operation_id, org_id, agent_id, issued_at,
// ttl_ms, nonce, operation_type, subject, action, payload,
// payload_hash, prev_chain_hash, agent_pubkey_kid, signature
// 3. Submit the signed EOR to Elydora (POST /v1/operations)
const { receipt } = await client.submitOperation(record);
console.log('Operation submitted successfully');
console.log(' operation_id:', receipt.operation_id);
console.log(' receipt_id: ', receipt.receipt_id);
console.log(' seq_no: ', receipt.seq_no);
console.log(' chain_hash: ', receipt.chain_hash);
// 4. Verify the operation (POST /v1/operations/:id/verify)
const verification = await client.verifyOperation(receipt.operation_id);
console.log('Verification result:', verification.valid);
console.log(' signature:', verification.checks.signature);
console.log(' chain: ', verification.checks.chain);
console.log(' receipt: ', verification.checks.receipt);
}
main().catch(console.error);What Gets Sent to the API
The SDK constructs the following EOR and sends it to POST https://api.elydora.com/v1/operations:
{
"op_version": "1.0",
"operation_id": "0195f2c6-8f4e-7a1b-9c3d-2e4f6a8b0c1d",
"org_id": "org_acme",
"agent_id": "agent_underwriter",
"issued_at": 1772287200000,
"ttl_ms": 30000,
"nonce": "qL3xV9pZ2mK8wR4t",
"operation_type": "loan.approve",
"subject": { "id": "borrower:BRW-2026-0042", "type": "borrower" },
"action": { "name": "approve", "type": "decision" },
"payload": {
"loanId": "LN-2026-001",
"borrowerId": "BRW-2026-0042",
"amount": 50000,
"currency": "USD",
"term": "30y",
"interestRate": 6.25,
"riskScore": "A2",
"approvalReason": "Debt-to-income ratio within threshold"
},
"payload_hash": "<base64url SHA-256 of the canonical payload>",
"prev_chain_hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"agent_pubkey_kid": "agent_underwriter-key-1",
"signature": "<base64url Ed25519 signature>"
}The EAR Response
Elydora responds with an Elydora Acknowledgement Receipt confirming the operation was received and sequenced:
{
"receipt_version": "1.0",
"receipt_id": "0195f2c6-9a2b-7c4d-8e1f-3a5b7c9d1e2f",
"operation_id": "0195f2c6-8f4e-7a1b-9c3d-2e4f6a8b0c1d",
"org_id": "org_acme",
"agent_id": "agent_underwriter",
"server_received_at": 1772287201000,
"seq_no": 42,
"chain_hash": "<base64url chain hash>",
"queue_message_id": "<queue message id>",
"receipt_hash": "<base64url receipt hash>",
"elydora_kid": "<Elydora signing key id>",
"elydora_signature": "<base64url Ed25519 signature>"
}Next Steps
- Read the API Reference for the full endpoint documentation
- Understand the Elydora Responsibility Protocol and its cryptographic guarantees
- Configure RBAC roles for your team
- Review the Security page for key management best practices
- See the AI Agent Integration guide for framework-specific patterns
- Explore the Dashboard Guide to manage agents and operations through the console