Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 492 Bytes

File metadata and controls

9 lines (7 loc) · 492 Bytes

Deployment, scaling, and graceful shutdown

Run workers and AgentRuntime.serve() processes as long-lived services. Scale by adding worker instances and use task domains or queue limits to isolate workloads. On shutdown, stop task handlers and runtimes so in-flight tasks can be redelivered instead of being abandoned.

Do not construct a new runtime per web request. Reuse clients and runtimes for the application lifetime; use reliability for timeout and retry policy.