Seven stages. One complete thinking system. Perceive, Retrieve, Reason, Plan, Act, Verify, Reflect — the master blueprint for building an intelligent agent.
Individual AI techniques are powerful, but using any single one is like having a carpenter who only owns a hammer. The Cognitive Loop is the complete workshop — a universal template that organizes the full thinking process into seven clear stages, each powered by the right technique for the job.
At each stage, the system selects the most appropriate Level 2 composition. Simple problems get chain-of-thought reasoning. Complex branching problems get tree search. Tool-heavy tasks get agent loops. The key insight: which technique to use depends on the nature of the problem, and the Cognitive Loop makes that selection systematic rather than ad hoc.
This system orchestrates compositions from Level 2:
Think Step by Step Self-Ask Least-to-Most RAG Patterns Plan-and-Execute ReWOO LLMCompiler ReAct Self-Consistency ReflexionThe Cognitive Loop doesn't replace these patterns — it orchestrates them. Each stage selects the right pattern based on what the task demands.
Understand the input. What type of task is this? What's being asked? What implicit needs aren't stated? The system normalizes the raw request and extracts task structure.
Rephrase & Respond • Step-Back PromptingGather relevant context. Search memory for similar past problems, retrieve relevant documents, pull in user preferences. Build the knowledge foundation before reasoning begins.
RAG Patterns • Thread-of-ThoughtThink about the problem. A meta-controller classifies complexity and selects the right reasoning pattern: chain-of-thought for simple problems, tree search for complex ones, self-ask for multi-hop questions.
Chain-of-Thought • Tree-of-Thoughts • Self-Ask • Least-to-MostCreate a concrete action plan. Sequential steps? Run them in order. Independent steps? Run them in parallel. The planning style matches the task structure.
Plan-and-Execute • ReWOO • LLMCompilerExecute the plan. Use tools, write code, search the web, generate content. The system picks the right execution pattern — dynamic tool use, code execution, or delegated multi-model workflows.
ReAct • Program of ThoughtsCheck the work. Did the action produce the right result? Are there errors? Run verification checks and score confidence. If it passes, output the result.
Self-Consistency • Check Your WorkWhen verification fails, analyze what went wrong. Generate a self-critique, extract the lesson, store it in memory, and loop back to Reason with richer context. Up to N retries.
ReflexionA developer asks: "Fix the bug in my authentication code."
The power of the Cognitive Loop is that it mirrors how expert humans actually solve complex problems. An expert doesn't just think — they gather context, choose the right approach for the type of problem, make a plan, execute it, check their work, and learn from mistakes. Each of those steps is a distinct cognitive skill.
By making each stage explicit and selecting the right technique for each, the system avoids the biggest failure mode of simpler approaches: using the wrong tool for the job. A math problem gets code execution, not free-form reasoning. A research question gets retrieval, not hallucinated facts. A complex decision gets tree search, not a single linear chain.
Perceive the task. Retrieve context. Reason with the right pattern. Plan the approach. Act with tools. Verify the result. Reflect on failure. Seven stages, each using the best available technique — that's a complete thinking system.
The Cognitive Loop is the default "operating system" for an intelligent agent. The Adaptive Pattern Router can sit above it, deciding when to invoke the full loop versus a simpler approach. LATS can plug into the Reason stage for especially hard problems. JARVIS can handle the Act stage when multi-model workflows are needed.
At Level 4, the Cognitive Operating System and Hierarchical Agent Architecture coordinate multiple Cognitive Loops running in parallel, each handling different aspects of a larger mission.