Skip to main content
Start the REST API server:
The server also hosts the Web UI at the root URL.
For production deployments, use cogos serve start --autostart to run as a background daemon with boot auto-start. See Service management for details.

Endpoints Overview

Core

MethodPathDescription
POST/api/buildProcess text into memory
POST/api/chatChat with memory (returns schema_updated flag)
POST/api/listenListen mode: periodic build + every-turn recall
POST/api/update-schema-from-chatManually update schema from recent chat rounds

Configuration

MethodPathDescription
GET/api/config/schema-update-roundsGet current auto-update setting
PUT/api/config/schema-update-roundsChange auto-update setting at runtime
GET/api/config/chatbot-context-roundsGet chatbot context window size
PUT/api/config/chatbot-context-roundsChange chatbot context window at runtime

Schemas

MethodPathDescription
GET/api/schemasList schema domains
GET/api/schemas/{name}Get schema details
GET/api/schemas/file-data/{schema_id}Get full domain data from schema file
GET/api/schemas/recall-allGet all schema data as formatted text (for LLM injection)
POST/api/schemas/recallSelectively recall schema data relevant to a message
GET/api/schemas/inspect-allToken-efficient schema overview
POST/api/schemasCreate a new schema domain
DELETE/api/schemas/{name}Delete a schema domain
DELETE/api/schemasDelete all schema domains
POST/api/schemas/from-templateCopy template as a schema file and switch session to it
POST/api/schemas/create-fileCreate a named schema file (with optional template)
POST/api/schemas/newBackup current schema and start fresh
POST/api/schemas/switchSwitch session to a different schema
POST/api/schemas/restoreRestore a schema from backup
GET/api/schemas/savedList all standalone schema files
GET/api/schemas/backupsList schema backups

Templates

MethodPathDescription
GET/api/templatesList available templates with info
GET/api/templates/groupedList templates grouped by source (builtin/user/custom)
GET/api/templates/{name}Get full template data
POST/api/templates/customSave a custom template
DELETE/api/templates/custom/{name}Delete a custom template

Sessions

MethodPathDescription
GET/api/sessionsList sessions (includes schema_id)
POST/api/sessionsCreate session (with optional schema_id)
DELETE/api/sessions/{id}Delete a session
POST/api/sessions/{id}/clearClear session history (preserve schemas)
GET/api/sessions/{id}/historyGet session chat history
GET/api/sessions/{id}/schema-idGet session’s bound schema ID
PUT/api/sessions/{id}/schema-idBind session to a different schema

Usage Examples

Build Memory

Chat

Listen (Periodic Build + Every-Turn Recall)

Update Schema from Chat

Runtime Config

Schema Lifecycle

Templates

Sessions