BLOG

A Low-Cost Team Memory for Claude Agents on AWS

21 November 2026

By P. G. Stevenson. Adapted from a post on LinkedIn, 21 November 2026. The LinkedIn post was written by me; this longer version was adapted from it with AI assistance.

Managing the context window is an effective way to guide your agent to the right information, so it can do its job efficiently. The less time an agent spends searching for what it needs, the more of its effort goes into the task itself.

Start with CLAUDE.md

A very easy way to manage context is to describe your project in a CLAUDE.md file: what the project is, how it is laid out, the commands that build and test it, and the conventions it follows. The agent reads it at the start of every session.

The catch is keeping it current. A description that has drifted away from the code is worse than none. To deal with this, I have skills that update CLAUDE.md with the relevant information after each code change, so the file keeps pace with the project.

Memory that tidies itself

I recently watched a conference presentation by an Anthropic employee on Claude Dreams. The idea is that the agent reads an existing memory store alongside past session transcripts, then produces a new, reorganised memory store:

  • duplicates are merged,
  • stale or contradicted entries are replaced with the latest value, and
  • new insights are surfaced.

A low-cost version on AWS

My use case is very small scale, and I didn't want to pay for this. So I provisioned and deployed a simpler, low-cost take on the same idea to AWS. It creates a team memory store and logs agent traces for future analysis. There is no automatic merge-and-refresh pass: agents keep the memories tidy through the normal tools, and only nominated curator agents can change the shared knowledge.

Claude Code / Agent SDK ──Bearer token──┐
                                        ├─> API Gateway ─> Lambda (MCP server) ─> S3 (versioned *.md files)
claude.ai custom connector ──OAuth──────┘

The memories are plain Markdown files saved in a versioned S3 bucket, and agents reach them through an MCP server running on Lambda. Because the files are plain text, they are easy to read, compare and audit, and S3 versioning means any change can be undone. Session traces are stored in the same bucket, ready to be analysed later.

Built for teams

The team features allow for a centralised, curated repository of knowledge files, so a team of users or agents have simultaneous access to current knowledge:

  • Curated shared knowledge. Every agent can read everything, but only curator agents can write to the shared area. Each agent also has its own area for working notes.
  • No silent overwrites. Replacing a file requires the version the agent last read. If another agent changed it in the meantime, the write is rejected, and the agent merges its update into the newer content and tries again.
  • Attributed changes. Each write records which agent made it and when.

So far, it's very low cost and working well. The code is on GitHub if you'd like to try it: pgstevenson/aws-team-memory.