Core Concepts
How Docklee works
Follow data from a write, into a container or a memory space, and back out through Lynk.
Every piece of data takes one of two paths. Knowledge goes into a container and is read through an engine. Memory goes into a memory space and is read from that space.
Read this page before you design your writes, because the destination you declare decides which path the data takes.
- 01Source or DockA connected source, or a Dock write that declares a container.
- 02ContainerChunks, extracts, and embeds the content, or builds OKF concepts.
- 03EngineReads only the sources linked to it.
- 04Lynkquery returns an answer. retrieve returns the chunks.
Without and with Docklee
| Without Docklee | With Docklee |
|---|---|
| You build chunking, embeddings, and a vector store for each project. | A container does the processing, and engines share sources across projects. |
| A new fact sits next to the old one it contradicts. | The newer fact replaces the older one, and confidence is updated. |
| Per-user data relies on filters in your own code. | An end_user isolates and separately encrypts each user's memories. |
| Every service holds its own credentials to every data source. | Sources connect once, and credentials never leave the source. |
The knowledge path
- Data arrives. You connect documents and apps in Sources, or your code writes with
Dockand declares a container. - A container processes it. A vector container chunks the content, extracts its structure, and embeds it at your chosen dimension. An OKF container builds concepts and the links between them. See Containers.
- An engine reads linked sources. An engine has no data of its own. It reads from the sources you link to it, and nothing else. See Engines.
- Lynk returns the result.
lynk.queryreturns an answer with citations.lynk.retrievereturns the ranked chunks.
The memory path
- Dock writes to a memory space. Your code calls
captureon aDockthat has amemory_space_id, with anend_userwhen the memory belongs to one person. - Docklee organizes the memory. It classifies the memory, extracts the people and things it mentions, links it to related memories, and settles conflicts with older facts. See How memory works.
- Lynk recalls it.
lynk.recallreturns the most relevant memories, each with a type and a confidence score.
Where a write goes
A write never names an engine. It declares a destination, and Docklee routes each event by what the request declares.
| The request declares | Where events go |
|---|---|
container only | Every event goes to the container. |
memory_space_id only | Every event goes to the memory space. |
| Both | document and knowledge events go to the container. conversation, event, preference, and entity events go to the memory space. |
| Neither | The request fails with 422 and the error missing_destination. |
One Dock that declares both splits the events for you:
from docklee import Dock
dock = Dock(container="vector", dimension=1024, memory_space_id="your-memory-space-id")
dock.capture("Our SLA covers 99.9% uptime.", type="knowledge")
dock.capture("Maya asked about the SLA.", type="conversation", end_user="user_8f2c")
dock.flush_sync()The first event goes to the vector container. The second goes to the memory space, for that end user only.
Where data lives
| Data | Lives in | Readable by |
|---|---|---|
| A connected source | A container, chosen when you add the source | Every engine the source is linked to |
A Dock knowledge write | The container's API/SDK Feed source | Every engine the feed is linked to |
A Dock memory write | The memory space | lynk.recall on that space |
| An end user's memory | The memory space, encrypted for that end user | lynk.recall with the same end_user |
Build with this flow
- Declare a container for knowledge and a memory space for memory. Don't send knowledge to a memory space.
- Link a new API/SDK Feed to an engine before you expect answers from it.
- Keep one vector dimension per engine.
- Pass
end_useron every write and recall in a per-user space. - Flush or close
Dockbefore your process exits.
Next steps
You've seen both paths. Learn the knowledge side first, starting with where content comes from.