Skip to content

Architecture Overview

Architecture Overview

Engram is a three-component stack. Each component has a distinct role.

Stack diagram

┌────────────────────────────────────────────────────────────┐
│ claw-control │
│ (management dashboard — FastAPI + Vue) │
└───────────────────────────┬────────────────────────────────┘
│ manages / inspects
┌───────────────────────────▼────────────────────────────────┐
│ OpenClaw │
│ (agent runtime — Node.js) │
│ routes messages → calls tools → LLM │
└──────────────────┬──────────────────────┬──────────────────┘
│ MCP tools │ LLM API
┌──────────────────▼──────────┐ ┌──────▼──────────────────┐
│ memcp │ │ OpenAI / Anthropic │
│ (memory server — Rust) │ │ (or any provider) │
│ store · search · recall │ │ │
└─────────────────────────────┘ └──────────────────────────┘

Component roles

OpenClaw (agent runtime)

OpenClaw handles the agent execution loop: receives a message, gathers context (including memory from memcp), calls the LLM, executes any tool calls the model returns, and produces a response.

OpenClaw is not owned by Engram. It is open-source infrastructure maintained by its own project. Anyone — including competitors — can build on it. Engram’s value is in the integration and the hosted product, not in the runtime itself.

memcp (memory server)

memcp stores agent memories using FSRS salience decay and retrieves them with hybrid BM25+vector search. It exposes tools over MCP — OpenClaw calls it the same way it calls any other tool server.

memcp is built and maintained by Engram. Licensed under BSL.

claw-control (management dashboard)

claw-control is the operational layer: create agents, inspect memories, manage channels, configure tools, and audit task logs. It talks to both OpenClaw and memcp via their APIs.

claw-control is built and maintained by Engram. Licensed under BSL.

Data flow

A typical agent turn looks like this:

  1. User sends a message through a channel (Telegram, CLI, webhook)
  2. OpenClaw receives the message and starts the execution loop
  3. Agent calls recall on memcp with the current message
  4. memcp returns the top N relevant memories (hybrid search + salience)
  5. Agent includes those memories in the context it sends to the LLM
  6. LLM generates a response, possibly with tool call requests
  7. OpenClaw executes tool calls (may include more memcp operations)
  8. Agent calls store_memory on memcp to persist anything worth remembering
  9. Response is returned to the user through the channel

Licensing

ComponentLicenseOwner
OpenClawOpen-source (project’s own license)OpenClaw project
memcpBusiness Source License (BSL)Engram
claw-controlBusiness Source License (BSL)Engram

The BSL allows you to read, fork, and audit the code. Production use of BSL-licensed software requires a commercial license (or the license converts to open-source after the specified period — check each component’s LICENSE file for the exact terms).

Security

Engram runs entirely on your infrastructure when self-hosted. The LLM API key never leaves your server. memcp data is stored locally in a SQLite database you control.

For the hosted product, data is stored in isolated per-tenant databases. See the Security page for more detail.