Skip to Content

Core Concepts

Engines

An engine reads from the sources linked to it and answers through Lynk.

An assistant should answer only from content it's meant to see. An engine makes that explicit. It holds no data of its own and reads only from the sources you link to it, so its sources decide exactly what it can answer from.

A support engine and a sales engine can share some sources and keep others apart, with each source connected only once.

Create a separate engine when...

  • Two assistants should answer from different content.
  • You want a new vector dimension without touching an engine in use.
  • A team needs its own engine with its own API key.

How it works

  1. Create the engine. In the Docklee dashboard, open Knowledge Engines and create one. Copy its ID.
  2. Link sources. Open the engine's Sources tab and add sources from your library, including any API/SDK Feed your code writes to. Linking a source that's already linked changes nothing, so it's safe to repeat.
  3. Read through Lynk. Pass the engine ID to Lynk, or set it in the environment.
export DOCKLEE_ENGINE_ID="your-engine-id"

One vector dimension per engine

The first vector source you link sets the engine's dimension. Later vector sources must match it, and a mismatch fails with 409.

To use a different dimension, remove the engine's vector sources first or create a new engine. OKF sources have no dimension, so you can link them to any engine alongside its vector sources.

Read from an engine

Lynk reads from one engine per call:

from docklee import Lynk

lynk = Lynk(engine_id="your-engine-id")

answer = lynk.query_sync("What is the refund window?")
chunks = lynk.retrieve_sync("refund window", top_k=5)
Methodtop_k defaulttop_k range
query81 to 50
retrieve81 to 100

Pass engine_id (Python) or engineId (TypeScript) to one call to read from a different engine. Calling query or retrieve with no engine ID raises an error that names the missing setting.

Control access

A key reaches every engine in your workspace until you narrow it to selected engines. See API keys.

Next steps

Your engine is reading its sources. Learn the read methods next.

On this page