AI Agent

Knowledge base

The facts your AI agent looks up, and how to write them so it finds the right answer.

The knowledge base is the AI agent's reference material: return and cancellation policies, coverage terms, plan details, opening hours, troubleshooting steps. The AI agent searches it whenever a customer asks something factual. The more of your answers it can find there, the more questions it resolves without your team.

What you can do

  • Write articles for policies, procedures and the answers to common questions, organized in folders with a version history.
  • Upload documents such as policy terms, manuals, price lists and spreadsheets of reference data. See Knowledge documents.
  • Add your website or help center by URL or sitemap, and keep it refreshed. See Website sources.
  • Time-limit an article for a promotion, a seasonal policy or a planned closure.
  • Limit an article to some channels, so a phone call never reads out a long URL.
  • Publish articles to your help center, independently of what the AI agent uses.
  • Keep articles in sync with a CMS, a feed or a spreadsheet. See Syncing articles from another system.

Set it up

Hand your agent the material you already have and let it do the writing:

Ask Copilot or your AI agent

Add our help center at help.example.com to the knowledge base, and turn the attached returns policy PDF into articles, one topic per article, written the way customers ask. Then test that the AI agent answers our ten most common return questions correctly.

In the dashboard, open Settings -> Automation -> Knowledge and choose Articles, Documents or Websites.

How it works

The AI agent does not know your knowledge base. It searches it.

Your knowledge base is never written into the system prompt. Instead, the AI agent gets:

  1. A one-line note that a knowledge base exists and roughly how much content is in it.
  2. A single tool, searchKnowledgeBase, that takes a search query and returns the matching passages.

When a customer asks something factual, the AI agent writes a search query, reads what comes back and answers from it. It works like a support agent who searches a help center instead of reciting it from memory. If it needs more, it searches again: up to nine searches in one reply, and again on later messages.

The AI agent is only as good as what it can find. If the answer isn't in the knowledge base, searching won't invent it. And if the answer is there but phrased so differently from how customers ask that search doesn't surface it, the AI agent effectively doesn't have it either.

It turns on by itself

searchKnowledgeBase is not something you enable, and it is not tied to a workflow. Unlike actions, which only become available inside a workflow that includes them, it is always available as long as there is something to search:

Knowledge base stateWhat the AI agent gets
At least one active entry (an article, webpage or document)The tool and the knowledge base note, from the first message
Completely empty, or everything inactiveNeither. The tool doesn't exist for the AI agent

A new business with one article can already look it up, with no workflow, rule or configuration. Equally, if your knowledge base is empty, instructing the AI agent to "check the knowledge base" does nothing: there is no tool for it to call.

Where knowledge comes from

Articles

Articles are the primary source, and the one you'll use most. An article is a titled entry in Markdown that you write under Settings -> Automation -> Knowledge -> Articles, organized in folders. Use articles for anything you want deliberate control over: policies, procedures and canonical answers to common questions.

Articles support folders, version history, archive and restore, translations for the help center, and JSON import and export for bulk editing.

If you have Zendesk connected, its Help Center articles can be synced in and become ordinary articles here, marked with their source. Other synced sources work the same way: once imported, they behave like any other article. To keep articles in step with a system of your own, such as a CMS or an XML feed, see Syncing articles from another system.

Websites

