CellCog uses a general-purpose memory system called Context Trees to give AI agents persistent knowledge across conversations. This guide explains how it works and how to use it effectively.
A Context Tree is a hierarchical document store — think of it as an organized knowledge base that both you and AI agents can read from and write to.
Context Trees are a core building block of CellCog. The same memory system is used in multiple places across the platform, and it's also exposed to external agents via the OpenClaw Python SDK.
| Entity | What It Stores | Who Manages It | Persistence |
|---|---|---|---|
| Project | Project-specific documents, specs, data files | You (upload via UI) + Agents (via tools) | Permanent until deleted |
| Agent Role | Agent's accumulated learnings and artifacts from past sessions | Agents (automatically) + You (via UI) | Permanent until deleted |
| Organization | Company-wide documents shared across all projects | You (upload via UI) + Agents (via tools) | Permanent until deleted |
| CellCog Support Docs | Platform documentation that agents reference to answer questions | CellCog team | Managed by CellCog |
| OpenClaw (External) | Whatever your OpenClaw agents need to remember | Your OpenClaw agents (via SDK) | Permanent until deleted |
Key point: All document stores — project, agent role, and organization — are two-way. Both humans and agents can read from and write to them. Humans manage documents through the UI; agents manage them through their built-in context tree tools.
This is the most powerful and often misunderstood feature. Here's exactly what happens:
An agent role is a repeatable role assignment you create within a project. It has:
Agent roles serve two purposes:
When you start a chat linked to a project and an agent role, here's the lifecycle:
This is the only place in CellCog where long-term memory is automatically maintained. Only chats with an assigned agent role trigger this background memory process. Regular chats (without an agent role) do not have this automatic memory.
You can also manually trigger a memory update at any time via the chat header menu (⋮ → Update Agent Memory).
Not everything should go into agent memory. The key distinction:
Example: In a "Mini Pirates Series" project with an "Episode Producer" agent role:
Here's a concrete example of how agent role memory works in practice:
Chat 1 — Episode 1: You create a project "Mini Pirates Series" and an agent role "Episode Producer." You describe the series concept and ask the agent to produce Episode 1. It researches pirate themes, writes the script, generates character designs, and creates scene artwork. After the chat goes idle, the agent stores Episode 1's script and story notes into its memory, while the core character designs and finished episode go into project documents.
Chat 2 — Episode 2: You start a new chat with the same "Episode Producer" role. The agent loads its memory — it knows Episode 1's storyline, the characters, your feedback about pacing. You say "produce Episode 2." It picks up where it left off, maintaining continuity.
Chat 6 — Episode 6: By now, the agent has deep memory of the entire series arc: recurring characters, plot threads, your style preferences, what worked and what didn't. Each new episode builds naturally on everything before it.
The automatic memory process works well in many cases, but it's not perfect. Every agent role may need different kinds of memories depending on the work:
Sometimes the agent's automatic memory choices are exactly right. Other times, you may want to step in and curate what gets stored. You can do this by:
Think of it like managing a team member's notes — sometimes they take great notes on their own, sometimes you need to guide what's important to remember.
Project documents are the foundation of team knowledge in CellCog.
When you start a chat linked to a project, all project documents are automatically available to the agents. You don't need to attach them to each chat — they're always there.
This is different from chat attachments, which only exist for that single chat.
If you have an organization set up, you can upload company-wide documents that are available across all projects.
| Project Documents | Organization Documents | |
|---|---|---|
| Scope | One project only | All projects in the org |
| Best for | Project-specific specs, data, assets | Company-wide brand guidelines, policies, product docs |
| Access | Project members | All org members |
Like project documents, organization documents are a two-way store — both humans (via UI) and agents (via tools) can manage them.
| You want to... | Use... |
|---|---|
| Share company brand guidelines across all projects | Organization Documents |
| Store a dataset specific to one research project | Project Documents |
| Have an agent remember its past work across sessions | Agent Role (automatic memory) |
| Attach a one-off reference file to a single chat | Chat Attachment |
| Give an agent specific process notes to follow | Agent Role Instructions (for instructions) or Agent Role Memory (for reference docs) |
The same context tree system that powers CellCog's internal agents is available to OpenClaw agents through the Python SDK.
The SDK includes full project, document, and context tree management. This means your OpenClaw agents can:
Install the project-management-cellcog ClawHub skill for full context tree management:
bashclawhub install project-management-cellcog
See the OpenClaw Integration Guide for setup details and the project-management-cellcog skill documentation for the full API.
No. When you start a chat linked to a project, all project documents are automatically available to agents. You only need to attach files for one-off references not in the project.
Go to your project → Agent Documents tab. You'll see files organized by agent role.
Yes. Go to the project's Agent Documents tab, find the file, and delete it. You're in full control of what agents remember.
Not always. The agent takes its best guess about what's important to remember, but different tasks require different memory strategies. You may need to guide the agent or curate its memory manually for best results.
Instructions are static guidelines you write (e.g., "always use formal tone"). Memory is a dynamic document store that grows over time as the agent works on tasks. Instructions tell the agent how to behave; memory gives the agent what to reference.
No. Each agent role has its own private context tree. However, all agent roles in a project can see the shared project documents. This is by design — project documents are the shared layer, agent memory is the private layer.
Yes. Context Trees are a general-purpose memory system used across CellCog — for projects, agent roles, organizations, and the OpenClaw SDK. It's the same underlying system everywhere.