Skip to main content

Module tool_summarizer

Module tool_summarizer 

Source
Expand description

Tool result summarizer — creates concise summaries for LLM context.

Mirrors Python’s opendev/core/utils/tool_result_summarizer.py. Summaries are stored in ToolCall.result_summary to prevent context bloat while preserving semantic meaning for the LLM.

Functions§

build_background_result
Build a rich result string from a background agent’s completion.
safe_truncate
Truncate a string at a char boundary, never in the middle of a multi-byte char.
summarize_tool_result
Create a concise 1-2 line summary of a tool result for LLM context.