Skip to content

Knowledge base ​

The knowledge base (KB) is the project document store on Tara. You and your agents can both search it, and every result comes with a source citation. This page shows how to create a space, push documents, search with ph kb, and let Claude Code search through MCP. You need to be signed in to Tara.

What's in the KB? ​

A space is a knowledge store that belongs to an organization and, optionally, a project. Each space has a unique key, such as acme-shop. Documents in a space are Markdown or plain-text files (.md, .markdown, .mdx, .txt) of up to 2 MiB each, and Tara splits them into chunks by heading for search.

When you search, the KB combines full-text search with exact matching of business ids such as AC-1.2. If your organization configures embeddings, the KB also searches by meaning. Each result returns its source in the form repo@commit:path#heading.

The KB doesn't pull documents from your machine on its own. Phillip reads the files on your machine and pushes them, so you control exactly which documents are shared.

The Knowledge page in the Portal lists your organization's spaces and the documents ingested, with a box to try a search.

Who can read and write? ​

Permissions are per organization. Every Owner, Admin, and Member of the organization that owns a space can read and search it. Creating a space and pushing or deleting documents need the same roles. A Viewer uses the browser only and doesn't take part in these commands.

Tara filters by permission before it ranks results. For a space you can't read, Tara responds as if it doesn't exist. There are no per-project permissions yet. A project is only a label. So don't push documents that other members of the organization aren't allowed to read.

Use ph kb ​

  1. List the spaces you can read. A * marks the spaces you can write to:

    bash
    ph kb spaces
  2. Create a space. This needs the Owner, Admin, or Member role in the current organization:

    bash
    ph kb create acme-shop --name "ACME Store" --project acme-shop
  3. Push documents from a directory in the repo. Tara keys documents by their path from the git repo root, so pushing again replaces the version, and identical content is skipped:

    bash
    ph kb push acme-shop docs/
  4. Search the documents:

    bash
    ph kb search "account lockout rule after wrong password attempts" --space acme-shop
    ph kb search "AC-1.2" --top-k 5
  5. Delete a document by its source path:

    bash
    ph kb rm acme-shop docs/old/plan.md

The --repo and --commit flags of ph kb push default to values from git (origin, HEAD), so citations are correct. For scripts, add --json to the spaces, create, push, search, and rm commands. To keep the KB current, run ph kb push in your pipeline after every merge.

Let agents search through MCP ​

The kit-knowledge kit on Tara preconfigures an MCP server for Claude Code, with three read-only tools: search, get_document, and list_spaces. Install it in your project with:

bash
ph tara add kit-knowledge

After that, the agent queries the KB inside the session, using your own token and permissions. The tool list is in MCP tools.

Current limits ​

The KB accepts only text for now, not PDF. Full-text search isn't BM25 yet and has no reranking step. Semantic search runs only when an administrator has configured embeddings. Otherwise, the KB still searches with full text. Search quality for Vietnamese hasn't been evaluated at scale, so check the results before you trust them.

Read more ​