# Intelligence

`tnsai-intelligence` adds planning, multi-step reasoning, state machines, context management and learning to agents. Add the module to use any of these pages; see [Install](../start/install.md).

| Page | Covers |
|---|---|
| [Planning](planning.md) | Planners that choose actions from goals and state, and LLM-written plans with review and replanning |
| [Reasoning](reasoning.md) | ReAct, Tree of Thoughts, Graph of Thoughts, self-consistency and other executors that spend several LLM calls on one question |
| [State machines](state-machines.md) | Fixed states and transitions driven by events and guards |
| [Context](context.md) | Compaction, the context graph, sessions, knowledge extraction and memory consolidation |
| [Learning](learning.md) | Feedback, norms, the refinement loop and the prompt optimizer |

For typed LLM output, see [Structured output](../agents/structured-output.md).
