Skip to main content
Add a Markdown knowledge file to project source, then look it up and read the matching content. Use a project you can edit and set an API credential. The example stores a synthetic policy under knowledge/; replace its contents with your project’s information.

1. Write a knowledge file

Create the file with PUT /projects/{project_reference}/files/{file_path}. The path is URL-encoded, and expected_absent prevents replacing an existing file.
add-knowledge.sh

2. Find the knowledge file

Find the file through POST /projects/{project_reference}/knowledge/search:
find-knowledge.sh
Search matches file paths and frontmatter and returns paths with matching metadata. It does not return the document body. Read a matching path with GET /projects/{project_reference}/files/{file_path}.

Verify the result

Confirm that search returns knowledge/refund-policy.md, then read that file and check its content. Use the same branch or content version for both requests. If search returns no match, check the file’s location, frontmatter, and selected content version. Importing a file into upload storage does not automatically add it to this source-based search.

Vector retrieval

For semantic search, index content chunks and their embeddings through the Knowledge API. That index is separate from frontmatter search and project uploads.

API references