Base URL: http://127.0.0.1:3847
All POST endpoints require Ed25519 signed requests.
{
"agent_id": "FORGE",
"public_key": "<hex-encoded-Ed25519-SPKI-public-key>",
"payload_hash": "<SHA-256-hex-of-agentId|payloadJSON>",
"signature": "<hex-encoded-Ed25519-signature>",
"timestamp": "2026-06-16T00:00:00.000Z",
"sequence": 1,
"previous_hash": "<previous-entry-hash>",
"payload": { ... }
}Health check. No authentication required.
Response:
{
"status": "ok",
"ledger_length": 3,
"chain_valid": true,
"agents": ["FORGE", "SENTINEL", "LEDGE", "OPERATOR"]
}Get an agent's Ed25519 public key.
Params: name — one of FORGE, SENTINEL, LEDGE, OPERATOR
Response:
{
"agent": "FORGE",
"public_key": "302a300506032b6570032100..."
}Errors:
404— Agent not found
Create a new task. Requires signed request.
Request body (inside payload):
{
"title": "Review schema",
"description": "Audit the task schema for completeness",
"assignee": "SENTINEL"
}Response (201):
{
"task": {
"id": "task-a1b2c3d4",
"title": "Review schema",
"description": "Audit the task schema for completeness",
"assignee": "SENTINEL",
"status": "pending",
"created_at": "2026-06-16T00:00:00.000Z",
"completed_at": null,
"completed_by": null
},
"entry": {
"seq": 4,
"type": "TASK_CREATED",
"agent": "SENTINEL",
"timestamp": "2026-06-16T00:00:00.000Z",
"hash": "abc123...",
"prev_hash": "def456..."
}
}Errors:
400— Invalid input (missing title, invalid assignee)403— Unauthorized agent or invalid signature
List all tasks. No authentication required.
Response:
{
"tasks": [
{
"id": "task-a1b2c3d4",
"title": "Review schema",
"assignee": "SENTINEL",
"status": "pending",
"created_at": "2026-06-16T00:00:00.000Z"
}
]
}Get a specific task. No authentication required.
Response:
{
"task": {
"id": "task-a1b2c3d4",
"title": "Review schema",
"assignee": "SENTINEL",
"status": "pending",
"created_at": "2026-06-16T00:00:00.000Z"
}
}Errors:
404— Task not found
Start a task. Requires signed request from the assigned agent.
Request body: Empty payload {}
Response (200):
{
"task": {
"id": "task-a1b2c3d4",
"status": "in_progress"
},
"entry": {
"seq": 5,
"type": "TASK_ASSIGNED"
}
}Errors:
400— Invalid transition (e.g., starting a completed task)403— Not the assigned agent
Complete a task. Requires signed request from the assigned agent.
Request body: Empty payload {}
Response (200):
{
"task": {
"id": "task-a1b2c3d4",
"status": "completed",
"completed_at": "2026-06-16T01:00:00.000Z",
"completed_by": "SENTINEL"
},
"entry": {
"seq": 6,
"type": "TASK_COMPLETED"
}
}Errors:
403— Not the assigned agent409— Task already completed
Reject a task. Requires signed request from the assigned agent.
Request body: Empty payload {}
Response (200):
{
"task": {
"id": "task-a1b2c3d4",
"status": "rejected"
},
"entry": {
"seq": 6,
"type": "TASK_REJECTED"
}
}Errors:
400— Invalid transition403— Unauthorized agent
View the WORM chain. No authentication required.
Response:
{
"entries": [
{
"seq": 1,
"type": "CHECKPOINT",
"agent": "SYSTEM",
"hash": "5e3aeee...",
"prev_hash": "0000000..."
}
],
"length": 3,
"chain_valid": true,
"chain_error": null
}Verify WORM chain integrity. No authentication required.
Response:
{
"valid": true,
"brokenAt": null,
"error": null
}If chain is broken:
{
"valid": false,
"brokenAt": 5,
"error": "Hash chain broken at seq 5: prev_hash does not match previous entry hash"
}pending ──→ in_progress ──→ completed
│
└──→ rejected
Valid transitions:
pending→in_progresspending→rejectedin_progress→completedin_progress→rejected
Terminal states: completed, rejected (no further transitions)
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad request (invalid input) |
| 403 | Unauthorized (wrong agent or bad signature) |
| 404 | Not found |
| 409 | Conflict (duplicate action) |
| 500 | Internal server error (chain broken) |