agent-loop
Installation
SKILL.md
Agent Loop
Pain Signals — You Need This Pattern When:
- A single LLM call cannot solve the task — it requires multiple steps with intermediate observations
- The number of steps is not known in advance — the agent must decide when it is done
- Each step depends on the result of the previous step (not a fixed pipeline)
- The task requires exploration — reading files, searching, querying databases, trying approaches
- You need an LLM to plan and execute a multi-step workflow autonomously
This is the most complex LLM pattern. Use it only when Prompt Chaining (fixed pipeline) and Tool Use (single-round) are insufficient.
Core Principle
An agent is a state machine that loops through observe-think-act cycles until a termination condition is met. The LLM provides the "think" step; your system provides the "observe" and "act" infrastructure.