Skip to main content
CogOS resolves configuration from multiple sources (highest priority wins):
  1. Environment variables (API_KEY, MODEL, BASE_URL)
  2. YAML config file (configs/cogos.yaml, created by cogos init)
  3. Dataclass defaults

Config File

Generated by cogos init:

Config File Resolution

PriorityPathDescription
1Explicit path (-c / from_file("..."))User-specified
2configs/cogos.yamlUser config (created by cogos init)
3configs/cogos.default.yamlDefault template (tracked by git)

Key Settings

Config KeyDescriptionDefault
chatbot.context_roundsNumber of recent chat rounds included as conversation context. When exceeded, schema memory is auto-injected. Set to 0 for single-turn.10
agent.schema_update_roundsAuto-update schema from chat context every N rounds. Set to 0 to disable.0
persistence.schemas_dirDirectory for standalone schema files shared across sessions. Backups are stored in backups/ subdirectory../schemas
listen.build_every_n_turnsIn listen mode, run the build CM every N conversation turns.5
schema.inspect_max_depthDepth for schema overview in CM prompts.3
helpers.enable_forget_handlingStrip forgotten phrases from recalled data in chat().false
helpers.enable_sensitive_handlingAdd PII warning section to the chatbot prompt.false

Supported LLM Providers

Any OpenAI-compatible API works:
Providerbase_urlmodel example
OpenAIhttps://api.openai.com/v1gpt-5.4
OpenRouterhttps://openrouter.ai/api/v1google/gemini-3.1-flash-lite-preview
vLLMhttp://localhost:8000/v1meta-llama/Llama-3-8b

Loading Config in Python