Knowledge Bases

A knowledge base (KB) is a private collection of documents that an AI Employee's agents can search at run time. When an agent needs grounding (answering from your policies, your product docs, your help center) it retrieves the most relevant passages from its attached knowledge bases and reasons over them. This is retrieval-augmented generation (RAG): the model's answer is grounded in your content, and it can cite the exact sources it used.

Knowledge base content goes live immediately. Unlike configuration changes, documents you add or remove take effect right away and aren't part of a published version.

A knowledge base is owned by an AI Employee or by a group. Several AI Employees can use the same one: select Link knowledge base to attach one that already exists.

How a knowledge base works

Documents flow through an ingestion pipeline, then become searchable:

  1. Connect or upload. A KB draws its documents from a connector (SharePoint, Google Drive, Confluence, Box, ServiceNow) or from direct file uploads.
  2. Extract. The pipeline extracts text from each document, including PDFs and Office files (.docx, .xlsx, .pptx).
  3. Chunk. The text is split into overlapping chunks (by default about 1024 tokens per chunk with 128 tokens of overlap) so each chunk is small enough to embed and large enough to carry meaning. Overlap keeps context from being cut at chunk boundaries.
  4. Embed. Each chunk is turned into a vector embedding by EmaFusion™. The embedding model is a platform-level setting shared by all Workspaces.
  5. Store. Chunks and their embeddings are stored in a vector index, with the document's folder path kept alongside for filtering.

Once a document finishes ingesting, its chunks are immediately searchable.

Admins connect sources; builders create knowledge bases. Source connections (the credentials for SharePoint, Drive, and so on) are created by administrators. As a builder, you create a knowledge base with Add Knowledge Base and choose local files or a connected source, or attach an existing one with Link knowledge base. You never handle credentials.

Vision PDF extraction

By default, the pipeline reads the text layer inside a PDF. That is fast and exact, but handwriting, drawn tick marks, stamps, and signatures are not in a text layer, so they are dropped silently while ingestion reports success.

Read PDFs as images renders every PDF page and reads it with a vision model instead, recovering content that the text layer cannot see. Turn it on when your PDFs contain handwriting, ticked boxes, stamps, or scanned pages.

This setting is on the AI Employee's Configuration tab. It appears only when the AI Employee receives documents (either through a workflow input of type file or through an attached knowledge base). The setting is stored as vision_extraction_enabled on the workflow config and applies to files uploaded from that point on; documents already in a knowledge base are not re-read.

Vision extraction is slower and costs per page. Each page is read by a vision model (~63 seconds per page against sub-second for text extraction). Leave this off for AI Employees whose PDFs are genuinely digital text. The text layer is ground truth for those documents, and a vision model is a lossy re-read of it.

What is configurable

When vision extraction is on, the Configuration tab exposes additional settings saved to vision_extraction_config:

SettingDescriptionBounds
ModelWhether to use the AI Employee's own model or a separate model pinned to this pipeline. Defaults to the AI Employee's model.
Page limit (max_pages)Maximum pages read as images per PDF. Pages beyond the limit are handled according to the oversize behavior below. Leave empty to use the platform default (50 pages).1–50
Oversize behavior (oversize_behaviour)What happens when a PDF exceeds the page limit: read the first pages as images and the rest as text (images_then_text, default), read the whole file as text (text_only), report an error (fail), or skip the file quietly (skip).

Advanced fields (concurrency, DPI, and per-page token limit) are bounded by the platform and cannot be set in the UI. Values written via the API are clamped: concurrency to 25, DPI to 400, and max tokens to 32768. A value outside the bound is replaced with the platform default rather than failing the extraction.

The config blob preserves any keys not managed by the UI (prompts, block_layout, cache_read_enabled, and others) so saving settings from the Configuration tab does not overwrite API-only fields.

Retrieval at run time (RAG)

When an agent with attached knowledge bases runs, the platform performs a vector search:

  1. The agent's query is embedded with the same model used for the documents.
  2. The platform runs an approximate-nearest-neighbor search (an HNSW index) over the KB's chunks using cosine similarity (similarity = 1 − distance).
  3. Chunks scoring below the agent's min_score floor (default 0.15) are dropped, and the top top_k matches that remain are ranked by similarity and injected into the agent's context with numbered source labels so the model can cite them.

Retrieval is tunable per agent, in the agent panel (in the workflow JSON, its type_config). Values outside the valid range are ignored and fall back to the default:

