---
title: Knowledge
description: Add document sources that agents can search using retrieval-augmented generation (RAG).
---

The Knowledge screen manages the document collections that your agents can retrieve information from. When an agent or flow contains a RAG node, AKOS searches the relevant knowledge sources and injects the results into the agent's context.

> If your installation does not have a knowledge indexer or vector store configured, the screen will show a "Knowledge subsystem not configured" message. Contact your administrator to enable this feature.

## Source list

Each row in the source list shows:
- **Source name and kind** — the display name and the source type (folder, URL, database, etc.).
- **Status** — one of: `indexed`, `indexing`, `failed`, or `needs rebuild`.
- **Document count and size** — the number of documents currently indexed and their total size.
- **Agent usage** — how many agents currently reference this source.
- **Rebuild** and **Remove** action buttons.

The header shows aggregate stats: total sources, how many are currently indexing, how many have failed, total document count, and total indexed size.

## Adding a source

Click **+ Add source** to open the add-source form. Fill in:
- **ID** — a unique slug for this source (used in RAG node configuration).
- **Name** — a display name.
- **Kind** — the type of source:
  - `folder` — a local folder of files (PDF, Markdown, plain text, etc.).
  - `url` — a web page or sitemap.
  - `database` — a SQL query result.
  - Others may be available depending on your installation.
- **Location** — the path, URL, or connection details for the source.
- **Embeddings provider** — the LLM provider used to generate vector embeddings. Must be a connected provider from the **[Connections](/docs/using-the-app/connections)** screen.
- **Embeddings model** — the specific model to use for embeddings.

For sources that require authentication (for example, a private web page or a database), the form shows additional authentication fields. For OAuth-protected sources, a **Connect** button launches the OAuth flow.

Click **Add** to save and begin indexing.

## Rebuilding a source

To re-index an existing source (for example, after the underlying documents have changed), click **Rebuild** on the source row. Indexing happens in the background; the status badge updates when complete.

To rebuild all sources at once, open the command palette (`Cmd K`) and run **Rebuild all sources**.

## Using knowledge in flows

To use a knowledge source in a workflow, add a **RAG** node to your flow in the flow editor. The RAG node inspector lets you select the source by ID and configure the query and retrieval settings. The retrieved context is passed automatically to the next node in the flow.

To assign a knowledge source to an agent directly (so it is always available without a dedicated RAG node), configure the agent's knowledge settings in the **[Agents](/docs/using-the-app/agents)** form.

## Indexing product documentation for the assistant

Workspace **document sources** (above) power flow RAG nodes. Separately, operators can index the **shipped documentation corpus** so the in-app assistant retrieves repo docs:

```bash
agentskit-os prod seed --target assistant-knowledge --dry-run
agentskit-os prod seed --target assistant-knowledge --apply
agentskit-os knowledge rebuild assistant-knowledge-for-agents
agentskit-os knowledge rebuild assistant-knowledge-user-docs
```

This registers the internal agent docs, product docs, demo docs, and runbooks as folder sources. Until rebuild completes, fumadocs pages are not in assistant RAG — the contract catalog in the system prompt is always on, but folder search requires this operator path. See the [CLI command reference](/docs/cli/command-reference) (`prod seed`, `knowledge rebuild`) and the [Using the App](/docs/using-the-app) guide index for related operator flows.

## Related screens

| Need | Go to |
|---|---|
| OAuth provider setup | [Connections](/docs/using-the-app/connections) |
| Guided integration steps | [Integration setup](/docs/using-the-app/integration-setup) |
| Use sources in flows | [Workflows](/docs/using-the-app/flows) |
| Assistant chat | [Home (Assistant)](/docs/using-the-app/copilot) |
