Expand description
Result caching for tool output.
Large tool results are stored out-of-context and replaced with a compact
summary + preview. Agents retrieve slices on demand via a result_cache
tool, keeping the context window small while preserving full data access.
§Architecture
ToolResultProcessor → ResultCache::store() → CacheBackend (Text, …)
↕
result_cache tool → CacheBackend::execute()The CacheBackend trait is the extension point. Each backend knows how
to store one kind of data and expose operations on it. The ResultCache
manages entries, expiration, and disk budget.
Structs§
- Cache
Entry - A single cached tool result.
- Cache
Stats - Statistics about a cached result.
- Result
Cache - Manages cached tool results with expiration and disk budgets.
- Result
Cache Config - Configuration for the result cache.
- Text
Backend - A cache backend backed by a plain text file.
Enums§
- Backend
Kind - The kind of backend storing a cached result.
- Cache
Error - Errors from cache operations.
- CacheOp
- Operations that can be performed on a cached result.
Traits§
- Cache
Backend - A backend that stores and operates on one cached result.