Expand description
Pure prompt-building, compaction helpers, and async LLM summarization for context.
Stateless functions take only Message slices and configuration values; they contain
no agent state access. The SummarizationDeps struct provides explicit LLM dependencies
for the async summarization functions, avoiding coupling to Agent<C>.
The orchestration layer (Agent::compact_context, Agent::maybe_compact, etc.)
lives in zeph-core and calls these helpers.
Structs§
- Summarization
Deps - Explicit LLM dependencies for async summarization, avoiding coupling to
Agent<C>.
Functions§
- build_
anchored_ summary_ prompt - Build a structured JSON summarization prompt for
AnchoredSummaryoutput. - build_
chunk_ prompt - Build a prose summarization prompt from a message slice and optional guidelines.
- build_
metadata_ summary - Build a last-resort metadata summary without calling the LLM.
- build_
tool_ pair_ summary_ prompt - Build a summarization prompt for a single tool-call pair.
- extract_
overflow_ ref - Extract the overflow UUID from a tool output body, if present.
- remove_
tool_ responses_ middle_ out - Remove a fraction of tool-response messages from a conversation using a middle-out strategy.
- single_
pass_ summary - Single-pass LLM summarization over a message slice.
- summarize_
structured - Attempt structured summarization via
chat_typed_erased::<AnchoredSummary>(). - summarize_
with_ llm - Chunked multi-pass LLM summarization with bounded concurrency.