Semantic DAG
The Directed Acyclic Graph (DAG) is Mayros's immutable audit trail. Every meaningful action — memory writes, mission transitions, knowledge graph mutations, fuel events — is recorded as a cryptographically signed DAG node. Once committed, actions cannot be altered or deleted without detection.
Why it Matters
- Auditability — every action has a permanent, tamper-evident record
- Accountability — each node is signed with the author's Ed25519 key
- Time-travel — reconstruct the exact state of the knowledge graph at any past point
- Verification — prove that a specific action happened, when, and by whom
- Diffing — compare state between any two points in history
How it Works
Each DAG action contains:
| Field | Description |
|---|---|
hash | Content-addressable hash of the action |
author | Node ID that created the action |
seq | Sequence number within the author's chain |
timestamp | When the action was committed |
payload_type | Type of action (e.g. triple:add, mission:transition) |
payload_summary | Human-readable description |
parents | Hash(es) of parent action(s) — forms the DAG structure |
signature | Ed25519 signature over the action content |
Actions form a DAG by referencing their parent hashes. Tips are the frontier — the latest actions with no children yet.
CLI Reference
10 subcommands under mayros dag. See the full CLI reference for detailed usage.
| Command | Description |
|---|---|
dag tips | Show current DAG tip hashes (frontier) |
dag action <hash> | Inspect a specific action by hash |
dag history <subject> | Action history for a subject |
dag chain <author> | Action chain for an author/node |
dag stats | DAG statistics (action count, tip count) |
dag prune | Prune old actions with configurable retention policies |
dag at <hash> | Time-travel: reconstruct state at a specific action |
dag diff <from> <to> | Diff between two action hashes |
dag export | Export DAG as DOT, Mermaid, or JSON |
dag verify <hash> | Verify Ed25519 signature of an action |
MCP Tools
10 DAG tools are exposed via the MCP Server:
| Tool | Description |
|---|---|
mayros_dag_tips | Get current DAG tip hashes |
mayros_dag_action | Inspect a specific action |
mayros_dag_history | Action history for a subject |
mayros_dag_chain | Action chain for an author |
mayros_dag_stats | DAG statistics |
mayros_dag_prune | Prune old actions |
mayros_dag_time_travel | Reconstruct state at a point in time |
mayros_dag_diff | Diff between two actions |
mayros_dag_export | Export DAG as DOT, Mermaid, or JSON |
mayros_dag_verify | Verify Ed25519 signature |
Configuration
The DAG is enabled by default. To disable it, set in mayros.json:
json5{ cortex: { dag: { enabled: false } } }
Quick Examples
bash# See the latest actions at the frontier mayros dag tips # Inspect what happened in a specific action mayros dag action abc123def456 # View the full history for a subject mayros dag history "venture:security-audit" --limit 50 # Time-travel to see state at a past point mayros dag at abc123def456 # Compare two points in history mayros dag diff abc123 def456 # Verify an action's signature mayros dag verify abc123def456 --public-key <hex-or-base64> # Export the full DAG as a Mermaid diagram mayros dag export --format mermaid # Prune old actions, keeping the last 1000 mayros dag prune --policy keep_last --value 1000 --checkpoint
Related
- DAG CLI Reference — detailed command reference
- Kaneru Ventures — every mission transition is DAG-committed
- Cortex — the knowledge graph backend that stores DAG data