REPLAY
Purpose
REPLAY reconstructs the causal event timeline for any entity in the Field — a task, a decision, a memory unit, a conflict, or a session. It reads from the append-only event log and returns the sequence of operations and memory units that led to the current state.
This is the primary auditability mechanism in the Akashik Protocol. Any agent or human can replay the reasoning chain behind any decision.
Conformance Level
Level 1+ — Level 0 implementations MAY omit REPLAY. Reconstructing an ordered event timeline, including supersession chains, requires only the append-only log Level 1 already mandates — no embeddings or semantic scoring.
Request
{
"target_type": "task | memory_unit | decision | conflict | session",
"target_id": "<string>",
"depth": "summary | detailed | full_trace"
}
| Field | Required | Description |
|---|---|---|
target_type | ✓ | The type of entity to replay. |
target_id | ✓ | The ID of the entity to reconstruct. |
depth | ✓ | How much detail to include in the response. |
Depth Levels
| Depth | Description |
|---|---|
summary | A human-readable summary and list of involved agents (Level 2+). At Level 1, MAY return just the raw timeline and event count. |
detailed | Key events with memory unit IDs and timestamps. |
full_trace | Every event in the causal chain, in epoch order. Required from Level 1+. |
Response
{
"status": "ok",
"timeline": ["<ReplayEvent>"],
"summary": "<string>",
"agents_involved": ["<string>"],
"total_events": "<number>"
}
ReplayEvent
{
"epoch": "<number>",
"event_type": "<string>",
"agent_id": "<string>",
"description": "<string>",
"memory_unit_id": "<string | null>",
"task_id": "<string | null>"
}
Behavioral Requirements
Level 1+ The Field MUST reconstruct the event timeline by reading from the append-only event log. Reconstructing from mutable state is not permitted.
Level 1+ At "full_trace" depth, the Field MUST return every event in the causal chain in epoch order.
Level 1+ When target_type is "memory_unit" and the target has been superseded — in either direction, it superseded something or was itself superseded — the Field MUST follow the supersedes relation chain to its end and include every unit in that chain in the timeline, not just the target itself.
Level 1+ At "summary" depth, the Field MAY return only the timeline and total_events, omitting summary text and agents_involved.
Level 2+ At "summary" depth, the Field MUST return a human-readable summary and the list of agents_involved, in addition to the raw timeline.
Level 1+ If the reasoning chain is too large to reconstruct in a single response, the Field MUST return error REPLAY_TOO_LARGE rather than a partial result. The agent SHOULD retry with "summary" or "detailed" depth.
Example
Replay the reasoning for a conflict:
{
"protocol": "akashik",
"version": "0.1.0",
"id": "msg-040",
"operation": "REPLAY",
"agent_id": "auditor-01",
"session_id": null,
"epoch": 40,
"payload": {
"target_type": "conflict",
"target_id": "conflict-001",
"depth": "detailed"
}
}
Response:
{
"status": "ok",
"summary": "Conflict between two market growth estimates. researcher-01 recorded 23% CAGR; researcher-02 recorded 14% CAGR with contradicts relation. Resolved by strategist-01 using confidence_weighted strategy at epoch 21.",
"agents_involved": ["researcher-01", "researcher-02", "strategist-01"],
"total_events": 4,
"timeline": [
{ "epoch": 2, "event_type": "RECORD", "agent_id": "researcher-01", "description": "Recorded finding: 23% CAGR", "memory_unit_id": "mem-002", "task_id": "task-market-sizing" },
{ "epoch": 11, "event_type": "RECORD", "agent_id": "researcher-02", "description": "Recorded contradicting finding: 14% CAGR", "memory_unit_id": "mem-010", "task_id": null },
{ "epoch": 11, "event_type": "CONFLICT_CREATED", "agent_id": "system", "description": "Explicit conflict created from contradicts relation", "memory_unit_id": null, "task_id": null },
{ "epoch": 21, "event_type": "MERGE", "agent_id": "strategist-01", "description": "Resolved via confidence_weighted: mem-002 prevails", "memory_unit_id": "mem-002", "task_id": null }
]
}
Error Codes
| Code | Condition | Recoverable |
|---|---|---|
UNIT_NOT_FOUND | target_id references a nonexistent entity | No |
REPLAY_TOO_LARGE | Reasoning chain exceeds response size limits | Yes — use summary or detailed depth |
AGENT_NOT_REGISTERED | agent_id is not a registered active agent | Yes — call REGISTER first |
UNSUPPORTED_OPERATION | REPLAY called against a Level 0 Field | No |