CCode Story: Insights from Startup Tech Leaders
← All frameworks
Innovation

Decoupled Shared Agent Memory

Give heterogeneous agents one concurrent, independently operated memory layer

Difficulty
Advanced
Time to result
~months to results
Steps
6
Confidence
93%

Decoupled Shared Agent Memory treats organizational memory as independent infrastructure rather than a component embedded inside each agent runtime. A standalone memory process owns the shared knowledge graph and exposes it through a common interface such as MCP. Agents built with different frameworks connect as clients, allowing them to read and grow the same state concurrently without being forced into one Python runtime or framework. Decoupling changes the system from several isolated agent-memory pairs into many interchangeable clients surrounding one governed memory layer. This enables cross-agent continuity and independent evolution, but it also introduces distributed-systems concerns such as competing requests, retries, idempotency, consistency, and network failure that must be designed explicitly.

Origin

At Cogny, Daulet Amirkhanov encountered companies using graph-based semantic memory across employees and multiple agent frameworks. He worked on separating the MCP layer so one shared memory system could serve multiple clients rather than remaining coupled to an individual runtime.

Core principles

  • 01Separate memory infrastructure from individual agent runtimes
  • 02Provide one stable interface to heterogeneous agent frameworks
  • 03Maintain a shared knowledge graph rather than isolated stores
  • 04Support concurrent reads and writes explicitly
  • 05Let memory and agent clients evolve independently

How to run it

  1. 1

    Map the shared knowledge boundary

    Determine which facts, relationships, and history must remain consistent and accessible across agents.

    Pro tip Keep transient reasoning local while centralizing durable organizational knowledge.

    Watch out Centralizing every intermediate artifact can create unnecessary contention and privacy exposure.

  2. 2

    Extract memory from agent runtimes

    Place the knowledge graph and its lifecycle in a standalone service instead of embedding a separate store in each framework.

    Pro tip Define ownership of schemas, migrations, and retention at the memory-service level.

    Watch out Do not leave hidden framework-specific state that other agents require but cannot access.

  3. 3

    Standardize the client interface

    Expose common read, write, and update operations through a framework-neutral protocol such as MCP.

    Pro tip Keep the contract stable even when the underlying storage implementation changes.

    Watch out A nominally common interface can still leak assumptions from one favored framework.

  4. 4

    Connect heterogeneous agents

    Integrate each agent framework as an independent client of the shared layer and verify equivalent access semantics.

    Pro tip Use contract tests across every supported client implementation.

    Watch out Do not assume different frameworks represent identities, sessions, or updates identically.

  5. 5

    Engineer concurrent behavior

    Define how simultaneous requests, duplicate operations, retries, and conflicting updates are handled.

    Pro tip Use idempotent operations and explicit conflict policies where possible.

    Watch out A local-memory design may appear correct until real network failures and competing requests occur.

  6. 6

    Validate shared-state workflows

    Run tasks in which different agents must consume and extend the same graph, then verify that each sees the resulting state.

    Pro tip Include partial failures and retry scenarios in the evaluation.

    Watch out Testing agents independently will not reveal cross-client consistency failures.

In the wild

Two frameworks share one customer graph

A research agent built with one framework adds verified customer relationships to a knowledge graph. A separate compliance agent built with another framework immediately uses those relationships to assemble an evidence trail, then writes its audit findings back through the same standalone memory interface.

→ Both agents collaborate through consistent organizational knowledge without being rewritten onto the same framework or coupled to one runtime.

Common mistakes

Embedding one store per agent

Separate vector stores prevent agents from building on one another's knowledge and create divergent versions of organizational state.

Ignoring distributed-systems failures

Once memory is shared over a network, retries, duplicate requests, concurrency, and unreliable connections become core correctness concerns.

Coupling the interface to one runtime

A memory layer tied to a particular framework or Python process cannot serve heterogeneous agent systems independently.

Is it for you?

Best for

Organizations operating multiple agents or agent frameworks that must share and concurrently extend the same knowledge base.

Not ideal for

Single-agent applications whose local memory is small, temporary, and never needs to be shared across processes or users.

From the transcript

“the next big thing was shared memory across multiple people.”

SPEAKER_01 · 08:04

“So the next thing that I worked on was just decoupling it, making it possible for you to work with a company as one big…”

SPEAKER_01 · 08:59

“you could mix and match all of them and make them work concurrently on the same knowledge graph and make it like grow independently and…”

SPEAKER_01 · 10:28

From the episode

Founder Chats - Daulet Amirkhanov

→