Skip to content
Back

NEUMA

A company's memory, built for AI agents first and for people second. Everything is a block with a stable id, several people edit it live, and agents work in it through an MCP server with exactly their owner's permissions.

Type
Personal
My role
Full design and development
Year
2026
Status
In progress
VideoNEUMA in one minute: finding the exact paragraph, an agent that answers with its source and writes where you work, the team live and the agent's permissions. Everything on screen is the real app.

Why it exists

NEUMA stands for Neural Enterprise Unified Memory & Agents. An AI assistant doesn’t know what a company has already written down: prices, decisions, agreements. NEUMA keeps that memory and puts it within reach of people and their agents. It’s a monorepo with Bun and Turborepo, a NestJS backend on Fastify and a Next.js portal.

Agents first

The decision behind everything is to design NEUMA for agents before people. An agent works with a context budget, acts in loops, has to cite and can’t guess. So it needs more than the tools a person gets.

  • Every piece of knowledge has a stable id the agent can cite.
  • The agent reads and writes block by block, without loading the whole page.
  • It can ask what changed since it last looked.
  • How to use NEUMA is explained by the MCP server itself, in its instructions and each tool’s description, which is what the agent actually reads.

Everything is a block

A page is a block just like a paragraph. That way permissions, moving, linking, versions and the trash are solved once. A change is a transaction over blocks, and full-text search and backlinks are updated in that same transaction, so an agent finds what was written a second ago.

Each page used to be a whole document. Changing the model was a big decision, and it’s written down as an architecture decision record (ADR) next to the other 28.

Live editing

Two people write on the same page at the same time and neither overwrites the other. Each block’s text has its own CRDT with Yjs, which converges on its own even when changes arrive in a different order, and a live channel tells every portal which version changed.

The part that took me longest was authorization. In a stateful channel, checking the permission on connect isn’t enough.

  • Every notice is filtered by the receiver’s actual permission on that block.
  • Every message has a size limit, and a binary frame closes the connection.
  • A client that leaves messages unread is disconnected, so one slow reader can’t make the server hold everything.

An MCP server

Agents come in with scoped personal tokens: every space, one space or a single page, each with its access level. An agent never sees or does more than the token’s owner, and every action is audited. If it asks for something out of reach, it gets a clear refusal.

Architecture as code

I wrote twenty ESLint rules that enforce the structure. A few of them.

  • no-prisma-outside-persistence. Only the persistence layer talks to the database.
  • no-direct-fetch. No loose network calls inside components.
  • no-multi-component. One public component per file.
  • no-constants-outside-dir. Every meaningful value lives in exactly one place.

An agent follows a rule that fails in CI better than an instruction in a prompt. The rules are architecture decisions written so they enforce themselves.

What’s left

NEUMA runs end to end with Docker: database, migrations, backend and portal. It isn’t deployed as a public service. The next step is taking it to a real environment, with stateful sessions and a live channel that can’t be scaled like a stateless API.