Replaying an Agent Framework run with the model server switched off #8275
xizhuomengcontin
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Verified against the current Python
agent-frameworkpackage today: aChatAgentrun can be recorded from outside the process and replayed with no model server present.Disclosure: I work on the recording tool (OrcaReplay, Apache-2.0, no paid tier).
The run
OpenAIChatClientpicks the origin up fromOPENAI_BASE_URL, so nothing is installed into the framework and no code changes.One API note
Two things I got wrong first, in case they are worth a docs line — the constructor takes
model=, notmodel_id=, and the agent factory isas_agent(), notcreate_agent(). Several examples floating around use the other spellings.What it is for
Re-running an agent while you change the instructions, the tools or the middleware: model responses stay fixed, so the difference you see is your change rather than the sampler. Also CI without keys or spend, and chasing one bad run repeatedly for free. From a checkpoint the run can instead continue live on a different model.
Scope
egress=blockedon replay means model-provider egress. Recorded tool calls still execute for real, so it is not a sandbox. And it captures the HTTP to the model, not the framework's internals — not a substitute for its OpenTelemetry support.All reactions