Akashik Protocol
Operations

REPLAY

Reconstruct the full reasoning chain for a task, decision, or memory unit.

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 2+ — Level 0 and Level 1 implementations MAY omit REPLAY.

Request

{
  "target_type": "task | memory_unit | decision | conflict | session",
  "target_id": "<string>",
  "depth": "summary | detailed | full_trace"
}
FieldRequiredDescription
target_typeThe type of entity to replay.
target_idThe ID of the entity to reconstruct.
depthHow much detail to include in the response.

Depth Levels

DepthDescription
summaryA human-readable summary and list of involved agents. Lightweight.
detailedKey events with memory unit IDs and timestamps.
full_traceEvery event in the causal chain, in epoch order.

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 2+ The Field MUST reconstruct the event timeline by reading from the append-only event log. Reconstructing from mutable state is not permitted.

Level 2+ At "summary" depth, the Field MUST return at minimum a human-readable summary and the list of agents_involved.

Level 2+ At "full_trace" depth, the Field MUST return every event in the causal chain in epoch order.

Level 2+ 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

CodeConditionRecoverable
UNIT_NOT_FOUNDtarget_id references a nonexistent entityNo
REPLAY_TOO_LARGEReasoning chain exceeds response size limitsYes — use summary or detailed depth
AGENT_NOT_REGISTEREDagent_id is not a registered active agentYes — call REGISTER first
UNSUPPORTED_OPERATIONThis conformance level does not support REPLAYNo