Anthesis Memory Envelope Examples
Status: draft
This document shows how Dubnium memory retrieval evidence should appear inside an Anthesis execution envelope. It is intentionally contract-only: Dubnium does not implement Anthesis runtime orchestration here.
Boundary
Dubnium memory service
- stores memories
- filters retrieval candidates
- records retrieval events
- returns memory ids, artifact ids, and retrieval metadata
Anthesis
- authorizes retrieval
- assembles prompts
- decides whether retrieved memory may be used
- records provider decisions
- records validation results
The memory service retrieval event proves that memory was fetched. It does not prove that memory entered the model prompt. Anthesis must record the prompt assembly decision separately.
Envelope Fragment
A governed Anthesis execution envelope should include a memory section shaped like this:
{
"memory": {
"retrieval_request": {
"query": "What is the current Dubnium memory boundary?",
"scope": "project:dubnium",
"allowed_sensitivity": ["internal"],
"require_verified": true,
"limit": 8,
"purpose": "review",
"requester": {
"actor_type": "agent",
"actor_id": "anthesis-reviewer"
},
"envelope_id": "env-20260528-001"
},
"retrieval_event": {
"id": "22222222-2222-4222-8222-222222222222",
"scope": "project:dubnium",
"query": "What is the current Dubnium memory boundary?",
"returned_memory_ids": [
"11111111-1111-4111-8111-111111111111"
],
"returned_artifact_ids": [],
"metadata": {
"allowed_sensitivity": ["internal"],
"require_verified": true,
"limit": 8,
"purpose": "review",
"requester": {
"actor_type": "agent",
"actor_id": "anthesis-reviewer"
},
"envelope_id": "env-20260528-001"
}
},
"prompt_assembly_decision": {
"used_memory_ids": [
"11111111-1111-4111-8111-111111111111"
],
"excluded_memory_ids": [],
"decision": "used",
"reason": "Verified internal project memory matched the authorized scope and review purpose."
}
}
}
Provider Decision Fragment
Memory evidence should sit beside, not inside, the provider decision.
{
"provider_decision": {
"selected_provider": "vllm.local",
"selected_model": "qwen2.5-coder-14b-instruct",
"provider_class": "local",
"cloud_escalation_allowed": false,
"reason": "Review task used verified internal project memory and did not require external context."
}
}
Validation Fragment
Validation should explicitly tie output review to the memory/context decision.
{
"validation": {
"status": "passed",
"checks": [
{
"name": "memory_scope",
"status": "passed",
"details": "All retrieved memory was scoped to project:dubnium."
},
{
"name": "rejected_memory_exclusion",
"status": "passed",
"details": "No rejected memories were returned or used."
},
{
"name": "prompt_assembly_recorded",
"status": "passed",
"details": "Used and excluded memory ids were recorded."
}
]
}
}
Non-Use Case
If memory is retrieved but not used, Anthesis should record that explicitly:
{
"memory": {
"retrieval_event_id": "22222222-2222-4222-8222-222222222222",
"returned_memory_ids": [
"11111111-1111-4111-8111-111111111111"
],
"returned_artifact_ids": [],
"prompt_assembly_decision": {
"used_memory_ids": [],
"excluded_memory_ids": [
"11111111-1111-4111-8111-111111111111"
],
"decision": "excluded",
"reason": "Memory was relevant but unverified; task required verified memory."
}
}
}
Rejected Memory Case
Rejected memory should not appear in normal retrieval events. If a future audit mode retrieves rejected memory, the envelope must make the audit mode explicit:
{
"memory_audit": {
"mode": "audit_rejected_memory",
"normal_prompt_use_allowed": false,
"retrieved_rejected_memory_ids": [
"33333333-3333-4333-8333-333333333333"
],
"reason": "Operator audit of previously rejected cross-scope memory."
}
}
Audit-mode retrieval is future work. Normal prompt assembly must not use rejected memory.
Minimum Envelope Requirements
For any Anthesis-governed run that uses Dubnium memory, record:
- retrieval request
- retrieval event id
- returned memory ids
- returned artifact ids
- prompt assembly decision
- used memory ids
- excluded memory ids
- provider decision
- validation result
This creates a replayable boundary between retrieval, prompt assembly, provider execution, and validation.