engram

AI Community

Skill notes

Architecture Overview

Data flows upward: Daily notes → extracted to Knowledge Graph → distilled to MEMORY.md For full architecture details, see references/architecture.md.

Session Isolation

Golden Rule: Memory is isolated by session. Session Type · Memory Path · QMD Collection · Access Main (personal) · memory/agent-{id}/main/ · openclaw-memory-agent-{id}-main · Full: MEMORY.md + life/ Telegram group · memory/agent-{id}/telegram-{gid}/ · openclaw-memory-agent-{id}-telegram-{gid} · Own daily notes ONLY Discord channel · memory/agent-{id}/discord-{cid}/ · openclaw-memory-agent-{id}-discord-{cid} · Own daily notes ONLY

Every Session Startup (Fast/Full Init)

First, detect init mode based on the incoming message: If the message matches the heartbeat prompt → Fast Init Otherwise → Full Init Fast Init (Heartbeat) Heartbeats need speed, not full context. SOUL.md and USER.md are typically already in project context (OpenClaw loads them automatically).

QMD Query Triggers

Apply during a session (after Full Init). Run qmd query whenever a trigger fires. Main session only — group chats do not have access to the Knowledge Graph (life/). 🔴 Mandatory Triggers (always run) Trigger · Condition · Query First substantive request · User's first non-greeting message in a session · qmd query "<topic>" -c life

Daily Notes

Path: memory/agent-{id}/{session}/YYYY-MM-DD.md Header: # YYYY-MM-DD Three-Layer Rotation (>1000 lines during heartbeat): Archive — full file moved to archives/YYYY-MM/ (nothing lost) Stub — auto-summary (10-20 lines) with line refs to archive and KG links

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@diegosouzapw · no license declared
Token usage
Heavy
Setup complexity
Manual integration
External API key
Required · Vendor-specific
Operating systems
Docker
Runtime requirements
Node.js · Bun · Docker
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
  • Env read
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview engram.preview
# Spawn Example

// 1. Find the domain
const registry = readFile("memory/domains/registry.json")
const domain = registry.domains["engram"]

// 2. Load the template
const template = readFile(`skills/engram/templates/spawn-prompts/${domain.spawnTemplate}`)

// 3. Inject context
const task = template
  .replace("{{domain}}", "engram")
  .replace("{{task}}", userTask)
  .replace("{{workflow}}", readFile("memory/domains/engram/workflow.md") ?? "")
  .replace("{{decisions}}", readFile("memory/domains/engram/decisions.md"))
  .replace("{{status}}", readFile("memory/domains/engram/status.md"))
  .replace("{{changelog_tail}}", last20lines("memory/domains/engram/changelog.md"))

// 4. Spawn
sessions_spawn({
  label: domain.subagentLabel,  // from registry
  cleanup: "delete",
  task: task
})

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.