ParameterDefaultRangeNotes
Top K Results (top_k)201–50How many chunks the agent retrieves. Out-of-range values fall back to the default.
Minimum Score (min_score)0.150.05–0.95Chunks below this cosine-similarity score are dropped.
Knowledge bases per agentAn agent can search several KBs in one query.

For new search-and-answer workflows, use a Custom Agent with a Knowledge Base attached. Write Instructions to answer from the retrieved documents and cite the sources it uses.

Folders and the folder filter

Documents carry a folder path from their source. You can scope an agent's retrieval to a subset of a knowledge base with a folder filter (a path prefix the search must match).

The folder filter is applied at search time, not at ingestion time. That has two practical consequences:

  • Adding or changing a folder filter on an agent takes effect on the next run, with no re-ingestion.
  • One knowledge base can serve several agents, each scoped to a different folder.

For example, a single "Company Docs" KB might back an HR agent filtered to policies/hr/ and a finance agent filtered to policies/finance/, with no duplicate ingestion.

Narrowing what an agent searches

On an agent that uses knowledge bases, you can:

  • Filter by tags: search only documents with the tags you pick. See Ways to organize your AI Employees.
  • Route to relevant KB: let the agent choose which knowledge base to search for each question. Add Routing instructions such as "For HR questions search the HR KB." When this is on, the agent skips the first automatic search.
  • Set Top K Results (how many passages to retrieve) and Minimum Score (how close a match must be, from 0.05 to 0.95).

Document Library folder scoping

When a knowledge base is connected to a Document Library source, you can scope it to one or more specific folders using a browse-by-name interface. Open the KB's source settings and use the folder picker, Folder Scope, to select folders by name; the KB will only ingest and search documents within the selected folders.

This scoping is set at the KB level (not the agent level) and takes effect on the next sync. It works alongside the agent-level folder filter described above (the KB only ingests the selected folders, and agents can further narrow retrieval within that set).

Search and extraction knowledge bases

A knowledge base has an intent that determines how its content is prepared:

  • Search (the default): content is chunked, embedded, and indexed for vector retrieval. This is what RAG agents query.
  • Extraction: the full extracted text is stored as a single LLM-ready document, with no chunking or embedding. Use this when an agent needs the whole document (for example, a Data Extractor Agent reading an uploaded file) rather than retrieved passages.

Search indexing

Search indexing controls whether a knowledge base's content is included when an AI Employee searches. You set it with the Search indexing switch when you create a knowledge base, and you can turn it on or off at any time, independently of the knowledge base's intent. By default, a search knowledge base has indexing on and an extraction knowledge base has it off.

When indexing is off, the documents, their permissions, and their full content are all kept. The knowledge base is only skipped during content search:

  • If a search covers several knowledge bases and only some are indexed, the AI Employee searches the indexed ones and reports which were skipped.
  • If none of the knowledge bases in a search is indexed, the search fails with guidance to turn indexing on or read a specific document instead.
  • Full-document reads, document listing, and extraction keep working as normal.

SharePoint OBO sources need indexing on. SharePoint in OBO (on-behalf-of) mode uses the provider's own search, so a knowledge base with an OBO source must keep search indexing on. Turn indexing on before you attach an OBO source or switch a connection to OBO mode.

To turn indexing on or off, see Enabling and disabling search indexing.

Working with whole documents

Besides searching, an agent can work with whole documents in a knowledge base that belongs to its AI Employee. When a knowledge base is attached, the agent gets three Tools:

ToolWhat the agent can do
list_knowledge_base_documentsFind documents by file name, folder, or taxonomy tag, within the folder and tag scope already set on the agent.
read_knowledge_base_documentRead a document's complete extracted text, page by page, rather than search snippets.
extract_knowledge_base_documentsExtract structured output from each of 1 to 25 selected documents, one document at a time, and report an outcome for each.

