The Agent Runtime
In this article
- Name the four parts the code around a model needs to run an agent: run state, permitted action set, dispatcher and terminal result.
- Read a short agent program and point to the line where each part lives.
- Predict what a runtime does when the model asks for an action that is not on its list.
- Tell a client library's retry of one request apart from an agent step.
- Terms defined here: agent runtime, permitted action set, agent step.
Overview
A language model can say that it wants to look up an order or issue a refund. It cannot do either. Some program has to read that request, decide whether it is allowed, run it, remember what happened and, at the end, say whether the job is done. When that program is a loose script, you find out the hard way: a refund runs that nobody permitted, or the run ends and nobody can tell if it worked.
After this you can name the four parts that program needs and find each one in about forty lines of Python. You can predict what it does when the model asks for something off its list, and say why a library that quietly resends a failed request has not taken a step.
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
- The code around the model
- Run state you can read
- The permitted action set and the dispatcher
- The terminal result
- A retry is not a step
- Common mistakes
- Sources
- Check yourself, 13 questions