Load Memory
Load memory context efficiently at session start.
Purpose
Load relevant memory sections without reading the entire JSON file. Use selective jq queries to extract only needed context.
Step 1: Load Core Identity
jq '{profile, preferences}' memory/memory_index.json
This gives agent identity and communication preferences.
Step 2: Load Active Context
jq '{context, active_tasks: .tasks.active}' memory/memory_index.json
This shows current work state and pending tasks.
Step 3: Load Key Facts
jq '.memory.key_facts' memory/memory_index.json
Important facts the agent should always know.
Step 4: Load Recent Actions
head -50 memory/action_log.txt
Last 50 actions for continuity context.
Step 5: Load Relevant Entities
jq '.entities | map(select(.importance == "critical" or .importance == "high"))' memory/memory_index.json
Only high-importance entities to avoid context bloat.
Step 6: Present Summary
Output a concise memory summary:
## Memory Loaded
**Profile**: [name] - [role]
**Communication**: [style]
**Active Topics**: [list]
**Key Facts**: [count] facts loaded
**Pending Tasks**: [count] tasks
**Recent Actions**: [last 3 actions]
Selective Loading
The agent should NOT load everything. Priority:
- Profile & preferences (always)
- Active context (always)
- Key facts (always)
- Pending tasks (always)
- Entities (high importance only)
- Decisions (only if relevant to current task)
Memory Map
Check memory/memory_map.yaml for custom files to load.
微信扫一扫