---
title: "Context and memory · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory
updated: 2026-10-20
licence: "All rights reserved"
---

# Context and memory

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Agents only know what they are given. Keep instructions short and current, show good examples and point agents to documents they can trust.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers ai development playbook: https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory`.

## Required

- [Keep instructions short and current](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/short-current-instructions): Keep the instructions file short, true and up to date. Delete rules that no longer apply.
- [Save lessons in the repository instead of chat](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/lessons-in-repo): When an agent learns something about the project, save it in the repository, where every future session and person can see it.

## Recommended

- [Show examples of good code](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/show-good-examples): Point agents to one or two files that show the patterns to follow, and name them in the instructions file.
- [Give agents documentation they can fetch](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/fetchable-docs): Give agents current documentation for the libraries and services the project uses, instead of relying on what the model remembers.
- [Send wide searches to a subagent](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/subagents-for-side-work): Run work that reads many files or long logs in a subagent or separate session, and bring back only its short summary.

## Optional

- [Use playbooks as references and credit them](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/playbooks-as-references): Point agents to tested playbooks for common work, and ask them to credit the section they used.

- Previous: [Apps built with AI builders](https://agentwranglers.se/playbook/ai-assisted-development/apps-built-with-ai-builders)
- Next: [Measuring and improving](https://agentwranglers.se/playbook/ai-assisted-development/measuring-and-improving)
- [All chapters](https://agentwranglers.se/playbook/ai-assisted-development)
