> ## Documentation Index
> Fetch the complete documentation index at: https://docs.featherhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base

> Knowledge base collections let Feather agents answer from your documents instead of relying only on prompt instructions.

Use the knowledge base when your agents need accurate, current answers from your own content such as product docs, support articles, policy material, scripts, or internal references.

## How It Works

Feather organizes knowledge in two layers:

* **Files**: the uploaded source documents
* **Collections**: reusable groups of files

You attach collections to agent versions so different agents can use different document sets.

## Typical Setup Flow

1. Create a collection
2. Request an upload URL for a file
3. Upload the file to that URL
4. Add the file to one or more collections
5. Attach the collection to the agent version you want to ground

## Create a Collection

```bash theme={"system"}
curl -X POST "https://prod.featherhq.com/api/v1/knowledge-base/collection" \
  -H "X-API-Key: $FEATHER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Support",
    "description": "Support articles, setup guides, and troubleshooting notes"
  }'
```

## Request an Upload URL

```bash theme={"system"}
curl -X POST "https://prod.featherhq.com/generate-presigned-url" \
  -H "X-API-Key: $FEATHER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileName": "billing-faq.pdf"
  }'
```

After the file is uploaded, use the collection APIs to attach it to the right collection.

## Good Knowledge Base Content

Knowledge base works best with content that is:

* Written clearly and factually
* Divided by topic
* Updated regularly
* Focused on user-facing answers

Avoid uploading noisy exports, duplicate files, or content that should only live behind a live API tool.

## When to Use Knowledge Base vs Tools

* Use **knowledge base** for explanations, policy answers, and static reference material.
* Use **tools** for live account data, actions, and system-of-record updates.

For example, a support agent might use knowledge base to explain a refund policy and a tool to check the status of a specific refund.

## Best Practices

* Create collections by domain, not by every individual team member.
* Keep marketing, support, and policy content in separate collections when the agents have different jobs.
* Re-attach collections at the version level so changes can be tested before deployment.
* Remove stale content instead of relying on prompt instructions to override it.

## Related API Reference

<CardGroup cols={2}>
  <Card title="Update Guide" icon="pen-to-square" href="/documentation/guides/updating-knowledge-base">
    Follow the safe replacement workflow for stale files and collections.
  </Card>

  <Card title="Collections API" icon="code" href="/api-reference/knowledge-base/create-knowledge-base-collection">
    Manage knowledge collections.
  </Card>

  <Card title="Files API" icon="code" href="/api-reference/knowledge-base/create-knowledge-base-file">
    Track uploaded files and file status.
  </Card>

  <Card title="Upload URL API" icon="code" href="/api-reference/knowledge-base/generate-presigned-url-for-uploading-a-file">
    Request upload URLs for new files.
  </Card>

  <Card title="Agents" icon="robot" href="/documentation/core-concepts/agents">
    Attach collections to deployed agent versions.
  </Card>
</CardGroup>
