Skip to Content
Docs are being rebuilt — start at Introduction → How it works.

Knowledge base

A knowledge base (often shortened to KB) is a searchable collection of documents an agent can read. Think of it as the filing cabinet next to your colleague’s desk — when they get a question, they reach in, pull the relevant file, and answer with a citation.

Without a knowledge base, an agent only has its general training and your prompt. Add a knowledge base and the agent can ground its replies in your content — your HR policies, your product specs, your runbooks, your legal templates.

What can go in a knowledge base

  • PDFs — contracts, policy documents, product specs.
  • Word documents (.docx, .doc).
  • Plain text (.txt).
  • Web pages — crawled and converted (add a URL as a web source).

Files are uploaded once and indexed automatically. Indexing extracts the text, splits it into chunks, embeds each chunk into a vector representation, and stores them so retrieval is fast.

How retrieval works

When an agent gets a question:

  1. The question is also embedded.
  2. The knowledge base searches for chunks whose embedding is similar to the question.
  3. The top few matches (usually 3–10) are pulled and inserted into the prompt before the model writes the reply.
  4. The model writes the reply, citing the source documents inline (or, depending on the agent’s instructions, as a list at the end).

This whole loop is called retrieval-augmented generation (RAG). The agent doesn’t memorise the documents — it looks them up every turn. That means edits to your documents show up in the next answer; you don’t have to “retrain” anything.

Attaching a knowledge base to an agent

A knowledge base lives at the workspace level (see Workspace) but is attached to one or more agents in the agent builder’s Knowledge tab. Multiple knowledge bases can be attached to the same agent — the search runs across all of them.

Permissions

  • A knowledge base belongs to one workspace. It is never visible to another workspace.
  • Inside a workspace, every member can see every knowledge base by default.
  • You can scope individual knowledge bases to specific roles or members through workspace settings if you have sensitive content (e.g. board materials).

Where the embeddings live

By default, embeddings live on TeamMate-managed infrastructure, scoped to your workspace. Two opt-in alternatives:

  • S3 snapshots. Periodic backups of the entire vector index to your own S3 bucket.
  • External vector store. Connect Pinecone, Vespa, or any compatible store. Useful if you have an existing investment.

The original documents always live on workspace-attached storage (S3 or DigitalOcean Spaces).

Knowledge base vs tool vs skill

  • A knowledge base is reference material the agent reads from.
  • A tool is something the agent does.
  • A skill is a playbook the agent reads and follows.

You can have all three on the same agent. The HR Assistant agent might read from a TeamMate HR Policies knowledge base, call send_email_tool, and load the weekly-status-update skill — all in one conversation.