Damian Dąbrowski

How much memory does autonomy need?

Full autonomy comes from managed memory: not from saving everything, but from knowing what is current, what matters and what can be let go.

I work on advanced agent systems. Right now I am building Merso: long-term memory that lets an agent remember weeks of work, not just one conversation.

Agenttoday, 7:30
  • remembersresults of 23 tests and assignments since September
  • knowsyou learn best between 7 and 9 am
  • updatedphysics exam moved from 5.06 to 12.06
  • let gooptics: dropped from the exam scope

Your study plan for today

  • You have 3 exams ahead. The nearest is physics, in 12 days.
  • Physics: 41% of the material, 55% chance of passing. This is the biggest risk.
  • Maths: 72%, 86% chance. Chemistry: 58%, 70% chance.
  • Today 50 minutes of physics: dynamics, where your mistakes have repeated for a month. Then 20 minutes of chemistry review.
  • Your exam plan is ready: 11 sessions, hard topics in the morning, when you work best.
AgentMonday, 8:00
  • remembers14 days of work: calendar, tasks, email
  • knowswhat brings clients: videos, referrals, offers
  • updatedNordtech: the decision comes this week
  • let goform for Kowalski: the client said no

What to focus on today

  • Your last two weeks show priorities drifting: 70% of your time went to things that could wait.
  • The Nordtech offer has been sitting for 9 days, and it is your top priority. Finish it today by noon.
  • You can drop the form for Kowalski: Tuesday’s email says there will be no deal.
  • Then record a social media video. Videos bring 34% of your reach and one in five new clients.
Agenttoday, 10:14
  • remembersMark’s 6 orders and 1 return
  • knowswhat he responds to: free delivery yes, discounts no
  • updatedshipping to Germany: live since yesterday
  • let goabandoned cart from May: product discontinued

A regular customer is back after 3 months

  • Mark is looking at running shoes. I suggest size 44: he returned the last pair in 43 as too small.
  • No sneaker discount, he ignored it twice. Free delivery works: with it he buys 3 times more often.
  • He asked about shipping to Germany. It went live yesterday, so I tell him right away.
Agenttoday, 9:05
  • remembersall invoices and contracts from 2 years
  • knowsamendment of 12.05: Alfa’s new rate +8%
  • updatedVAT deadline moved to 25.07
  • let godispute over invoice 04/2026: closed with a correction

Invoices and deadlines

  • The invoice from supplier Alfa is 8% higher than the contract.
  • It matches the amendment of 12 May, so I approve it. No one needs to be asked.
  • Quarterly VAT is due 25.07. 2 documents from Beta are still missing, I reminded them yesterday.
  • Cash covers 74 days. Two large payments arrive in August, so there is no risk.
Agenttoday, 6:40
  • remembersfailure and service history of every machine
  • knowsthe symptoms that came before the March failure
  • updatedCNC no. 3 calibration: 0.03 mm since 17.10
  • let goTuesday’s sensor alarm: false, sensor replaced

Machine status before the first shift

  • CNC mill no. 3: vibration has been rising for 6 days.
  • It is the same pattern that came before the spindle failure in March.
  • I recommend a service on Friday, before the Gamma order, so production does not stop.
  • Last week’s calibration still holds the 0.03 mm tolerance.

Where it applies

Anywhere an agent works with people for longer than one conversation and needs to remember what has already happened.

Mersolong-term memory
  • Personal
    • Personal assistantRemembers your matters, agreements and preferences, so you never explain everything from scratch.
    • Many projects at onceOne assistant knows what you did yesterday in every project and what is still open.
  • Business
    • Software and ITCoding agents know the project history, decisions and bugs already fixed.
    • Customer serviceThe agent knows the customer’s full history, whatever the channel.
    • Sales and e-commerceThe agent knows every customer, their orders, the promises made and what they need next.
    • Finance and accountingThe agent knows every client, their documents and recurring matters.
    • LawA firm’s assistant knows the files, agreements and history of every case.
    • HR and recruitingThe agent knows the candidates, the interviews and the decisions made.
    • ManufacturingThe agent knows the history of machines, failures and settings.
    • LogisticsThe agent knows routes, suppliers and past problems.
    • Marketing and mediaThe agent knows the brand, past campaigns and what worked.
    • Real estateThe agent remembers what the client is looking for and which listings they have seen.
  • Education
    • Schools and tutoringAn AI tutor guides a student through the whole school year.
    • Online coursesThe agent walks a learner through a course and remembers their progress and questions.
  • Healthcare
    • Clinics and careAn assistant knows the patient’s history and course of treatment, with strict access control.

How it works

Saving is easy. Managing is everything.

Most memory systems stop at M and E. Merso is built around R.

Mersocontainer diagram, C4 model, level 2

