One shared memory for a team's connected AI tools

The pilot let a team's AI tools save and find the same background information, with a separate store for each client. The pilot was tested on a private server using separate sessions and access keys. ChatGPT is not connected yet.

Client: A digital agencyTeams adopting AI

CreditCo-built by our founder, as lead developer, with the partner agency's CTO.

One fact, two sessions

A new session can find a fact in the same client's space

A fact saved in one session can be found in the next. It keeps its client space and its source.

Common Memory
Client ANote 001

remember · Writer session

The launch budget
was approved.

Save this decision in Client A's space.

Saved by
Team member A
From
Writer session

Stored with its source

Reader keyAccess check

recall · New session

A new session
asks for the fact.

Client ARead allowed
Client BNo access

It searches only the spaces this key may read.

Client ANote 001

recall · Reader session

The launch budget
was approved.

The same fact, found from a different session.

Saved by
Team member A
From
Writer session

Source kept with it

Client ANote 001

forget · History retained

Fact withdrawn,
history kept.

Launch budget approvedSaved by Team member A · Writer session
Old approval withdrawnInvalid since 12 Mar, 14:20

Kept as history. Marked invalid.

The access rule: a fact belongs to Client A. A session with permission can find it; a key without access cannot. Withdrawing it later keeps the old record and marks it invalid.

About A digital agency

When the team switched between AI tools, the background information did not come with them.

A digital agency used chat assistants, coding assistants and AI agents that do routine tasks. Client knowledge sat in pages in Notion, a shared workspace, and chat threads. The team wanted every tool to start from the same facts, without mixing one client's information with another's.

Client
A digital agencyShared AI memory, co-built with the agency's CTO
Runs on
The team's own server and disk
Keeps track of
Who saved each fact, from which tool and into which space
Can be exported as
Plain text files (Markdown and JSON)

The problem

Every new session meant explaining the same background again

  • One tool didn't know what another learned

    People pasted the same background into each new session, instead of starting from facts the team had already saved.

  • Each client's notes had to stay separate

    The same team worked with several clients, so each client's notes had to be kept apart.

  • Changed facts lost their history

    Decisions were hidden in Notion pages and chats. The team needed to know who saved a fact, and when it stopped being true.

Four kinds of memory space

The memory is shared, but access is checked for each space

Personal, team, client and project memory are kept in separate files. An access key can only read or save where it has been given access.

Access recordAgency team member
Client A and Client B are two separate memory spaces. Access is assigned to this key for each space.
SpaceThis key can
PersonalOne person's notesNo access
TeamShared agency contextRead
Client AThis key's clientRead + save
Client BA different client's fileNo access
ProjectThe launch workRead

The check happens before anything is read or saved, not after the result comes back.

Bring existing knowledge in

Start from what the team has already written

Notion pages and a saved chat archive can be imported. Content that has not changed is skipped next time. Quick notes move into long-term memory every 15 minutes by default.

Take the knowledge with you

It ran on the agency's own server, and the files can be exported

The memory can be exported as plain text files (Markdown and JSON). The team can read and move its records without keeping this service running.

Control and safety

Every request is checked for permission first

Every time a tool reads or saves something, the same service checks it. The tool's access key must allow that action in that space. Each client's memory is also kept in its own database file.

  • Access is denied by default. Missing, wrong or expired keys are refused. A key can be cancelled for one device at a time.
  • Every save is recorded. The person, the tool and the space are saved with it. A fact that is withdrawn stays in the history, with the time it was marked invalid.
  • Keys only travel over protected connections. Access keys are sent over encrypted HTTPS or a private network such as Tailscale.
  • Automatic fact-finding can make mistakes. It is switched off by default. If it is later used to create records in a customer system (CRM) or tasks, a person should approve each one at first.

For technical readers

How the system works

AI tools connect through MCP (Model Context Protocol), an open standard that lets AI tools use other software. The service checks permissions, picks the right memory file and records each save. Notion imports, chat imports and the timer that saves notes use the same service.

MCP-compatible toolsIntended: Claude, Cursor, agents
ChatGPTNot connected · HTTPS + OAuth needed
MCP serverLocal or HTTP connection
Access key checkWho may read or write?
Notion, chat and timer
Memory serviceChecks each requested space
Separate memory filesPersonal · team · client · project
Control databaseUsers, keys and history

