Unified Context Layer

One interface for
every context source.

UCL routes every query to the right context sources, fetches the relevant data, and assembles a single structured bundle ready for your model. No custom retrieval logic. No stitching five APIs together.

  • One API call assembles context from every source simultaneously
  • Intelligent routing selects only the sources relevant to each query
  • Returns a token-optimised bundle ready for any model provider
Knowledge Base
User Memory
Session Context
Tool Results
Live Data
Unified
Context
Layer

Context Bundle

sources5 unified

tokens~1,240

latency< 80ms

Your AI product has five context sources and five different APIs to query them. UCL turns that into one call that returns everything the model needs, nothing it doesn't.

Sources supported

5 built-in

KB, Memory, Session, Tools, Live Data

Assembly mode

Parallel

All sources queried simultaneously

Output format

One bundle

Structured JSON + system prompt ready

The problem

Context is scattered. UCL unifies it.

Without UCL

Five separate APIs to query five context sources

With UCL

One UCL call assembles all five in parallel

Without UCL

Each source returns data in a different format

With UCL

UCL normalises everything into one structured bundle

Without UCL

You decide which sources to query per query

With UCL

UCL routes intelligently based on query intent

How it works

Route. Fetch.
Assemble. Serve.

Step 01

Query intent analysis

UCL analyses every incoming query and determines which context sources are relevant. A question about the user's billing history triggers Memory and Session. A technical question triggers the Knowledge Base. Irrelevant sources are skipped entirely.

Step 02

Parallel source fetching

All selected context sources are queried simultaneously. Knowledge retrieval, memory recall, and session extraction run in parallel. Total assembly time is bounded by the slowest relevant source, not the sum of all sources.

Step 03

Bundle assembly and delivery

Results from every source are merged, de-duplicated, and formatted as a single structured bundle: a token-optimised JSON object plus a system prompt string ready to inject into any model provider's API.

Context assembly: live
Active
  1. 1
  2. 2
  3. 3
  4. 4

01 Query arrives

Incoming query

"Help me configure the SDK for production use"

Knowledge Base
User Memory
Session Context
Tool Results
Live Data

Capabilities

Built for production-grade context assembly.

Intelligent routing

UCL scores each context source against the incoming query and skips sources unlikely to contribute. No irrelevant context, no wasted tokens.

Parallel assembly

All selected sources are queried simultaneously. Assembly latency is bounded by the slowest relevant source, not the sum of all five.

Token optimisation

Each source's contribution is ranked and trimmed to a token budget you define. The most relevant context always wins the limited space.

Source normalisation

Knowledge snippets, memory facts, session events, and tool outputs arrive in different shapes. UCL normalises them into one consistent schema.

Per-user access control

Context sources respect user-level access policies. UCL never surfaces knowledge or memory that the requesting user isn't authorised to see.

Streaming bundles

For latency-sensitive applications, UCL streams context fragments as they arrive from each source rather than waiting for full assembly.

API

One call.
All context, assembled.

Pass a query and a list of sources to ucl.assemble(). Get back a context bundle and a model-ready system prompt. Done.

  • JavaScript and Python SDKs
  • REST API with streaming support
  • Token budget controls per call
  • Webhook on bundle assembly complete
Live
import { Lynk } from "docklee";
const lynk = new Lynk({ engineId: "eng_docs", memorySpaceId: "space_app" });
// Assemble context from knowledge and memory for an incoming query
const query = "Help me configure the SDK for production use";
const [knowledge, memories] = await Promise.all([
lynk.retrieve(query, { topK: 5 }),
lynk.recall(query, { endUser: "user_7x91k", topK: 5 }),
]);
// Inject directly into your model call
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "system", content: buildPrompt(knowledge, memories) },
{ role: "user", content: userMessage },
],
});

Use cases

Any product that needs rich context.

UCL is the context plumbing that ships once and works everywhere your AI talks to a user.

AI copilots

Every copilot query instantly draws from the product knowledge base, the user's memory, and the current session state. Context is always complete, latency is always bounded.

Support chatbots

Support flows that combine the help center, the user's account history, and their open ticket context in every single reply. No more context-switching between tabs.

Personalised AI

Recommendation engines that assemble user preferences from memory, recent behaviour from session context, and domain knowledge from the knowledge base in one round trip.

Autonomous agents

Agents that query UCL at the start of every action loop. The agent always has complete context: what it knows, what the user wants, and what tools have already run.

Unified Context Layer

Stop wiring context sources.
Start shipping the product.

One integration. Five context sources. Every query answered with complete context from the first call.