# Knowledge Base — Overview

The **Knowledge Base** is where your Agents learn what to say, how to say it, and what information to rely on.\
It acts as a structured repository of trusted data — from FAQs and documents to custom training texts — ensuring that your Agents can respond accurately and consistently across all channels.

In Zaia Endless, Knowledge Bases are **independent and reusable** entities.\
They can be linked to multiple **Agents** or **Squads** simultaneously, depending on which Agents have access to a Tool connected to that specific Knowledge Base.

***

### 🧩 Core Concepts

| Concept            | Description                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| **Knowledge Base** | A container that stores curated information used to train or inform Agents.                        |
| **Items**          | Individual pieces of content within a Knowledge Base — such as texts or PDFs.                      |
| **Training**       | The process of embedding and indexing your data so it becomes searchable and understandable by AI. |
| **Linking**        | The mechanism that connects a Knowledge Base to one or more Agents through the **Knowledge Tool**. |

***

### 💡 Why It Matters

Knowledge Bases allow you to separate **intelligence** (the Agent’s reasoning) from **information** (the Agent’s source of truth).\
This modular structure offers three key benefits:

1. **Scalability** — The same knowledge can be shared across multiple Agents or Squads.
2. **Versioning** — You can update a Knowledge Base without rebuilding or reconfiguring Agents.
3. **Precision** — Each Agent retrieves only the information it is authorized to use.

***

### 🧠 How It Works

1. You create one or more Knowledge Bases under the **Builder → Knowledge** section of an Agent.
2. You add content items — either **Text** or **PDF**.
3. The system automatically processes and trains the data.
4. You can link the trained base to any Agent via the **Knowledge Tool**.
5. When a user interacts with the Agent, it retrieves contextually relevant information from that base in real time.

***

### ⚙️ Supported Content Types

| Type     | Description                                                                              |
| -------- | ---------------------------------------------------------------------------------------- |
| **Text** | Raw content written directly in the interface (ideal for FAQs, guides, and definitions). |
| **PDF**  | Uploaded documents such as manuals, reports, or training materials.                      |

Support for other formats (e.g. `.docx`, `.md`, `.csv`) will be added in upcoming releases.

***

### 📈 Knowledge Lifecycle

1. **Creation** — Define the base and its purpose.
2. **Population** — Add items such as text or PDF documents.
3. **Training** — Let the platform process and embed your data.
4. **Linking** — Assign the base to one or more Agents.
5. **Iteration** — Update content and retrain as needed.

***

### 🧭 Example

* **Base Name:** *Cérebro Ju*
* **Used by:** *Agent Ju da Zaia* and *Squad da Zaia*
* **Items:**
  * Text: *Commercial FAQs (bilingual)*
  * PDF: *Product Documentation*

Both the individual Agent and the Squad can query this same base, as long as they’re linked through a **Knowledge Tool**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/knowledge-bases/knowledge-base-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