Dashed lines show supporting connections, or parts that are paused or not yet built.

In more detail

Technology used (11 parts)Each part of the system, and why it was chosen.
LayerTechnologyWhy it was chosen
ConnectionMCP Python SDK / FastMCPA direct local link for one laptop, or a web connection (HTTP) for a team.
Memorymnemosyne-memory / SQLiteFinds the most relevant facts first, keeps timestamps, and uses one database file per space.
ServicePython 3.12 / Pydantic / structlogHandles permissions, records who saved what and makes repeated saves safe, all in one place.
Control dataSQLAlchemy 2 / SQLiteStores users, access keys, the history of changes and import progress. Larger teams can use a Postgres database instead.
OperationsFastAPI / uvicornStatus checks and a link that Notion calls when pages change. Memory commands only go through MCP.
Quick notesIn-process buffer / optional RedisShort-term notes move into long-term memory on a timer.
ImportsNotion API / local chat archiveFingerprints of content and saved progress stop unchanged content being imported again.
Optional extractionPatterns or an OpenRouter modelPulls facts out of text. Off by default; using an AI model adds cost and needs a person to check the results.
AccessPer-user bearer tokens / HMAC-SHA256The database stores one-way checks of access keys (hashes), rather than the keys themselves. Keys have read and save limits, can be cancelled and expire after 90 days by default.
HostingLinux / systemd / Tailscale or TLS proxyRuns on the team's own server, with backup copies of the database; the recorded setup is for small teams.
Checkspytest / ruff / mypy / GitHub ActionsThe local check runs the same tests as the automatic checks on every code change.
5 engineering decisions that matteredThe problem, what was done, and what it changed.
  1. Separate files still need permission checks

    Our founder built the checks that refuse access unless it is allowed, and the tests for each space. The partner CTO moved the memory to one database file per space and added web routing. A test confirms that one client's key cannot save into another client's memory.

  2. Recall must work outside the writing session

    At first, the memory only searched the session a fact was saved in. The CTO used one fixed session inside each memory store and removed an unsorted backup search, so facts could be found and ranked across tools.

  3. A missing secret must not open access

    Our founder made the web service refuse to start without sign-in checks, unless someone deliberately turns them off. The Notion link refuses requests without its secret key (error 503), and each user only sees the spaces they may read.

  4. Lock notes before moving them

    Our founder changed the quick-note store to take a batch of notes in one step, and to put unfinished notes back after a failure. Three tests cover lost notes, duplicate saves and recovery.

  5. Test on a real server

    The first live server closed its database connections after each session. The CTO found the problem, kept connections open and limited open memory stores to 64.

Testing and build recordHow it was tested, and the build by the numbers.

Quality and reliability

  • The build record reports 109 automated tests in 14 files, running in about 5 seconds without external services or keys.
  • A real web test creates an access key, saves to one client's memory, finds the fact again and refuses access to a second client.
  • The private-server test used separate keys for saving and reading. A request without sign-in was refused (error 401); saving into another client's space was refused (error 403) and created nothing.
  • The CTO's backup script made two backup copies on the live run; both passed checks that they were complete.
  • Automatic fact-finding was tested on only five labelled relationships. That sample is too small to show it is reliably accurate.

By the numbers (build)

  • 21 code changes (commits) in the shared code between 7 and 10 July 2026, on top of earlier groundwork.
  • About 4,400 lines of Python across 40 modules, plus about 2,100 lines of tests.
  • 5 memory commands, 10 command-line tools and 2 import connectors.

Is it a fit?

Could this work for your team?

  • Teams using several AI tools Your team keeps explaining the same background at the start of each session.
  • Agencies and consultancies Your team needs shared knowledge while keeping each client's notes apart.
  • Teams with knowledge in Notion or chat Your team wants to save this knowledge on its own server and be able to export it.
  • What we'd adapt We can adapt the spaces, permissions, imports, fact-finding settings and hosting. ChatGPT access needs additional connection work.

Is your team still pasting the same background into every AI tool?

Conducted by Apurva · Not a sales call