Knowledge bases API
A knowledge base is a searchable collection of content (text, web pages, or files) that agents — or your own code — can retrieve from. The API splits into two pages by access level:
| Page | Access | What it covers |
|---|---|---|
| Manage knowledge bases | Admin key | Create, list, get, update, delete; append content; upload files. |
| Search & query | Member key | Semantic search, RAG question-answering, ingestion status, embeddings. |
All endpoints are under https://tmmate.ai/api/v1/knowledge-bases and return the { "data": ... } envelope.
Knowledge base types
A knowledge base has one of three source types, chosen at creation:
text— raw text content you supply.website— URLs that are fetched, cleaned, chunked, and embedded.files— an empty shell you then attach files to (PDF, DOCX, DOC, TXT, CSV, Markdown).
Content is chunked and embedded with openai/text-embedding-3-small (1536 dimensions). Embedding is synchronous — content is searchable as soon as the create/append/upload call returns 201.
KnowledgeBaseResponse
The object returned by the management endpoints:
| Field | Type |
|---|---|
id | UUID |
workspaceId | UUID |
title | string |
description | string | null |
type | string |
createdBy | UUID | null |
createdAt / updatedAt | ISO 8601 | null |
contentSize | object | null — { bytes, formatted, wordCount, chunks, fileCount, webPageCount } |