Why multi-turn RL needs TITO
An agent harness operates on messages: it reads an assistant tool call, executes the tool, appends the result, and submits the next request. RL trains on the exact token IDs and rollout-policy log probabilities used by inference. For each policy turn, TITO (token-in/token-out) records:Choose whether online behavior may change
Fireworks supports two TITO behaviors. The meaningful distinction is whether TITO changes the prompt used to sample the next trainable action.full_history continuity handling may run after the rollout if every call
already recorded its actual prompt IDs, sampled IDs, and logprobs. Re-rendering
messages later is not sufficient. incremental must run before inference
because constructing a different prompt after an action was sampled cannot
change what the model saw.
Neither mode makes a genuine history rewrite—such as compaction, pruning, or a
subagent handoff—continuous without changing its meaning.
Fireworks support
The public Fireworks Cookbook separates the environment, harness, and task recipe. They are independent parts of one rollout rather than one Harbor integration.Overall RL environment: Harbor
Harbor is the trial and environment layer. It loads a task, starts its Docker container or E2B sandbox, runs the verifier, produces the reward and artifacts, and tears the environment down. In the reference integration, the TITO sidecar runs inside that sandbox beside the agent harness.Supported harness adapters
The reference adapters support OpenCode, Pi, and Mini-SWE-Agent over the same Harbor/TITO contract.Supported task datasets
The Cookbook includes support for DABstep, Terminal-Bench 2.0, and DeepSWE.Example: Pi with DABstep
Use the Pi+DABstep training script as the complete reference entrypoint. The Cookbook also provides task preparation scripts for Terminal-Bench and DeepSWE. These task entrypoints plug into the async RL lifecycles described in Cookbook: Reinforcement Learning; this page does not repeat the dedicated and serverless execution choices. Both prompt-construction modes use the same TITO engine, exact-token sampler boundary, artifact format, andRolloutRun materializer. Prompt construction
defaults to full_history; select incremental explicitly with
--tito-prompt-mode incremental only for a renderer/tokenizer contract that
qualifies the additional suffix and junction behavior. An ordinary SFT/DPO
renderer does not automatically qualify a model for agentic TITO.
The sidecar is a reference placement
The Cookbook starts one lightweight TITO sidecar inside every agent sandbox:
The Cookbook sidecar is the maintained reference implementation, not the only
valid TITO architecture. A custom integration may use offline materialization
or a centralized gateway as long as it preserves the exact prompt, action,
logprob, loss-mask, and rollout-identity contracts.