Memory & Context

AI Context & Memory Engineering Practice

Engineer the memory layer of AI agents: optimize context, preserve important information across long conversations, and build persistent memory that evolves over time.

linux-cliLinux CLI
Read the Memory & Context overview
Module 1

Context Management

Learn how to control, compress, and preserve conversational context to keep AI agents accurate and consistent over long sessions.

5
About this challenge

Keep the assembled conversation under the token budget every turn without ever breaking it.

About this challenge

Trim so the facts planted long ago survive while the filler gets sacrificed.

About this challenge

Replace aged out turns with one refreshing summary instead of deleting what they established.

About this challenge

Repair the history a mid-turn cancellation leaves behind so the next turn can proceed.

About this challenge

Run the full context stack over a hundreds-of-turns session: trimming, refreshing summaries, fact survival, and cancellation repair, with a judge rating summary fidelity.

Module 2

Long-Term Memory

Learn how to build persistent memory that saves the right facts, retrieves them in later sessions, updates them when they change, and deletes them on request.

5
About this challenge

Decide what a conversation leaves behind in memory: facts saved with structure, small talk discarded.

About this challenge

Persist memories to disk and retrieve the right ones at session start, ranked and within budget.

About this challenge

Make the newest value of a fact win without destroying the history of what it replaced.

About this challenge

Make a user-requested deletion real: the fact and every copy of it gone from all future sessions.

About this challenge

Run the full memory stack across five sessions of a user's life: facts accumulate, change, and get forgotten on request, with a judge rating the store.

About this path

This path covers how AI agents handle memory: managing context over long conversations, and long-term memory that persists between sessions. The challenges are medium difficulty, so you should be comfortable writing code that calls an LLM API. No earlier experience building agents is needed. The long-term memory module ends with a trial that runs your memory system across five sessions.

Frequently asked questions

4

What will I practice in this path?

2 modules: Context Management and Long-Term Memory.

How many challenges are there, and how hard are they?

10 challenges, all medium.

What does this path run on?

Challenges run on Linux CLI.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.