Production Agent Runtime Architecture
In this article
- Name the seven parts of a production agent runtime and say what each one holds for a run.
- Explain why a run's state lives in a run store outside the worker, and predict what a worker crash loses.
- List the four fields every part passes along for a run, and say why the policy rules are not one of them.
- Spot a runtime design where a crash, a retry or a policy check becomes unsafe, and propose the smallest fix.
- Terms defined here: run store, tool dispatcher.
Overview
Your refund agent works on a laptop: one process calls the model, runs the tools and keeps everything in variables. In production a deploy restarts the server mid-run, and nobody can say which step the run had reached or whether the customer was paid. What shape must the program take so that any process can die and the run still finishes, with each refund paid once? Take a made-up support agent's run that refunds 49.00 EUR on order 1042 after a manager approves it. By the end you can draw the seven parts of the code around the model in production, say what each one holds for that run, and spot a design where a crash, a retry or a policy check is no longer safe.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Seven parts around one run
- Why the store sits outside the worker
- The envelope
- Killing the worker
- Where the boundaries leak
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions