The Agentic Loop

{"tool_call": "bash"} Observation (stdout) TOOL EXECUTION ENVIRONMENT AgentLoop while(true) 1. Read Context 2. Prompt LLM 3. Parse Action Read Tool read_file() Write Tool write_file() Edit Tool replace_text() Bash Tool execute_cmd() .pi/extensions/*.ts Inject custom tools dynamically

Interactive Diagram

Hover over any component to understand its role in the agentic loop, or click "Simulate Flow" to watch the execution sequence step-by-step.