Skip to Content

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.

  1. 01Source or DockA connected source, or a Dock write that declares a container.
  2. 02ContainerChunks, extracts, and embeds the content, or builds OKF concepts.
  3. 03EngineReads only the sources linked to it.
  4. 04Lynkquery returns an answer. retrieve returns the chunks.
The knowledge path. Data lands in a container, an engine reads the sources linked to it, and Lynk returns the result.

Without and with Docklee

Without DockleeWith 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

  1. Data arrives. You connect documents and apps in Sources, or your code writes with Dock and declares a container.
  2. 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.
  3. 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.
  4. Lynk returns the result. lynk.query returns an answer with citations. lynk.retrieve returns the ranked chunks.

The memory path

  1. Dock writes to a memory space. Your code calls capture on a Dock that has a memory_space_id, with an end_user when the memory belongs to one person.
  2. 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.
  3. Lynk recalls it. lynk.recall returns 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 declaresWhere events go
container onlyEvery event goes to the container.
memory_space_id onlyEvery event goes to the memory space.
Bothdocument and knowledge events go to the container. conversation, event, preference, and entity events go to the memory space.
NeitherThe 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

DataLives inReadable by
A connected sourceA container, chosen when you add the sourceEvery engine the source is linked to
A Dock knowledge writeThe container's API/SDK Feed sourceEvery engine the feed is linked to
A Dock memory writeThe memory spacelynk.recall on that space
An end user's memoryThe memory space, encrypted for that end userlynk.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_user on every write and recall in a per-user space.
  • Flush or close Dock before your process exits.

Next steps

You've seen both paths. Learn the knowledge side first, starting with where content comes from.

On this page