The output budget: a tool result over 16 KiB goes to
the model as its head and tail with a marker in the middle; the full
text is kept as an artifact the agent reads back with the read_artifact
tool, a page of lines at a time.
Artifacts live in <data dir>/artifacts/<session id>/<call id>.txt and
are addressed by the call id (artifact://<call id>), so a session only
sees its own.
Summary
Functions
Bytes a tool result may have before it's spilled.
The artifact's file, or {:error, :not_found}.
The text to give the model for a tool result, spilling it to an artifact if it's over budget.
Functions
@spec budget() :: pos_integer()
Bytes a tool result may have before it's spilled.
The artifact's file, or {:error, :not_found}.
The text to give the model for a tool result, spilling it to an artifact if it's over budget.