learning-it by example

Back to the video

Reliability Patterns for AI Agents: Bulkhead, Retry, Cache

In a simulation, one busy agent left the support agent with one call served out of twenty.

Video #243 ยท Enterprise architecture and AI agents

Steps in the video

  1. 0:00 One busy agent left the support agent with one call in twenty
  2. 0:33 The idea
  3. 1:11 Setup
  4. 1:34 Four patterns, under sixty lines
  5. 2:03 Four failures
  6. 3:23 What this does not show
  7. 4:02 Mistakes to avoid
  8. 4:33 My take and next steps
  9. 5:07 Recap

Files

  • compare.py (45 lines)
  • patterns.py (55 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

Simulated faults on a counted clock with settings I chose; in the shared pool the reporting agent always asks first; the retry has no delay or backoff; the breaker has no half-open state and its pause is counted in calls; the cache counts requests, not time.

Sources

Learning IT by Example.