AccueilHome / MémoireMemory

La mémoire de mes agents, expliquée simplementMy agents' memory, explained simply

Un modèle d'IA ne se souvient de rien. À chaque nouvelle conversation il repart de zéro. Pour qu'il me connaisse, je lui ai créé une mémoire à trois étages.An AI model remembers nothing. With every new conversation it starts from scratch. For it to know me, I gave it a memory with three layers.

Le problèmeThe problem

Sans mémoire, l'agent oublie toutWithout memory, the agent forgets everything

Ce que je lui ai dit lundi, il ne le sait plus mardi.What I told it on Monday, it no longer knows on Tuesday.

On pourrait lui redonner tout l'historique à chaque message. Mais chaque mot relu coûte du temps et de l'argent. Et plus il en lit, moins il s'y retrouve.It could be given the whole history with every message. But every word reread costs time and money. And the more it reads, the more it gets lost.

Une bonne mémoire lui donne la bonne information, au bon moment.A good memory gives it the right information, at the right time.

Ma solutionMy solution

Comment je construis la mémoire de mes agents : trois couchesHow I build my agents' memory: three layers

1Le post-it sur l'écranThe sticky note on the screen

Les repèresStanding notes

un tout petit fichier : MEMORY.mda tiny file: MEMORY.md

Quelques lignes que l'agent a toujours sous les yeux : qui je suis et comment j'aime travailler. Le fichier est volontairement très court. Ce qui y est écrit est relu à chaque message.A few lines the agent always has in front of it: who I am and how I like to work. The file is deliberately very short. What is written there is reread with every message.

Quand il la litWhen it is read
à chaque messagewith every message
TailleSize
quelques lignesa few lines
2Le classeurThe binder

La documentationDocumentation

des pages de notes : Obsidianpages of notes: Obsidian

Une page par projet : ce qui a été décidé, comment ça marche, le mode d'emploi. Ce sont de simples fichiers texte, synthétiques et tenus à jour à chaque changement. L'agent va y chercher quand il doit être exact. Je peux les lire et les corriger moi-même.One page per project: what was decided, how it works, the how-to. They are plain text files, concise and kept up to date with every change. The agent looks there when it has to be exact. I can read and correct them myself.

Quand il la litWhen it is read
quand il doit être exactwhen it has to be exact
TailleSize
une page par projetone page per project
3Le carnet de souvenirsThe notebook of memories

Les souvenirsMemories

une base de souvenirs : Mem0a memory store: Mem0

Entre deux conversations, un modèle installé sur le Mac relit ce qui a été dit et retient les faits qui durent. Les spécialistes appellent ça le dreaming : un peu comme on range ses souvenirs en dormant. Ce ne sont pas des détails de projet mais ma façon générale de fonctionner. L'agent les retrouve ensuite par le sens et pas par le mot exact.Between two conversations, a model running on the Mac rereads what was said and keeps the facts that last. Specialists call this dreaming: a bit like sorting memories in your sleep. These are not project details but my general way of working. The agent then finds them by meaning, not by exact word.

Quand il la litWhen it is read
quand c'est utilewhen it is useful
TailleSize
grandit avec le tempsgrows over time

À vousYour turn

Une question arrive. Où l'agent va-t-il chercher ?A question comes in. Where does the agent look?

Choisissez une question : la bonne case s'allume ci-dessus.Pick a question: the right box lights up above.