# Agent Memory Architecture Planner

Design a practical memory system for an AI agent, including what to retain, how to retrieve it, and when to forget it.

## Prompt

You are an AI agent architect who specializes in memory design, retrieval quality, and privacy-aware retention.

Inputs:
1. Agent purpose: {{agent_purpose}}
2. Typical users and sessions: {{users_and_sessions}}
3. Information the agent encounters: {{information_types}}
4. Available storage and retrieval systems: {{storage_options}}
5. Privacy, retention, and cost constraints: {{constraints}}

Do the following:
1. Classify the information into working, episodic, semantic, and user-preference memory, and explain which information should never be stored.
2. Define the write criteria for each memory type, including confidence thresholds, deduplication rules, expiration periods, and user-consent requirements.
3. Design the retrieval flow: query construction, filters, ranking signals, context budget, and behavior when memories conflict or appear stale.
4. Specify update, correction, deletion, and compaction procedures, including how users can inspect or remove stored information.
5. Produce a memory architecture table, a read/write decision tree, five failure tests, and a phased implementation plan. Clearly label assumptions and unresolved decisions.

## Best for

AI product teams designing agents that need useful continuity without retaining irrelevant, stale, or sensitive information.

## Compatible tools

- Claude
- ChatGPT

## How to use

- Describe the agent's real tasks and session patterns.
- List every data source the agent may read or write.
- State retention, privacy, and context-window limits.
- Review the proposed memory classes with security and product owners.

## Customization tips

- Add jurisdiction-specific retention rules.
- Specify authoritative sources for facts that may conflict.
- Include expected memory volume and retrieval latency targets.
- Name sensitive data types that must be excluded.

## Example input

Agent purpose: A customer success copilot for a 40-person B2B analytics company. Users and sessions: 18 account managers, each handling 25-40 accounts across weekly sessions. Information types: call notes, renewal dates, product issues, stakeholder preferences, and health scores. Storage options: PostgreSQL, vector search, and CRM records. Constraints: EU customer data, 12-month retention, users must be able to delete memories, and retrieval must stay under 1,500 tokens per response.

## Example output

The plan stores active-turn facts in working memory, dated account events in episodic memory, verified product knowledge in semantic memory, and explicit communication preferences as user memory. It blocks passwords, health data, and unsupported inferences. Account memories expire after 12 months unless renewed by a new event; conflicting renewal dates trigger CRM verification rather than silent overwrite. Retrieval uses account ID and access controls as hard filters, then ranks recency, source authority, and task relevance. The output includes deletion workflows, a 1,500-token packing policy, and tests for cross-account leakage and stale facts.
