MemorySnapshotCapabilityBackground — a background daemon that continuously updates Agent context with information from persistent files.
How It Works
- The background reads user-level persistent files and injects every
.mdfile into the Agent prompt. .mdfiles are the primary path for ambient context injection into Agent behavior.- The Profile UI exposes key memory files (
user_profile.md,user_summary.md) as editable content.
Background Cycle
The background runs sequentially every ~60–90 seconds:save_user_summary()— updatesuser_summary.mdwith a rolling conversation summary.save_user_profile()— updatesuser_profile.mdwith durable user facts.update_agent_prompt()— scans persistent storage and injects all.mdfiles into the live Agent prompt.
What Gets Injected
Only.md files in persistent storage are injected into the Agent prompt. Other file types are stored but not injected:
| File type | Behavior |
|---|---|
.md | Injected into Agent prompt on next cycle |
.json, .txt, .log, .csv, .yaml, .yml | Stored only, not injected |
Writing Context Files
write_file() appends by default. For context files that represent current state (not history), always delete then write to avoid stale content accumulating:
audio_emotion.md, upcoming_schedule.md, and home_state.md.
Reserved Files
Do not write these from custom Abilities — they are owned and managed by the memory background:user_profile.mduser_summary.md
Naming and Size Guidance
- Namespace filenames by feature: use
audio_emotion.md, notcontext.md. - Keep files concise: target under 200 words per injected
.mdfile. - Write current state, not long history logs.
Cleaning Up Stale Context
For ephemeral daemon context, clear stale.md state at daemon startup before the first processing cycle to prevent old context from being injected after reconnect:
Dual-Path Response Model
There are two ways an Ability can affect the Agent:- Ambient path: Write
.mdfiles for background-based prompt injection. The Agent absorbs this context over the next 60–90 seconds and incorporates it naturally into conversation. - Urgent path: Call
send_interrupt_signal()first, thenspeak()for immediate intervention when the Agent needs to act right now.
Editing Memory Files in the Dashboard
In Dashboard → Profile, persistent memory files are visible and editable directly from the UI:user_profile.md— durable user facts (name, role, location, preferences)user_summary.md— rolling summary of recent conversation contextuser_goals.md— user-defined goals the Agent should keep in mind

