Skip to content

Token Saving

Preview

Token X-Ray records tool inputs and outputs for a runtime and flags common sources of context growth. Capture is off by default for runtimes created with the CLI, SDKs, or API. The dashboard create form turns it on by default.

Enable Token X-Ray when creating or editing a runtime in the dashboard. For the CLI, add --llm-tool-io-capture:

Terminal window
runta run \
--name xray-demo \
--cpus 2 \
--memory 2048 \
--llm-tool-io-capture
Large output
A command returns a 10 MB build log.
Repeated content
The same warning appears 500 times.
Repeated keys
A large JSON array repeats the same object fields.
Repeated paths
Every result starts with /workspace/project/src/.
Repeated calls
The same search runs twice with identical output.

The dashboard shows captured calls, estimated tokens, detected findings, and potential savings.

Token estimates use ceil(characters / 4) and are not billing data. Truncated or unparseable captures are marked as issues. Captured payloads may contain application data and should be treated as untrusted input.