AgentModule + Engine kernel.
Use this page as the map. Use the Tutorials track when you want a step-by-step build.
| Pattern | Best for | Key mechanism |
|---|---|---|
| ReAct | Open-ended tool use, coding, search | Thought -> Action -> Observation loop |
| PlanAct | Multi-step tasks with a known structure | Explicit plan list, cursor advances on success |
| Tree-of-Thought | Exploration, research, question answering | Decision.branch() over scored candidates |
| Reflexion | Tasks requiring grounded self-critique | Actor drafts, critic evaluates, loop until grounded |
Pattern overview
ReAct
ReAct is the simplest useful pattern in QitOS.- The model emits
Thought:andAction: ReActTextParserparses the text intoDecision- tools execute
reduce()appends the latest trajectory to state
examples/patterns/react.py
PlanAct
PlanAct adds one explicit planning layer before normal execution.decide()creates the plan when needed- state holds
plan_stepsand acursor - later steps still use the Engine’s ordinary model path
examples/patterns/planact.py
Tree-of-Thought
Tree-of-Thought is for exploration rather than single-path execution.- candidate branches are generated and scored
- the Engine selects a branch
- evidence accumulates across branch decisions
examples/patterns/tot.py
Reflexion
Reflexion adds grounded self-critique.- the actor proposes a move
- a critic evaluates the trajectory
- the loop can retry or stop based on critique output
examples/patterns/reflexion.py
How to choose
| If your task feels like… | Start with… |
|---|---|
| ”I need the next best tool call right now.” | ReAct |
| ”The task has a stable checklist or execution order.” | PlanAct |
| ”I need to compare several plausible branches.” | Tree-of-Thought |
| ”I need grounded critique and retry behavior.” | Reflexion |
Suggested learning order
Lesson 1: ReAct
Learn the minimal thought-action-observation loop.
Lesson 2: PlanAct
Learn explicit planning without changing the kernel.
Claude Code-style agent
See how the same kernel becomes a long-running coding agent.
Code security audit agent
See how the same kernel becomes a domain-specific audit workflow.
