CognitiveMode
The autonomous control loop that orchestrates task execution, manages reasoning state, and defines the agent's problem-solving persona.
Core Architecture
Stateful
Strategy Engine
⚙️ OrchestrationConfig.json
{
"mode": "AdaptivePlanningMode",
"schema_strategy": "ScientificMethod",
"auto_fix": true,
"model_config": {
"smart": "gpt-4-turbo",
"fast": "gpt-3.5-turbo"
}
}
→
🧠 Live Transcript
State: Hypothesis Testing
graph TD
A[Analyze Error] --> B{Hypothesis?}
B -->|Network| C[Check DNS]
B -->|Code| D[Run Linter]
C --> E[Refute Hypothesis]
E --> A
Thinking: Network checks passed. Switching strategy to Code Analysis.
Executing: RunCodeTask...
Architectural Patterns
Cognotik implements several distinct modes for orchestrating agent behavior.
| Mode Name | Architecture | Best Use Case |
|---|---|---|
| Adaptive | Loop(Think -> Act -> Reflect) |
Complex, ambiguous goals requiring research and self-correction. |
| Coding | TDD / Refactor Loop |
Software engineering tasks, bug fixing, and feature implementation. |
| Waterfall | Plan -> Review -> Execute |
Well-defined problems requiring user approval of the roadmap. |
| Chat | Listen -> Act -> Reply |
Interactive debugging or simple "Chat with Code" workflows. |
| Hierarchical | Tree(Decompose -> Delegate) |
Massive projects requiring sub-goal decomposition. |
| Parallel | Fan-out -> Aggregate |
High-throughput independent tasks or batch processing. |
| Council | Multi-agent Consensus |
High-stakes decision making and adversarial review. |
| Protocol | Step-by-step Validation |
Compliance and safety-critical workflows. |
| PersonaChat | Role-play Interaction |
Specialized domain expertise and persona-driven assistance. |