Flows category icon
Memory & Context
Intermediate

Memory Write Policies

Decide what gets remembered: write gates, provenance, confidence, and validation - because memory quality is set at write time.

4 steps12 verify checks60-90 minutesWorks with: emergent · chatgpt · claude · cursor
Start Guided Walkthrough

The Route

0/4 verified

Context Pack

Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.

Context Pack
PROJECT CONTEXT:
My agent's memory fills with trivia, duplicates, and things that later turn out false. Memory-system research is blunt: recall cannot fix what careless writing ruined - the write path needs policy, provenance, and validation.

GOAL:
Implement a write policy layer: criteria gates, provenance and confidence metadata, contradiction checks, and write-time validation.

REQUIREMENTS:
- Written criteria for memorable vs not-memorable content
- Every memory entry carries provenance (source, session, date) and confidence
- Contradiction detection: new writes checked against existing memory
- Validation rules per memory type (facts vs preferences vs recipes)
- A quarantine path for low-confidence writes pending confirmation

CONSTRAINTS:
- Treat memory writes like untrusted input - validate, never just append
- When new information contradicts old, resolve explicitly; never store both silently

DEFINITION OF DONE:
- Trivial/ephemeral content is rejected by the gate with a logged reason
- Every stored entry shows provenance and confidence on inspection
- A contradicting write triggers resolution (supersede, reject, or flag), not silent coexistence
- Low-confidence entries live in quarantine until confirmed by a second observation

COMMON FAILURES TO AVOID:
- Remembering everything, so recall drowns in noise
- No provenance, so bad memories cannot be traced or trusted
- Contradictory facts accumulating until the agent's worldview is incoherent
- Single-observation 'facts' treated with the same trust as confirmed ones

Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.

Related routes

More Memory & Context flows that share ground with this one.

Flows category icon
Memory & Context

Add File-Based Persistent Memory

Give your agent durable memory with plain files - the radical-minimalism approach production practitioners keep converging on.

01Design the memory file structure
02Load memory at session start
03Build the guarded memory_update tool

+1 more steps to Done

Best foryour first pass at this - no prior setup assumed

4 steps45-75 minutesBeginner
Flows category icon
Memory & Context

Session Summaries That Survive Compaction

Write durable session summaries at the right moments so knowledge outlives compaction and process restarts.

01Define what deserves to survive
02Write at the moments that matter
03Load summaries into new sessions

+1 more steps to Done

Best forbuilders who have shipped a basic app before

4 steps60-90 minutesIntermediate
Flows category icon
Memory & Context

Cross-Session Project State

Keep long-horizon work coherent across many sessions: externalized project state that any session can load, advance, and hand off.

01Design the project-state document
02Implement the session-start protocol
03Implement the session-end advance

+1 more steps to Done

Best forproduction-grade builds with strict verification

4 steps90-120 minutesAdvanced

Made with Emergent