---
title: "Knowledge / RAG"
description: "Ingest documents, PDFs and URLs, ground answers with search_knowledge, deep_research and seven connectors: Drive, Graph, Notion, Slack, S3, SQL, Confluence."
updated: "2026-07-05"
---

**Knowledge** is how AiHummer grounds answers in your documents rather than the
model's training data. You ingest content, the agent retrieves the relevant
passages with the `search_knowledge` tool, and answers come back **with
citations**. For harder questions, the `deep_research` tool runs a multi-step
investigation and produces a cited report. Knowledge is administered under
`/v1/admin/knowledge/*` and `/v1/admin/knowledge/connectors/*`.

## Ingesting content

You can ingest **documents, PDFs and URLs** into the knowledge base. Ingested
content is indexed so it can be retrieved at answer time and attributed back to
its source.

> [!TIP]
> Ingest the canonical version of a document once and let agents cite it, rather
> than pasting long passages into prompts. Cited retrieval keeps answers
> verifiable and your context small.

## Grounded answers and the tools

Two tools expose the knowledge base to an agent:

| Tool | What it does |
|---|---|
| `search_knowledge` | Retrieves relevant passages and grounds the answer with citations. |
| `deep_research` | Runs a multi-step research process across the knowledge base and produces a cited report. |

Both arrive in the turn as **tool results**, never as injected instructions —
the same prompt-injection discipline applied everywhere in AiHummer. Answers
carry **citations** so a reader can trace a claim back to its source.

> [!NOTE]
> `deep_research` is for genuine multi-step questions — it costs more time and
> tokens than a single `search_knowledge` call. Reach for it when one retrieval
> is not enough.

## Knowledge connectors

Beyond manual ingest, knowledge can be pulled from external sources via
connectors managed under `/v1/admin/knowledge/connectors/*`. Seven connectors
are available; each one's credentials live in the encrypted secrets vault and a
background scheduler runs the syncs:

| Connector | What it pulls |
|---|---|
| **Google Drive** (`gdrive`) | Google Drive files via a service account (credential JSON). |
| **Microsoft Graph** (`msgraph`) | SharePoint / OneDrive documents via a Microsoft Graph app. |
| **Notion** (`notion`) | Notion pages via an internal-integration token. |
| **Slack** (`slack`) | Slack channel message history via a Web API token (all channels or a configured list). |
| **S3** (`s3`) | Objects from an S3-compatible bucket (AWS S3, GCS in S3 mode, MinIO, etc.), optionally under a prefix. |
| **SQL** (`db`) | Rows of a read-only SQL query against a database, ingested as documents. |
| **Confluence** (`confluence`) | Confluence Cloud pages (Basic auth with an Atlassian API token), optionally scoped to one space. |

Separately, a one-off **Slack export** import takes a workspace-export ZIP
uploaded manually — no stored secret and no schedule.

> [!WARNING]
> The Google Drive connector is live-proven; the others are implemented and
> covered by tests, but verify them against your own data before relying on them
> in production.

## Vector store and embeddings

By default, retrieval can run on an **in-memory store with a hash embedder**,
which is enough to get started. For production-quality semantic retrieval, point
AiHummer at a **real vector store and embedder**:

```bash
AIHUMMER_QDRANT_URL=http://localhost:6333
AIHUMMER_EMBEDDER_URL=http://localhost:8081
```

When these are set, ingestion and `search_knowledge` use the external vector
store and embedder instead of the in-memory fallback.

> [!NOTE]
> The semantic embedder is **opt-in, not a default**: the host-native installer
> provisions it only when you pass `--with-embedder` (Ollama with a light
> multilingual model; it then points `AIHUMMER_EMBEDDER_URL` at
> `http://127.0.0.1:11434/api/embeddings`). Without an embedder, retrieval runs
> on the lexical fallback.

## Admin API

| Resource | Purpose |
|---|---|
| `/v1/admin/knowledge` | Knowledge base management, including ingest |
| `/v1/admin/knowledge/connectors` | Configure KB connectors (Drive, Graph, Notion, Slack, S3, SQL, Confluence) |

## Where to next

- See `search_knowledge` and `deep_research` alongside every other tool in
  [Tools](/en/v1.7/concepts/tools/) and the
  [tools catalog](/en/v1.7/reference/tools-catalog/).
- Add per-conversation long-term recall with
  [Memory (Einstein)](/en/v1.7/concepts/memory-einstein/).
