Replay and fork
Fork a session
Section titled “Fork a session”POST /v1/agents/{agent}/sessions/{key}/fork starts a new session with a copy of another’s history, up to a turn, under the same or another agent.
{ "into": "ana-try", "agent": "assistant-canary", "through_turn": "0198f2a4-..." }The fork gets history and checkpoints up to the cut, and nothing else: no pending events, journal or live feed. The next event sent to it starts a turn on that history, with the target agent’s prompt, tools and model.
Replay a conversation
Section titled “Replay a conversation”newt-replay assistant/ana assistant-canary/ana-replaynewt-replay sends each turn’s events from assistant/ana to the new session, one turn at a time, waits for the turn to finish, and prints what the turn did then and what it did now.
| Flag | Effect |
|---|---|
--from-turn N |
Fork the first N turns in instead of replaying them |
--turns N |
Stop after N turns |
--url |
The newt server |
--token-env |
The variable holding the token (default NEWT_TOKEN) |
Point the target agent at the newt-loadtest fake-model route to replay for free, or at a real model to compare prompts or models.
- Protocol 5.4 and 5.5.
- Load testing for the fake model and mock app.