Core Concepts
Memory spaces
The container your memories live in, how to point the SDK at one, and how to keep spaces apart.
Memories from different products and environments shouldn't mix. A memory space keeps them apart. Dock writes memories into a space, and Lynk recalls from one space at a time.
Memory spaces are separate from containers and engines. Knowledge never mixes into a memory space.
Create a new space when...
- A product or environment needs its own memory, such as production and staging.
- You're adding per-user memory to an app that already uses space-level memory.
Create a space
In the Docklee dashboard, open DUM and create a memory space. Copy its ID. Memories never move between spaces on their own.
Point the SDK at a space
Set the ID once so Dock and Lynk both use it:
export DOCKLEE_MEMORY_SPACE_ID="your-memory-space-id"Or pass it in code:
from docklee import Dock, Lynk
dock = Dock(memory_space_id="your-memory-space-id")
lynk = Lynk(memory_space_id="your-memory-space-id")
dock.capture("The customer renewed for another year.", type="event")
dock.flush_sync()
records = lynk.recall_sync("renewal history", top_k=5)To recall from a different space for one call, pass memory_space_id (Python) or memorySpaceId (TypeScript) to recall. Calling recall with no space ID raises an error that names the missing setting.
Space-level and per-user memory
| Kind | Who reads it | Suits |
|---|---|---|
| Space-level | Everything that reads the space | An agent's working notes, a team's shared facts |
| Per-user | Only calls with the same end_user | Apps that serve many people |
A new space holds space-level memory. The first memory written with an end_user makes it a multi-user space for good. From then on, every write and every recall must name an end user, and a recall with no end user returns nothing.
Use separate spaces for space-level and per-user memory. The first end user write changes how a space works, and it can't be undone.
Settings in the dashboard
| Setting | What it does |
|---|---|
| Retention | Keeps memories forever, or for 30 days, 90 days, or 1 year. See Retention. |
| Content Shield | Hides memory content from dashboard users. See Content Shield. |
| PIN | Locks the space in the dashboard until the PIN is entered. |
Control access
A key reaches every memory space in your workspace until you narrow it to selected spaces. See API keys.
Next steps
Your space is ready. If your app serves many people, set up end users next.