This works whether search indexing is on or off. To use it, say in the agent's Instructions which documents to select (by file name, folder, or tag) and what to extract, for example: List the documents in the Finance library and select invoice.txt. Extract its invoice number and total with extract_knowledge_base_documents. Report each document's outcome, including failures.

  • Only knowledge bases that belong to the AI Employee. A knowledge base shared with it from a group stays search-only: the agent can search it, but not list or read whole documents.
  • Up to 25 documents per step. Each run of an agent step can extract from at most 25 documents in total, across repeated calls and after a Human in the Loop pause. Each agent step in a workflow has its own 25.
  • One outcome per document. Each selected document comes back completed (the output matched the schema), failed (for example, no access, a processing error, content too large, or output that didn't match the schema), or cancelled. Nothing is reported as complete unless every part of that document was extracted.

Vision extraction configuration

By default, PDF ingestion uses the MarkItDown pipeline. Vision extraction (which converts pages as images for an LLM to read) can be enabled per knowledge base, overriding the AI Employee's setting on a per-key basis.

How the override works

Vision extraction config is a partial override, not a snapshot. Each key you set on a knowledge base wins over the same key on the AI Employee's config; keys you leave absent keep inheriting from the AI Employee. Sending {"enabled": true, "max_pages": 7} overrides only those two keys; every other setting (model selection, DPI, prompts) still comes from the AI Employee.

A knowledge base with no vision config set (the default) has config: null, which means inherit, not off. The knowledge base resolves exactly as it did before this option existed.

To clear an override and go back to inheriting, send PUT /knowledge-bases/{id}/vision-extraction-config with {"config": null}. There is no separate DELETE.

The override applies in both directions: a knowledge base can turn vision on under an AI Employee that has it off, or turn it off under one that has it on.

Connector-synced PDFs

PDFs synced from connectors (SharePoint, Google Drive, Confluence, Box) now honor the vision_extraction_enabled flag. Previously, connector-synced PDFs always used the MarkItDown pipeline regardless of the AI Employee's vision settings. Both manual uploads and connector syncs now use the same config resolution.

Configuring vision extraction per knowledge base

Use the standalone routes, not any AI Employee-nested path. A knowledge base may be owned by a group rather than an AI Employee, and group-owned knowledge bases can only be addressed through the standalone path.

Get the current override:

GET /knowledge-bases/{id}/vision-extraction-config

Returns {"config": null} when no override is set (the knowledge base inherits from its AI Employee).

Set or replace the override:

PUT /knowledge-bases/{id}/vision-extraction-config
Content-Type: application/json

{"config": {"enabled": true, "max_pages": 7}}

Send only the keys this knowledge base overrides. Absent keys continue to inherit from the AI Employee.

Clear the override (inherit everything from the AI Employee):

PUT /knowledge-bases/{id}/vision-extraction-config
Content-Type: application/json

{"config": null}

Access control: GET requires use tier. PUT requires edit tier.

Configurable keys

KeyTypeNotes
enabledbooleanTurn vision extraction on or off for this knowledge base. Overrides the AI Employee's flag in both directions. Absent or null falls through to the AI Employee's flag.
model_namestringPin one vision model. Mutually exclusive with optimization_criteria.
optimization_criteriastringDelegate model choice to EmaFusion™. One of CHEAPEST, FASTEST, BALANCED, MOST_ACCURATE.
llm_modestringOne of ALL, SELECTED, CUSTOM. Read as a unit with selected_model_ids, model_name, and optimization_criteria.
selected_model_idsarray of stringRead only under llm_mode: "SELECTED".
model_modestringinherit or override. inherit may not also name a model.
max_pagesintegerPer-document page cap for this knowledge base. Greater than 0, no greater than the platform ceiling.
oversize_behaviourstringWhat happens to a PDF longer than max_pages. One of images_then_text, text_only, fail, skip.

Unknown keys (DPI, system prompt, temperature, concurrency, and others added by the extraction service) are stored untouched and passed through to extraction.

Group-owned knowledge bases must name a model. A group-owned knowledge base has no AI Employee to inherit a model from. If it does not set model_name or selected_model_ids, vision stays off and documents take the default pipeline.

Model selection is one decision, not per key. llm_mode, selected_model_ids, model_name, and optimization_criteria are read as a unit. Whichever side (AI Employee or knowledge base) sets any of them owns all four. Sending one key alone over an AI Employee that set the others produces a model selection nobody chose.

Who can access the Knowledge Bases card

The Knowledge Bases card on the AI Employee configuration page is visible to:

  • Any user with a workspace-level builder (or higher) role.
  • Any user holding a per-AI-Employee Admin grant, even if their workspace role is not a builder role.

This matches the underlying API, which admits both groups.

How a knowledge base stays current

  • Connector sync keeps a KB aligned with its source. Sync runs on a schedule (or on demand) and uses incremental change detection so unchanged documents aren't re-processed.
  • Document triggers can run a workflow when a document finishes ingesting in an attached KB (useful for pipelines that act on newly added content). The run executes against the AI Employee's live published version.
  • Documents go live right away. Adding or removing a document changes what the AI Employee searches immediately, for everyone. Each publish also saves a snapshot of the knowledge base, so reverting to an earlier version rolls its documents back too. See Workflows.

Where to go next

Last updated: Nov 5, 2026