Merso: container diagram, C4 model, level 2Memorize: After every session the harness sends its record to the gateway on its own. Nothing to do by hand, and the history no longer disappears after 30 days. Extract: Extraction reads new sessions and, with a model, pulls out what matters: facts, decisions, things and how they connect. Reconcile: The heart of the system. Every day the manager compares what is new with what memory already knows: it updates facts (database SQLite → Postgres), merges duplicates and forgets what no longer matters, following rules kept in a readable file. Surface: Every conversation starts with a short briefing, and the agent fetches the rest on demand. Over MCP any tool can read memory, including tools without an adapter. Own: Memory runs on your own Cloudflare account. It is readable and correctable, and switching tools deletes nothing.Merso[System]Memory: factsLivra language: TypeScriptLivra database: SQLitevalid until 21.10Livra database: Postgresnewcurrentchecked by youLivramergedlivraClaude Code[Harness: hooks]Sends each session when it ends,takes a briefing at the start.Codex[Harness: hooks.json]The same session recordthrough a twin adapter.Flue[Harness: TypeScript]An agent on Workers sendssessions and reads memory.Other tools[Harness: MCP]Cursor, Gemini CLI, claude.airead and write over MCP.Gateway[Container: Worker, API + MCP]Takes sessions from harnessesand serves memory over MCP.Memory[Container: D1 + Vectorize]Daily log, dated factsand the links between them.Extraction[Container: Cloudflare Workflow]Pulls out facts, decisions,things and how they connect.AI model[External system]Any of them: Claude,OpenAI or Workers AI.Manager[Container: Cloudflare Workflow]Updates, merges duplicates,forgets, writes the briefing.Memory constitution[File: Markdown]Management rules as areadable file, not code.Memory review[Container: Worker]See what the agent knowsand correct it.You[Person]Owner of the memory,data on your account.sends the session[hook]sends the session[hooks.json]sends the session[HTTPS]stores sessions[SQL]reads,writes facts[SQL]extractsfacts[HTTPS]reconciles withwhat it knows[SQL]readsrulesweighschanges[HTTPS]reads and writes[MCP]serves briefing,searches[SQL]reviewsand correctsedits facts[SQL]drawingContainer diagramnotationC4 model, level 2scopefull MERSO cycle

Memorize. After every session the harness sends its record to the gateway on its own. Nothing to do by hand, and the history no longer disappears after 30 days.

Extract. Extraction reads new sessions and, with a model, pulls out what matters: facts, decisions, things and how they connect.

Reconcile. The heart of the system. Every day the manager compares what is new with what memory already knows: it updates facts (database SQLite → Postgres), merges duplicates and forgets what no longer matters, following rules kept in a readable file.

Surface. Every conversation starts with a short briefing, and the agent fetches the rest on demand. Over MCP any tool can read memory, including tools without an adapter.

Own. Memory runs on your own Cloudflare account. It is readable and correctable, and switching tools deletes nothing.

  • person
  • container: a separately running part of Merso
  • the heart: Reconcile
  • harness or external system
  • system boundary
  • who talks to whom and why, technology in brackets
  • active in the current step

Now in the system

  1. MClaude Code, Codex and Flue end their sessions and send the records.
  2. MThe gateway stores 3 sessions in today’s log.
  3. EExtraction reads the new sessions and asks the model.
  4. ENew fact: the Livra database is now Postgres.
  5. RThe manager reads the rules from the memory constitution.
  6. RFact “database: SQLite” closed: valid until 21.10.
  7. R“livra” and “Livra” merged into one thing.
  8. SA new Claude Code session gets a briefing: 4 sentences.
  9. SCursor asks over MCP about the Livra database and gets: Postgres.
  10. OYou open the memory review.
  11. OYou confirm the fact: Postgres database checked.

Diagram elements

  • Claude Code [Harness: hooks]: Sends each session when it ends, takes a briefing at the start.
  • Codex [Harness: hooks.json]: The same session record through a twin adapter.
  • Flue [Harness: TypeScript]: An agent on Workers sends sessions and reads memory.
  • Other tools [Harness: MCP]: Cursor, Gemini CLI, claude.ai read and write over MCP.
  • Gateway [Container: Worker, API + MCP]: Takes sessions from harnesses and serves memory over MCP.
  • Memory [Container: D1 + Vectorize]: Daily log, dated facts and the links between them.
  • Extraction [Container: Cloudflare Workflow]: Pulls out facts, decisions, things and how they connect.
  • AI model [External system]: Any of them: Claude, OpenAI or Workers AI.
  • Manager [Container: Cloudflare Workflow]: Updates, merges duplicates, forgets, writes the briefing.
  • Memory constitution [File: Markdown]: Management rules as a readable file, not code.
  • Memory review [Container: Worker]: See what the agent knows and correct it.
  • You [Person]: Owner of the memory, data on your account.

Relations

  • Claude Code → Gateway: sends the session [hook]
  • Codex → Gateway: sends the session [hooks.json]
  • Flue → Gateway: sends the session [HTTPS]
  • Gateway → Memory: stores sessions [SQL]
  • Extraction → Memory: reads, writes facts [SQL]
  • Extraction → AI model: extracts facts [HTTPS]
  • Manager → Memory: reconciles with what it knows [SQL]
  • Manager → Memory constitution: reads rules
  • Manager → AI model: weighs changes [HTTPS]
  • Other tools → Gateway: reads and writes [MCP]
  • Gateway → Memory: serves briefing, searches [SQL]
  • You → Memory review: reviews and corrects
  • Memory review → Memory: edits facts [SQL]