Knowledge bases

Knowledge bases are private, tenant-owned document repositories that power Axon's RAG (Retrieval-Augmented Generation) pipeline. Documents are chunked, embedded, and stored as vectors — entirely within your data residency region.

Create a knowledge base

bash
POST /v1/axon/knowledge-bases
NameTypeRequiredDescription
namestringYesFriendly name (e.g. "Security runbooks", "HR policies").
data_residencystringYesau | us | eu | uk | sg. Cannot be changed after creation.
descriptionstringNoWhat this knowledge base contains.
embedding_modelstringNoEmbedding model to use. Defaults to "axon-embed-1".
chunk_sizeintegerNoToken count per chunk during indexing. Default 512.
chunk_overlapintegerNoToken overlap between adjacent chunks. Default 64.
bash
curl -X POST https://api.hldgroup.org/v1/axon/knowledge-bases \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Security runbooks",
    "description": "Incident response playbooks, SOP docs, and security policies",
    "data_residency": "au",
    "chunk_size": 512,
    "chunk_overlap": 64
  }'

Upload a document

bash
POST /v1/axon/knowledge-bases/:id/documents
NameTypeRequiredDescription
filenamestringYesFile name with extension.
contentstringNoRaw text content (for inline uploads).
source_urlstringNoURL to fetch content from (alternative to content). Axon fetches and stores at indexing time.
mime_typestringNotext/plain | text/markdown | application/pdf | text/html | text/csv | application/json | application/vnd.openxmlformats-officedocument.wordprocessingml.document. Defaults to text/plain.
bash
curl -X POST https://api.hldgroup.org/v1/axon/knowledge-bases/kb_01hxyz/documents \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "ransomware-response-v3.md",
    "mime_type": "text/markdown",
    "content": "# Ransomware Incident Response\n\n## Immediate containment...\n"
  }'

Returns 202 Accepted with status indexing. Subscribe to the axon.document.indexed webhook or poll the documents list for status: "ready".

Document statuses

NameTypeRequiredDescription
indexingstatusNoDocument is being chunked and embedded. Not yet queryable.
readystatusNoDocument is fully indexed and available for RAG queries.
failedstatusNoIndexing failed (unsupported format, too large, etc.).

List documents

bash
GET /v1/axon/knowledge-bases/:id/documents

Delete a knowledge base

bash
DELETE /v1/axon/knowledge-bases/:id

Permanently deletes the knowledge base and all its documents and vectors. This cannot be undone.

Warning:Document vectors are stored in an isolated, tenant-scoped vector namespace. No other tenant's documents are ever in the same search space as yours.