Skip to content

Give your agent a knowledge base ​

By the end of this tutorial your agent will answer from your own documents — your policies, your product sheets, your FAQ — and say "I don't have that" instead of guessing when a question isn't covered.

This is a hands-on lesson; do it in your own Studio. We'll keep using Acme Store from Build your first agent — if you haven't done that one, start there so you have an agent to attach knowledge to.

What you'll build ​

A Knowledge Base folder holding your documents, attached to your agent so that every reply is grounded in what you uploaded. (This grounding-from-your-own-docs technique is called RAG — but you won't have to think about that; attaching the knowledge is all it takes.)

Before you start ​

  • An agent you can edit (from the first tutorial).
  • One or two documents to load — a PDF, Word, Markdown, or plain-text file. A returns policy or an FAQ is perfect.

1. Create a folder for your documents ​

Go to Connect → Knowledge Base and click New Folder. Name it for what it holds — Store FAQs. A folder is just a labelled home for related documents.

2. Upload a document ​

With your folder selected, click Upload. In the Upload window, click Select files, pick your document, leave Processing on Instant and Indexing mode on Default, and click Upload & Process. Perfox splits the document into passages and indexes them for search.

You should now see the file appear as Pending, then Active, with a Chunks count — that count is how many searchable passages your document became. Try a question in Test Knowledge Search at the bottom of the page to see which passages come back.

Note. Uploading here does not, on its own, make an agent use the file — the Knowledge Base page even reminds you of this. Attaching it to an agent (next step) is what switches it on.

3. Attach the knowledge to your agent ​

Open your agent on the canvas. On the AI Agent node, click the + under Knowledge to add a Knowledge node, open it, and tick your Store FAQs folder under Folders.

Why this matters. The Knowledge port is the switch. By default the agent searches the ticked folders before every reply (the AI Agent's Knowledge lookup setting, Always attach), so there's no separate "search" step to add. New files you drop into the folder later are picked up automatically.

4. Tell it to stay grounded ​

Click the Personality port and make the grounding rule explicit:

Answer only from the knowledge base. If a question isn't covered there, say so plainly and offer to connect a human — never invent an answer.

Then click Activate to make the change live.

5. See it work ​

Open your Web Chat trigger's live preview and ask something your document covers — "Do you accept returns after 30 days?"

You should now see the agent answer using your policy's actual wording. Now ask something your documents don't cover — it should decline plainly rather than make something up.

What just happened. On each turn, the agent pulled the most relevant passages from your folder and answered from them. Because you told it to stay grounded, it declines cleanly when your documents are silent — the behaviour that separates a trustworthy assistant from a confident guesser.

You did it ​

Your agent now answers from your own knowledge, and refuses to invent. Where to go next: