Agent definition
An agent is a JSON document. The document holds a set of named functions, and each function is an ordered list of commands. Wherever a value has to be computed, the document uses a Python expression.
- Syntax and dynamic stringsAgents are written in JSONC (JSON with comments), plus one extension: a string enclosed in braces is a Python expression, called a dynamic string.
- Agent structureThe top-level object holds a set of named functions. Each function is an ordered object of commands. Commands are the units of execution in an agent.
- FunctionsAn agent is a collection of functions. When a function is called, the function runs its commands in order. Besides commands, a function may declare arguments…
- CommandsThere are 23 commands. Together the commands cover every agentic workflow: variables, flow control, progress, termination, external systems, LLMs, other agen…
- Variables and namespacesThere are three kinds of variables, with three scopes: local, agent and conversation. The runtime also provides a few read-only names.

