DETECT
Purpose
DETECT allows agents or the Field itself to identify contradictions between memory units. Conflicts may be detected explicitly (via contradicts relations in RECORD), mechanically at Level 1+ (shared scoping key, disagreeing field values, no embeddings), or automatically through semantic, logical, or temporal analysis at Level 2+.
Conformance Level
Level 1+ — Level 0 implementations MAY omit DETECT.
Request
{
"mode": "check | scan | list",
"target_id": "<string | null>",
"filter": {
"status": ["<string>"],
"types": ["<string>"],
"involving_agents": ["<string>"]
}
}
| Field | Required | Description |
|---|---|---|
mode | ✓ | Detection mode. See modes below. |
target_id | Required for check mode. The memory unit to check. | |
filter | Optional filters for list and scan modes. |
Modes
| Mode | Description | Required Level |
|---|---|---|
list | Return all known conflicts matching the filter. | 1+ |
check | Check a specific memory unit against the Field for contradictions. Requires target_id. | 1+ (MAY support) |
scan | Run conflict detection across all memory units in scope. | 2+ |
Response
{
"status": "ok",
"conflicts": ["<Conflict>"],
"scan_coverage": {
"units_scanned": "<number>",
"new_conflicts_found": "<number>"
}
}
Behavioral Requirements
Level 1+ The Field MUST support list mode, MUST detect explicit conflicts when a RECORD includes a contradicts relation, and MUST implement mechanical detection (see below). The Field MAY support check and scan modes at Level 1.
Level 2+ The Field MUST support all three modes and MUST implement at least one automatic detection method beyond explicit relations and mechanical detection.
Mechanical Detection (Level 1+)
Two committed units are in conflict if they share a common scoping key (e.g. the same topic within content, however the implementation identifies "the same subject") and disagree on the value of at least one other shared field, where that value is a primitive (string, number, or boolean).
This requires no embeddings, no LLM calls, and no configuration — it is a deterministic key-value comparison, which is why it belongs at Level 1 rather than Level 2. Detected pairs are reported with detected_by: "mechanical" and conflicting_fields listing the disagreeing keys.
Automatic Detection Methods (Level 2+)
| Method | Description |
|---|---|
semantic | Memory units with high embedding similarity but opposing claims are flagged. |
logical | A finding's assumptions contradict another finding's content. |
temporal | A newer, lower-confidence finding contradicts an established, higher-confidence finding. |
The protocol does not prescribe specific thresholds or algorithms for automatic detection. These are implementation choices documented by the implementor.
Example
Check for conflicts involving a specific unit:
{
"protocol": "akashik",
"version": "0.1.0",
"id": "msg-015",
"operation": "DETECT",
"agent_id": "analyst-01",
"session_id": null,
"epoch": 15,
"payload": {
"mode": "check",
"target_id": "mem-002"
}
}
Response:
{
"status": "ok",
"conflicts": [
{
"id": "conflict-001",
"type": "factual",
"status": "detected",
"unit_a": "mem-002",
"unit_b": "mem-010",
"description": "Conflicting market growth estimates: 23% CAGR vs 14% CAGR",
"detected_by": "explicit"
}
],
"scan_coverage": {
"units_scanned": 1,
"new_conflicts_found": 0
}
}
This response shows the Level 2+ shape, where id, type, and status are populated. At Level 1, a mechanically detected conflict omits those fields and includes conflicting_fields instead — see Conflict.
Error Codes
| Code | Condition | Recoverable |
|---|---|---|
UNIT_NOT_FOUND | target_id references a nonexistent memory unit | No |
AGENT_NOT_REGISTERED | agent_id is not a registered active agent | Yes — call REGISTER first |
UNSUPPORTED_OPERATION | scan or check mode not supported at this conformance level | No |