Knol

Knol Docs

Tenant + OSS Documentation

API Reference

Canonical REST surface for Knol OSS gateway plus enterprise tenant OpenAPI links.

Configured Service Endpoints

Gateway API

Base URL: https://api.aiknol.com

Write/search paths are relative to this base.

Tenant Swagger UI

URL: https://api.aiknol.com/docs/

OpenAPI docs generated by the tenant service.

Config Source

All docs URLs are configured in frontend/docs/src/config/site.ts.

Override via env vars: NEXT_PUBLIC_API_BASE_URL and NEXT_PUBLIC_TENANT_SWAGGER_URL.

Authentication

Send API key in Authorization header as bearer token:

Authorization: Bearer knol_live_...

API keys map to tenant + role (`ReadOnly`, `Developer`, `Admin`), and every request is tenant-scoped.

Gateway Endpoints

MethodPathRoleNotes
POST/v1/memoryDeveloper+Write a memory entry
POST/v1/memory/batchDeveloper+Write multiple memories
POST/v1/memory/searchReadOnly+Hybrid memory search
GET/v1/memory/:idReadOnly+Fetch a memory by id
PUT/v1/memory/:idDeveloper+Update a memory
DELETE/v1/memory/:idDeveloper+Soft delete a memory
POST/v1/memory/:id/restoreDeveloper+Restore soft-deleted memory
POST/v1/memory/exportReadOnly+Export memories
POST/v1/memory/importDeveloper+Import memories

Write Memory Example

curl -X POST https://api.aiknol.com/v1/memory \
  -H "Authorization: Bearer $KNOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"User likes concise replies","role":"user"}'

content is required. user_id, when provided, must be a UUID.

OpenAPI and Source Links