Linea Docs

Knowledge Bases

Workspace document stores your agents can query at runtime.

Knowledge Bases

Knowledge Bases are collections of reference documents that your workflows can search at runtime. Use them for static material that agents need to look up — product documentation, policy content, FAQ entries, support articles, and similar.

How they differ from Memory

MemoryKnowledge Bases
Content sourceExtracted from agent interactionsManually added documents
DeduplicationAutomatic — new facts supersede old onesNone — all entries are kept
SearchSemantic similarityKeyword matching
Best forFacts that change over timeStatic reference material

API Endpoints

Knowledge bases

MethodPathDescription
GET/workspaces/:wId/knowledgeList all knowledge bases
POST/workspaces/:wId/knowledgeCreate a knowledge base
GET/workspaces/:wId/knowledge/:idGet a knowledge base
PATCH/workspaces/:wId/knowledge/:idUpdate name or description
DELETE/workspaces/:wId/knowledge/:idDelete base and all its entries

Entries

MethodPathDescription
GET/workspaces/:wId/knowledge/:id/entriesList entries (paginated)
POST/workspaces/:wId/knowledge/:id/entriesAdd an entry
DELETE/workspaces/:wId/knowledge/:id/entries/:eIdRemove an entry
POST/workspaces/:wId/knowledge/:id/searchSearch entries

Adding entries

POST /workspaces/:wId/knowledge/:id/entries
 
{
  "content": "Refunds are processed within 5–7 business days.",
  "metadata": { "source": "refund-policy-v3", "page": 2 }
}

Entries are immutable after creation. To update content, delete and re-add the entry.

Searching a knowledge base

POST /workspaces/:wId/knowledge/:id/search
 
{ "query": "refund policy", "limit": 10 }

Returns matching entries ranked by relevance.

Using knowledge in workflows

Add a Retriever node to your workflow and point it at a knowledge base. The node searches at runtime and injects the results into subsequent nodes as context.

{
  "knowledgeBaseId": "kb_abc123",
  "query": "{{input.question}}",
  "topK": 5
}

Knowledge bases are shared across all workflows in the workspace — one base can serve many workflows.

On this page