{"slug": "not-every-memory-belongs-in-apc", "title": "Not Every Memory Belongs in APC", "summary": "A developer argues that agent memory should be split into two layers: APC for durable project facts and APX for runtime state. The APC/APX split prevents repositories from filling with private notes and stale conversation debris while ensuring portable knowledge survives machine or runtime changes. The developer recommends keeping curated memory in .apc/agents/<slug>/memory.md and local runtime memory in ~/.apx/.", "body_md": "A lot of agent setups fail for the same reason: they treat all memory as one bucket.\n\nThat is not what APC and APX are trying to do.\n\nAPC is the portable context layer. It should keep only durable project facts that are safe to share, review, and commit.\n\nAPX is the daily runtime layer. It should keep local agent memory, cross-channel recall, sessions, and other runtime state outside the repo.\n\nThat split matters because different kinds of memory solve different problems.\n\nIf you put everything into APC, the repo fills with private notes, temporary conclusions, and stale conversation debris.\n\nIf you keep everything in APX, the project loses durable knowledge every time a machine, runtime, or session changes.\n\nThe better model is simple: APC stores what the project should remember. APX stores what the runtime needs in order to work.\n\nIn APC, curated memory lives with the project under:\n\n```\n.apc/agents/<slug>/memory.md\n```\n\nThat file is for durable facts tied to the agent's project role. Good examples are:\n\nThis kind of memory is boring in the best way. It is plain Markdown, easy to diff, easy to review, and easy to migrate to another tool.\n\nA reviewer agent might keep something like this:\n\n```\n# Memory - reviewer\n\n## Project facts\n- Prefer findings-first reviews.\n- API compatibility matters more than internal file layout during v0.1.\n\n## Durable decisions\n- Use pnpm, never npm.\n```\n\nThat belongs in APC because another contributor, another IDE, or another runtime should be able to read the same project rule later.\n\nAPX has a different job. It is the runtime and tooling layer, so it keeps machine-local memory where the repo should not.\n\nPer-agent runtime memory lives under:\n\n```\n~/.apx/projects/<project-id>/agents/<slug>/memory.md\n```\n\nThat file is injected into the agent prompt on every call. It is useful for local operational context, owner preferences, and durable notes that help the runtime, but should not automatically travel with the repository.\n\nAPX also has a separate cross-channel memory system:\n\n```\n~/.apx/memory.md\n~/.apx/memory.db\n```\n\nThat layer powers automatic recall across channels. It can remember recent facts, retrieve semantically relevant past messages, and compact long histories without turning the repo into a session dump.\n\nSo APX already tells us something important: not all memory should be committed, and not all memory should be global.\n\nThe mistake teams make is judging memory by file type instead of visibility.\n\nA `memory.md`\n\nfile can still be the wrong place if the content is private, temporary, or unreviewed.\n\nA better rule is:\n\nFor example:\n\nThat last example is the real trap. Raw transcripts feel informative, but they age badly. Future contributors do not need every thought. They need the final durable fact, constraint, or decision.\n\nThis is where the APC/APX split becomes useful instead of abstract.\n\nAPC gives the project one portable place for curated meaning.\n\nAPX gives daily work a local runtime that can keep richer state without leaking it into the repo.\n\nThat means you can switch tools, machines, or runtimes without losing the project contract, while still letting the runtime keep the messy memory it needs.\n\nThe clean workflow is:\n\nNot every memory deserves version control.\n\nBut every durable project fact should have a portable home.", "url": "https://wpnews.pro/news/not-every-memory-belongs-in-apc", "canonical_source": "https://dev.to/agentprojectcontext/not-every-memory-belongs-in-apc-3773", "published_at": "2026-07-07 12:03:53+00:00", "updated_at": "2026-07-07 12:28:18.804638+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["APC", "APX"], "alternates": {"html": "https://wpnews.pro/news/not-every-memory-belongs-in-apc", "markdown": "https://wpnews.pro/news/not-every-memory-belongs-in-apc.md", "text": "https://wpnews.pro/news/not-every-memory-belongs-in-apc.txt", "jsonld": "https://wpnews.pro/news/not-every-memory-belongs-in-apc.jsonld"}}