Agent Thinking Model
How Aleph's agents observe, think, act, and learn — the Think→Act loop, the thin-harness/dumb-loop philosophy, dual-process cognition (System 1 + System 2), and first-principles anchoring.
Aleph's agents are not simple request-response chatbots. They are a cognitive architecture designed to pursue goals purposefully, reason about complex tasks, and learn from experience. This page describes the thinking model that drives every agent interaction — from the Think→Act loop to the dual-process cognition that balances speed and depth.
The thinking model draws from cognitive science — especially Daniel Kahneman's dual-process theory — and is implemented through concrete architectural patterns in Rust. The Harness's role is thin scaffolding: all intelligent decisions are made by a single LLM reasoning call (R10).
The Think→Act Loop
Every agent interaction follows the Think → Act loop. This is the fundamental cycle that drives Aleph's behavior:
┌──────────┐
│ Think │ Reason about what to do: parse intent,
│ │ retrieve context, plan
└────┬─────┘
│
v
┌──────────┐
│ Act │ Execute the plan: invoke tools, generate
│ │ responses, modify state
└────┬─────┘
│
v
(model's explicit stop → done)The historical OTAF (Observe–Think–Act–Feedback) is retired —
src/agent_loop/was deleted during the Harness migration (Phases 6/7). The Harness now only carries Think→Act turn scheduling; it does no reasoning (R10's "Dumb Loop").
Think
The Think stage is where dual-process cognition operates (described below). The model:
- Parses user intent (a single LLM call naturally covers this — the Harness does not classify intent)
- Retrieves relevant context (on-demand progressive-disclosure tools + the memory system)
- Generates a plan (LLM reasoning + the Thinker's prompt layers)
- Defines success (the Harness does not judge completion other than the model's explicit stop — R10's "Don't #3")
Act
The Act stage executes the plan through the tool system:
- Tool calls: invoke builtin tools, MCP servers, plugins, or skills
- Resource-scope concurrency claims: tools declare fs/network/process conflict scopes; Act partitions a batch into groups that are internally resource-disjoint, dispatches intra-group concurrently and inter-group serially
- Deduplication and memo: a duplicate
(name, args)within or across batches reuses the first result - Response generation: emit text, code, or structured output for the user
- State modification: update memory, session state, the command signing ledger (
src/builtin_tools/command_ledger.rs) - Subtask orchestration: spawn child agents via
FlowRunTool/ Teams
All actions go through the security guard system. Potentially-dangerous operations require explicit approval (Ask / Auto / Full three-tier exec permissions + the [sandbox.command_policy] hard floor).
Completion
Only the model's explicit stop ends a turn (the Harness does not make deterministic completion judgments — R10's "Don't #3"). max_iterations is still in place as a safety cap, but the "good enough" decision is the model's to make.
Dual-Process Cognition
Inspired by Daniel Kahneman's Thinking, Fast and Slow, Aleph implements a dual-process cognitive architecture with two complementary systems:
System 1: Fast and Intuitive
System 1 is the fast, pattern-matching layer. It provides quick "intuition" based on accumulated experience:
- Experience retrieval: vector similarity search over past successful task completions
- Quick classification: instantly categorize the request as simple (handle directly) or complex (kick off System 2)
think_level = low/off: default leans toward System 1
System 1 is what makes Aleph responsive. For routine tasks, the model can generate a plan almost immediately by recognizing patterns and applying known solution templates.
System 2: Slow and Deliberate
System 2 is the deep-reasoning layer. It handles cases where intuition falls short:
- LLM reasoning: full reasoning capacity of the language model to analyze complex problems, generate novel solutions, and evaluate trade-offs
think_level = high/xhigh: leans toward System 2- Extended thinking: Claude's extended thinking, etc.
- Multi-step planning: decompose complex goals into ordered action sequences with dependencies and fallback strategies
System 2 is what makes Aleph capable. For novel or complex tasks, the model reasons more deeply to produce solutions that go beyond pattern matching.
How They Collaborate
The two systems are coordinated by a single LLM call — the Harness stays out of it (R7 LLM Sovereignty). The model decides which path to take based on task complexity, think_level, available context, and other factors.
The Three User-Adjustable Axes
Aleph has three user-adjustable dimensions that form the core axes for classifying user preference:
| Axis | Range | Default | What it controls |
|---|---|---|---|
exec_tier (execution tier) | ask / auto / full | auto | permissions |
thinking (thinking level) | off / minimal / low / medium / high / xhigh | minimal | inference budget |
session_mode (session mode) | chat / work / code | work | tool presentation |
The three are orthogonal. session_mode only statically partitions the tool presentation surface (progressive-disclosure core set + deferred-tool tier); it never affects permissions — those are still controlled by exec_tier and the approval gate. Switchable at runtime via the session_set_mode tool.
First-Principles Anchoring
Before any task execution begins, Aleph applies first-principles thinking — define success before starting to execute. The historical POE (Principle-Operation-Evaluation) architecture played this role, but it has been retired — Aleph 26.5+ migrates POE's "intelligence" to system prompt templates (R9), letting a single LLM call naturally cover every judgment:
User request → LLM reasoning (including success definition) → execute → model's explicit stopThe Harness does not classify intent, does not judge completion, does not moderate content, does not pick error-recovery strategies (R10's five "Don'ts"). The Harness is scaffolding, not cognition.
Self-Learning
The thinking model is not static. The system's self-evolution is carried by the SkillOpt-discipline dreaming pipeline at src/memory/dreaming/: every successful execution is logged and gated by four SkillOpt primitives — evolution gate / edit budget / recall-evidence gate / health score — before any promotion (see DREAM_DAEMON.md for the full pipeline). Promoted skills become part of the System 1 pattern library, allowing the model to handle formerly-complex tasks at faster thinking levels. This is how agents become faster and more capable over time.
Putting It All Together
- The Think→Act loop provides the moment-to-moment execution cycle
- Dual-process cognition balances speed (System 1) with depth (System 2)
- The thinking level matches cognitive effort to task complexity
- First-principles anchoring ensures the model always knows its goal (in the prompt, not in middleware)
- The three user-adjustable axes give a control surface (exec_tier × thinking × session_mode)
- Self-learning turns successful executions into reusable skills
The result is an agent that doesn't just respond to prompts — it pursues goals purposefully, learns from experience, and knows when to ask for help.
Further Reading
- Design Philosophy — the principles behind Aleph
- Five Layers of Emergence — how the thinking model fits the L1–L5 stack
- Domain Modeling — the DDD foundation of Aleph's codebase
- Architectural Redlines — the ten non-negotiable hard constraints
- Architecture — the technical implementation of the agent loop
Five Layers of Emergence
The L1-L5 model describes how intelligence emerges in Aleph — from raw knowledge through domain classification, atomic skills, functional modules, to polymorphic agents.
Domain Modeling
How Aleph uses Domain-Driven Design (DDD) in Rust — Entity, AggregateRoot, ValueObject, bounded contexts, and the trait-based architecture that organizes the codebase.