Circuit breaker for n8n AI agents

★ 6.9 · n8n · medium · 10 nodes

Automatic Circuit Breaker for n8n Agents is an n8n automation template that implements the circuit-breaker pattern to protect AI agents and workflows from uncontrolled execution. Reach for it when an agent starts looping and hammering an external API endlessly, when LLM call costs exceed your budget, when you need an emergency stop across the entire pipeline without manual intervention, or when an agent is stuck in an iteration with no exit. The pack contains five standalone JSON workflows: error-rate-breaker (trips the circuit when error rate crosses a threshold), example-protected-agent (a reference agent with a breaker built in), iteration-budget (caps the number of iterations), kill-switch (hard stop trigger), and spend-cap (cost limit). Trigger: executeWorkflowTrigger. Integrations: Postgres (stores spend data), stopAndError node for forced termination. Node count: 10. Stack: n8n plus Postgres. The direction is protection and reliability for agentic pipelines, not monitoring or full observability — use a dedicated observability stack alongside if you need that. Works for any n8n agent calling external APIs under a cost budget; requires basic familiarity with n8n environment variables.