Principle:1broseidon Ketch Output Bounding
| Knowledge Sources | |
|---|---|
| Domains | Extraction, Agent_Design |
| Last Updated | 2026-10-27 00:00 GMT |
Overview
A post-processing step that caps extracted output for an agent — stripping markdown formatting syntax and truncating by Unicode code points — so a large page does not blow the agent's context window.
Theoretical Basis
An agent consuming markdown has a bounded context window. Two independent, per-invocation options bound the output:
- trim (`StripMarkdown`): removes markdown formatting syntax (bold/italic/links/headings/code; fenced code blocks preserved) to keep only content text. Useful when the agent needs the words, not the structure.
- max_chars (`Truncate`): caps at N Unicode code points and appends `[truncated]`. `<=0` disables. Counting code points (not bytes) keeps multi-byte text correct.
The order is fixed: trim first, then truncate, so the truncation count reflects the stripped text. Both are per-invocation options on the CLI flags and MCP tool params; config-level settings are never involved, so bounding is the caller's choice.
Usage
Use when an agent's context budget is the binding constraint. Apply at the output boundary (after extraction), not earlier, so the cache stores the full content and a later caller can request more.
Related Pages
Implemented By
- Implementation:1broseidon_Ketch_extract_PostProcess
- Implementation:1broseidon_Ketch_pi_ketch_tools
- Implementation:1broseidon_Ketch_pi_render
- Implementation:1broseidon_Ketch_updatecheck_Engine