Phase 1: Build
The build phase processes input text and updates the schema. No chatbot response is generated.- The CM agent receives the input text
- It inspects the current schema structure
- It extracts relevant information and calls SCP operations (update, create)
- The schema is persisted to disk
build() when you want to process information into memory without generating a response — for example, ingesting conversation history, documents, or notes.
Phase 2: Chat
The chat phase recalls relevant schema data and generates a grounded response.- The CM agent recalls relevant schema fields based on the user’s message
- The recalled data is injected into the chatbot’s prompt
- The chatbot generates a response grounded in the structured memory
Dynamic Schema Update from Chat
Instead of callingbuild() explicitly, CogOS can automatically update schemas during the chat flow.
Configure schema_update_rounds to enable auto-updating:
Context Window Management
CogOS manages the chatbot’s context window throughcontext_rounds:
context_rounds = 10(default) — The chatbot sees the last 10 rounds of conversationcontext_rounds = 0— Single-turn mode, no conversation history
context_rounds, schema memory is auto-injected into the user prompt to preserve context continuity.
This approach keeps the context window lean while maintaining rich, structured memory through the schema system.