Skip to main content
When a tool output is too large for context, the full result is saved to disk so the agent can read it back on demand.
The user asks for a large tool result; oversized output is stored on disk and the agent gets a preview plus a path to read the full file.

Quick Start

1

Zero-config (default retention)

No setup required — overflow outputs are stored automatically under ~/.praisonai/cache/tool_outputs/.
2

Custom retention

Or programmatically:

How It Works


What the Agent Sees

The agent can then read the full file from the path in the marker.

Configuration

Storage Layout

Retrieve Programmatically


Common Patterns

Long-running research agents — web search bodies are stored when truncated; the agent reads them back in a follow-up turn. Pair with per-tool budgets — combine with Context Per-Tool Budgets for fine-grained limits. Short retention on CI — set PRAISONAI_TOOL_OUTPUT_RETENTION_HOURS=1 on shared runners.

Best Practices

Old run directories are removed when older than the retention window on the next store initialisation.
Outputs are plaintext on disk — avoid tools that return credentials or tokens into the store.
Pass a consistent run_id to get_tool_output_store(run_id=...) when multiple agents share one session.
Use per-tool budgets to control inline size; the store handles anything that still overflows.

Not the same as Tool Output Spill. This store handles arbitrary large tool return values with time-based retention under ~/.praisonai/cache/ (PRAISONAI_TOOL_OUTPUT_RETENTION_HOURS). Tool Output Spill is specific to execute_command and uses a different dir (PRAISONAI_TOOL_OUTPUT_DIR) with process-exit cleanup.

Tool Output Spill

Save large execute_command output to a retrievable artifact

Context Per-Tool Budgets

Per-tool truncation limits

Context Window Management

Overflow and compaction strategies

Context Management

Agent context lifecycle