Point Octocom at a URL or a sitemap and it scrapes the pages into the knowledge base. Sitemap mode previews the URL tree and takes include and exclude patterns with wildcards, so you can pull in /help/* without your entire blog. Sitemaps are re-checked on a schedule, and single pages can be rescraped on demand. To manage pages programmatically or keep them in sync with an external feed of links, see Website sources.

Websites work well for a help center or documentation site you already maintain elsewhere. They are weaker as your only source: scraped marketing pages tend to be long and vague, which makes for poor search results.

Documents

Upload files directly. Accepted formats: .pdf, .docx, .txt, .md, .csv, .xlsx, .xls.

A text document becomes one knowledge base entry with its extracted text. Spreadsheets and CSVs are handled row by row: each row becomes its own entry, which suits structured reference data such as a list of branches, a size chart, a price list or shipping rates per country.

After upload, a file is processed before the AI agent can find it. The documents table shows a Learned percentage while that happens. It usually takes seconds, longer for large PDFs. See Knowledge documents for uploading through MCP and the REST API, indexing status and safe automated refreshes.

How search works

This explains most "why didn't it find that?" situations.

Everything is chunked. Content is stored as passages, not whole articles. Anything up to about 6,000 characters stays as a single chunk. Longer content is split into 5,000-character windows that overlap by half, so a fact near a split point still appears whole in at least one chunk. For articles, the title is stored with the body, so a clear, descriptive title helps the entry get found.

Search is by meaning, not keywords. The AI agent's query is compared with every chunk by semantic similarity, so "can I send this back?" can match an article titled "Return policy" with no shared words.

Results are filtered before they reach the AI agent. The most similar chunks are gathered as candidates, then a language model reviews them against the query and keeps only the ones that answer it. The AI agent receives a focused set of passages, not a pile of loose matches, and there is a hard cap on the total volume returned per search.

Controlling what the AI agent can see

Each article has its own controls in the AI agent section of the article editor:

ControlWhat it does
Use in answersWhen off, the article is invisible to the AI agent. It still exists and stays editable. Use this when an answer is temporarily wrong
From / UntilAn optional date window. Outside it, the article is invisible to the AI agent. Useful for seasonal policies, a promotion's terms, planned closures or a temporary service change
ChannelsRestricts the article to specific channels. Leave it empty and the article applies everywhere (the default)

Channel scoping is for facts that are true on one channel and wrong on another: a phone call shouldn't read out a long URL, and web chat shouldn't quote phone-queue wait times.

These controls exist for articles only. Scraped webpages and uploaded documents are always active on every channel. If a fact needs a date window or channel scoping, put it in an article.

Website pages can be removed and documents archived. Archived documents and articles are excluded from search and can be restored.

Help center visibility is separate

An article can also be Published (in the Help center section of the editor), which shows it in your customer-facing help center. That is independent of whether the AI agent uses it: the AI agent follows Use in answers, not Published. Most articles are for the AI agent only. New articles start unpublished, in the dashboard, through MCP (create_article) and through the REST API, so publishing one is a deliberate extra step. Internal escalation criteria or margin thresholds should stay unpublished.

The reverse does not hold: an article with Use in answers switched off is never shown in the help center or its public APIs, even when it is published. Switching off a temporarily wrong answer takes it away from customers everywhere.

Folders cap what their articles can do

Folders group articles in the dashboard and become the sections of your help center. Each folder has the same two switches as an article, AI agent and Help center, and they act as a ceiling:

Folder switchEffect on the articles inside
AI agent offNone of its articles reach the AI agent, whatever their own Use in answers setting
Help center offThe folder and all its articles are hidden from the help center and its public APIs

Each article keeps its own settings. Moving an unpublished article into a published folder does not publish it, and switching a folder back on restores exactly the articles that are themselves on. A folder with both switches off holds internal, team-only knowledge. Deleting a folder moves its articles to the top level and carries any switch that was off over to them, so nothing becomes visible by accident.

Translations are for the help center

An article's own title and content are its main-language version, and that is what the AI agent searches. To offer the help center in more languages, add the languages in the help center settings, then add a translation of each article. Translations are written by you or your AI agent through MCP; nothing is translated automatically. A translation is marked outdated when the main-language text changes after it was written.

Writing knowledge the AI agent can find

The knowledge base is a search index, and content that reads well to a person isn't automatically content that retrieves well. A few habits make a large difference:

Write in the customer's words, not your internal ones. An article titled "RMA process, tier 2" won't match "I want to return my order", and "FNOL procedure" won't match "I need to report an accident". Titles and opening sentences should read like the question a customer would ask.

One topic per article. A single sprawling "Policies" article gets chunked arbitrarily, and a search about delivery times may surface the chunk about warranty claims. Separate articles retrieve far more precisely.

Make each article self-contained. The AI agent may see one chunk with no surrounding context. "As mentioned above, this also applies here" means nothing on its own. Repeat the necessary context instead of referring to it.

State facts plainly. "Returns are accepted within 30 days of delivery, provided the item is unused and in its original packaging" is usable. "We aim to be flexible about returns wherever possible" gives the AI agent nothing to answer with, and it will either hedge or hand off.

Cover the phrasings customers use. If people ask about "refunds", "money back" and "cancelling" for the same underlying policy, mention those terms in the article. Semantic search is good, but it isn't telepathic.

Articles are searched in the language they're written in. If you maintain translations for your help center, the AI agent still searches the main-language text and answers the customer in their own language. You do not need a translated copy of every article for the AI agent to work in several languages.

When to use the knowledge base, and when not to

Knowledge and behavior can live in three places. Choosing the right one matters more than how well you write any single entry.

What you're addingWhere it belongs
A fact the AI agent needs only when it's relevantKnowledge base
A procedure for a specific situation, especially one that takes actionsA workflow
A global constraint that must hold in every conversationA bot rule

Most of your content belongs in the knowledge base. It costs nothing when it isn't relevant, and there's no practical limit on how much you can have. Bot rules, by contrast, are deliberately capped because they occupy the system prompt on every turn.

One boundary to be explicit about: the knowledge base is read-only reference material. It tells the AI agent things. It cannot make the AI agent do things. An article that says "when a customer asks for a refund, issue it" will not cause a refund: the AI agent has no refund tool unless a workflow gives it one. Anything that involves an action belongs in a workflow.

Troubleshooting: the AI agent didn't find the answer

Work down this list:

  1. Is the entry active? Check Use in answers, the From and Until dates and the folder's AI agent switch. An expired Until date silently removes the article from search.
  2. Is it channel-scoped? An article restricted to web chat is invisible on email.
  3. Has it finished processing? New documents and newly scraped pages take a moment to become searchable. Check the Learned column.
  4. Would you find it by searching? Read the customer's message, imagine the search phrase the AI agent would write, and ask whether your article's title and opening line resemble it. This is by far the most common cause: the content is there, phrased in internal language.
  5. Is it buried in a long article? A fact deep inside a general article competes with everything around it. Split it out.
  6. Is it a workflow problem? If the AI agent found the right information but did the wrong thing with it, that's not a knowledge gap. See Workflows.

The conversation's debug view shows exactly what the AI agent searched for and what came back. Every searchKnowledgeBase call is logged with its query and how many passages it returned, which usually settles the question. See How the AI agent works.

For developers and AI agents

Date windows

Through MCP (create_article, update_article) and the REST API (POST and PATCH /rest/v1/articles), the From and Until window is activeFrom and activeTo: ISO 8601 date-times with a time zone, such as 2026-12-01T00:00:00Z. null means no date, and on an update an omitted field keeps the current date. A window that ends before it starts is rejected. get_article and GET /rest/v1/articles/{id} return the current dates.

Syncing articles from another system

A recurring job can keep articles in step with a feed, CMS or spreadsheet through the REST API. Recurring jobs get OCTOCOM_API_BASE_URL and OCTOCOM_ORG_API_KEY injected, so no API key secret is needed.

MethodPathUse
GET/rest/v1/articles?businessSlug=shop&limit=500&page=1Page through live articles: id, title, externalId, contentHash
POST/rest/v1/articlesCreate {businessSlug, title, content, externalId}
PATCH/rest/v1/articles/{id}Update {businessSlug, title, content} or claim with externalId
DELETE/rest/v1/articles/{id}?businessSlug=shopArchive an article the source no longer has (restorable)
GET/rest/v1/articles/{id}?businessSlug=shopRead one article's full content
  • externalId is your stable key for the source item, such as its URL or record ID. It is unique among the business's live articles: a second article with the same key is rejected with 409 and the existing article's id. Keyed articles are matched only by key, so several source items may share a title. Articles without a key are left to people.
  • contentHash is the MD5 hex digest of the UTF-8 content. The list returns it instead of the content, so a job can find changes without downloading every body: hashlib.md5(content.encode("utf-8")).hexdigest().

A reliable sync recomputes the difference on every run instead of keeping a cursor:

  1. Fetch the source and build each item's exact title and content.
  2. List all articles and keep the ones whose externalId belongs to this source.
  3. Create missing keys, update keys whose title or contentHash differ, and archive keys the source no longer has.
  4. Stop starting writes well before the 5-minute limit. Each content change recomputes search embeddings, so writes take a second or more. The next run lists again and continues with whatever is still different, so a source-wide change converges over several runs and an unchanged source costs no writes.

Guard archival against a broken or truncated source: if the source suddenly has far fewer items than you already own, skip archiving and report it. Archived articles can be restored from their version history.

The MCP tools create_article, update_article, list_articles and get_article accept and return the same externalId and contentHash. To change part of an article through MCP or Copilot, read it with get_article and pass contentEdits with its contentRevision to update_article; see Targeted code and instruction edits.

On this page