RECORD
Purpose
RECORD is the only way to add knowledge to shared memory. An agent submits a memory unit — in either draft or committed mode — and the Field validates, stores, and returns the assigned unit with its generated ID and metadata.
Conformance Level
Level 0+ — all conformant implementations MUST implement RECORD.
Request
{
"mode": "draft | committed",
"type": "<MemoryType>",
"content": "<string>",
"intent": {
"purpose": "<string>",
"task_id": "<string | null>",
"question": "<string | null>"
},
"confidence": {
"score": "<number>",
"reason": "<string>",
"evidence": ["<string>"],
"assumptions": ["<string>"]
},
"relations": ["<Relation>"]
}
Required Fields by Mode and Level
| Field | Draft (Level 0+) | Committed (Level 0+) |
|---|---|---|
type | REQUIRED | REQUIRED |
content | REQUIRED | REQUIRED |
intent.purpose | REQUIRED | REQUIRED |
confidence.score | OPTIONAL | OPTIONAL |
confidence.reason | OPTIONAL | OPTIONAL |
relations | OPTIONAL | OPTIONAL |
Confidence is never required, at any level.
Response
{
"status": "accepted | rejected",
"memory_unit_id": "<string>",
"epoch": "<number>",
"conflicts_detected": [<Conflict>],
"rejection_reason": "<string | null>"
}
conflicts_detected embeds the Conflict objects themselves — not bare IDs. A Level 1 Conflict has no id to reference.
Behavioral Requirements
CORE The Field MUST validate the payload against the required fields for the given mode.
CORE If intent.purpose is missing or empty, the Field MUST reject the RECORD with error MISSING_INTENT.
CORE If confidence.score is present, it MUST be between 0.0 and 1.0 inclusive, or the Field MUST reject with INVALID_CONFIDENCE. If present and valid, the Field MUST carry it unchanged onto the committed unit and MUST NOT use it to affect relevance scoring, ordering, or automatic conflict resolution anywhere in the protocol.
CORE The Field MUST generate id, epoch, source, and status for the memory unit. Agents MUST NOT provide these.
CORE For draft mode, the Field MUST set status to "draft". For committed mode, MUST set status to "active".
CORE If relations includes a supersedes entry, the Field MUST set the target unit's status to "superseded", or reject with UNIT_NOT_FOUND if the target doesn't exist. Any agent may supersede any unit.
CORE If relations includes a retracts entry, the Field MUST set the target unit's status to "retracted", or reject with UNIT_NOT_FOUND if the target doesn't exist. Only the target's original author (source.agent_id) may retract it; otherwise the Field MUST reject with RETRACT_NOT_AUTHORIZED.
Level 1+ The Field MUST append the operation to the event log.
Level 1+ If any relations include a contradicts type, the Field MUST create a Conflict object.
Level 1+ The Field MUST also run mechanical conflict detection against existing memory units and return any detected conflicts in conflicts_detected. At Level 2+, this extends to semantic, logical, and temporal detection.
Level 2+ The Field SHOULD evaluate the new unit against active agent subscriptions and push notifications to matching agents.
Partial Failure Handling
- If the event log write succeeds but enrichment (embedding generation) fails, the Field MUST commit the unit with status
"pending_enrichment"and include a warning in the response. - If the event log write succeeds but conflict detection times out, the Field MUST commit the unit and return
"conflicts_detected": []with a"conflict_detection": "deferred"flag.
Example
{
"protocol": "akashik",
"version": "0.1.0",
"id": "msg-002",
"operation": "RECORD",
"agent_id": "researcher-01",
"session_id": null,
"epoch": 1,
"payload": {
"mode": "committed",
"type": "finding",
"content": "European SaaS market for SMB HR tools is growing at 23% CAGR, expected to reach $4.2B by 2027.",
"intent": {
"purpose": "Validate market size assumption for go-to-market strategy",
"task_id": "task-market-sizing",
"question": "Is the European HR SaaS market large enough to justify a dedicated go-to-market?"
},
"confidence": {
"score": 0.82,
"reason": "Based on three independent analyst reports with consistent estimates.",
"evidence": ["https://example.com/report-a", "https://example.com/report-b"],
"assumptions": ["EU AI Act enforcement begins Q3 2026"]
}
}
}
Response:
{
"status": "accepted",
"memory_unit_id": "mem-abc123",
"epoch": 2,
"conflicts_detected": []
}
Error Codes
| Code | Condition | Recoverable |
|---|---|---|
MISSING_INTENT | intent absent or intent.purpose is empty | Yes — resubmit with intent |
INVALID_CONFIDENCE | confidence.score outside 0.0–1.0 range, or confidence present but malformed | Yes — correct and resubmit |
INVALID_TYPE | Unknown or unsupported MemoryType | Yes — use a supported type |
AGENT_NOT_REGISTERED | Operation from an unregistered agent | Yes — call REGISTER first |
UNIT_NOT_FOUND | A supersedes or retracts relation references a nonexistent unit | No |
RETRACT_NOT_AUTHORIZED | A retracts relation was submitted by an agent other than the target's original author | No |