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) 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.
Level 1+ The Field MUST detect explicit conflicts when a RECORD includes a contradicts relation.
Level 2+ The Field MUST support all three modes and MUST implement at least one automatic detection method beyond explicit relations.
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
}
}
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 |