Probe starves behind model requests
Detect: Health latency rises with executor saturation.
Recover: Isolate health handling and bound admission to the work pool.
Separate process survival, traffic readiness, and end-to-end agent capability so health automation makes the correct recovery decision.
An agent health endpoint exposes a deliberately narrow claim about its ability to operate. Liveness asks whether the process can make local progress; readiness asks whether it should receive new work; startup asks whether initialization has completed. End-to-end synthetic checks ask a different question: can a representative task succeed across its dependencies?
Combining these signals into one deep probe creates dangerous feedback. A provider outage can make every agent fail liveness, causing restarts that destroy warm state without repairing the provider. Health handlers should be cheap, bounded, and independent of the same saturated execution pool they are diagnosing.
A prototype can expose a process heartbeat and a manual sample-task check to reveal the distinction between reachability and usefulness.
Production defines separate endpoints, startup allowances, readiness thresholds, and graceful draining for active tasks.
At fleet scale, probe traffic itself needs budgeting, synthetic tests need safe test tenants, and alerting must distinguish local failure from shared dependency incidents.
Checks local event-loop or worker progress without calling remote model providers.
Reports configuration validity, required local resources, and admission capacity.
Prevents normal probes from interrupting legitimate initialization or model loading.
Exercises an approved read-only workflow with known expected outcomes.
Removes unready instances and respects draining before termination.
flowchart TD
K["Container supervisor"] --> S["Startup complete"]
S --> L["Local progress probe"]
L --> R["Restart stalled process"]
T["Traffic controller"] --> Q["Ready to admit work"]
Q --> D["Drain unready instance"]
M["Synthetic task monitor"] --> A["Agent plus dependencies"]
A --> I["Capability incident"]stateDiagram-v2
[*] --> Starting
Starting --> Ready: Initialization and warmup pass
Ready --> Draining: Shutdown or capacity withdrawal
Draining --> Stopped: Active work finishes
Ready --> Unready: Cannot admit new work
Unready --> Ready: Admission recovers
Ready --> Failed: Local progress stalls
Failed --> Starting: Supervisor replaces instance
Stopped --> [*]Load configuration, connect durable state, and complete any required model warmup.
Allow traffic only when the instance can admit work under its documented dependency policy.
Respond to liveness using a cheap signal that detects an unrecoverable local stall.
Periodically execute a separate safe task and classify dependency and semantic failures.
Stop accepting new tasks, checkpoint active work, and honor a bounded shutdown grace period.
Compare per-instance failures with regional dependency status before triggering broad remediation.
Telecom · Illustrative enterprise scenario, not a reported customer outcome.
A support platform runs many agent replicas that answer product questions and retrieve customer bills.
A billing outage affects one capability while product information remains available.
Continue safe product assistance and clearly defer billing work without restarting every replica.
Local probes feed the container platform; a capability monitor checks a synthetic billing account and publishes degraded billing status.
If the event loop actually stalls, the liveness controller replaces only that instance after its failure threshold.
Track capability availability, false restart rate, and task loss during drain; process uptime alone cannot represent user-visible availability.
| Decision | Benefit | Cost |
|---|---|---|
| Shallow liveness | Avoids restart storms during shared outages. | Cannot prove that the full agent workflow succeeds. |
| Dependency-aware readiness | Avoids admitting work an instance cannot handle. | Overly strict checks can remove otherwise useful capacity. |
| Synthetic transactions | Reveal semantic and integration failures. | Consume quota and require maintained safe fixtures. |
Detect: Health latency rises with executor saturation.
Recover: Isolate health handling and bound admission to the work pool.
Detect: Startup never reaches completion before probe thresholds expire.
Recover: Measure startup distribution and configure a distinct startup budget.
Use local progress for liveness and a scheduled synthetic for model capability.
Expose minimal public status and protect diagnostic details.
Make readiness fail first, then drain active jobs before termination.