name must stay stable for the life of any run you want to resume. Bump version when the definition should not replay old runs.
Add tools with Defining tools. Add a remote peer with remoteAgents. See HTTP remote agents.
scriptedModel is a real export. It is the stand-in used by tests and by this page. It is not an inference provider. When the scripted list runs out, complete throws, because a committed model step must not invent a new response.