Skip to main content

Module builder

Module builder 

Source
Expand description

General-purpose AgentBuilder factory — provides default configuration shared across consumers.

Returns a pre-configured agent_works::AgentBuilder; callers then register tools and approval handlers on top.

Functions§

base_agent_builder
Returns an agent_works::AgentBuilder with sensible defaults:
base_agent_builder_no_compression
Like base_agent_builder_with_options, but skips registering the compression middleware entirely. Use when a custom context compactor (e.g. token-budget window rotation) replaces LLM-based summarization.
base_agent_builder_with_excludes
Like base_agent_builder, but lets the consumer inject a list of entry names for phi_kernel_tools::file::ListFilesTool to skip (e.g. a coding agent passing ["target", "node_modules"]). The framework stays domain-agnostic: it defaults to no excludes; the consumer decides what counts as noise.
base_agent_builder_with_options
Like base_agent_builder_with_excludes, but also lets the consumer override the CompressionConfig used by the context-compression middleware. Pass None to use the defaults.
clear_compression_cache
Clear the compression summary cache.
run_compact_session
Run compact_session on the current session: read → compress → write back.