runtime.createAgent registers a definition. The name and version identify that definition for later recovery. A missing version does not replay a run onto a different definition.
name is the workflow name stored with the run. Keep it stable. Changing the version is how you stop an old run from replaying on a new definition.
What belongs on the agent
instructionsare the local system guidance for the model.modelimplementscomplete(request, context). UsescriptedModelin tests and examples. Use Cactus for on-device inference.toolsare local functions. Each tool declares an effect class. See Tool side effects.remoteAgentsare optional. With none, the agent stays on the device. Registering a remote agent authorizes the runtime to send that tool’s arguments to that endpoint.
runtime.resume.