Async AI Agents: Design for Timeouts With Job Polling
In a simulation, a client that retried on a timeout nearly doubled the agent's work, and got half the answers.
Video #239 ยท Enterprise architecture and AI agents
Steps in the video
Files
- clients.py (24 lines)
- compare.py (18 lines)
- jobs.py (18 lines)
Tested with
Python 3.12.15
What this does not show
A simulated clock and a pretend server, six jobs I chose; the waiting client gives up after 5 seconds and the poller after 30; the server never cancels abandoned work; no idempotency key; no failures, lost polls or restarts.
Sources
Learning IT by Example.