Quick Start
Zero-config (default retention)
~/.praisonai/cache/tool_outputs/.How It Works
| Step | What happens |
|---|---|
| 1 | Tool returns output exceeding the context budget |
| 2 | Full text is written to ~/.praisonai/cache/tool_outputs/{run_id}/{call_id}.txt |
| 3 | Inline preview keeps head/tail with Full output stored at: <path> |
| 4 | Agent uses read_file (or similar) to fetch omitted content |
What the Agent Sees
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
run_id | Optional[str] | auto UUID | Scopes outputs to one run |
retention_hours | Optional[int] | 24 | TTL for old run directories |
PRAISONAI_TOOL_OUTPUT_RETENTION_HOURS | env | 24 | Same as retention_hours default |
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 — setPRAISONAI_TOOL_OUTPUT_RETENTION_HOURS=1 on shared runners.
Best Practices
Keep retention short on shared/CI machines
Keep retention short on shared/CI machines
Don't store secrets
Don't store secrets
Outputs are plaintext on disk — avoid tools that return credentials or tokens into the store.
Use stable run_id when chaining runs
Use stable run_id when chaining runs
Pass a consistent
run_id to get_tool_output_store(run_id=...) when multiple agents share one session.Combine with per-tool budgets
Combine with per-tool budgets
Use per-tool budgets to control inline size; the store handles anything that still overflows.
Related
Context Per-Tool Budgets
Per-tool truncation limits
Context Window Management
Overflow and compaction strategies
Context Management
Agent context lifecycle

