Build garage · 3 min

Agent loop code

Step through Think → Act → Observe safely.

Arcade: 0 XP · 0d streak — clever clears earn up to ★★★.

Playground

Agent loop in code

Think → act → observe — cap steps and gate dangerous tools.

  1. Model plans next action
  2. Tool call returned — validate args
  3. Append tool result to messages
  4. Stop at max steps or final answer