Expand description
Crate-agnostic governed context compaction for AI agents.
context-governor does not call an LLM and does not pretend to extend a
provider’s hard context window. It allocates a limited prompt budget across
agent conversation messages, preserves high-risk context verbatim, demotes or
summarizes low-risk context, emits receipts, and keeps exact fallback ranges
for later expansion.
Re-exports§
pub use high_roi::*;
Modules§
Structs§
- Compact
Request - Compact
Response - Compaction
Policy - Context
Allocation Plan V1 - Context
Compaction Receipt V1 - Context
Diff Summary - Context
Expand Result - Context
Item V1 - Context
Search Hit - Exact
Fallback RefV1 - Exact
Stored Item V1 - File
Context Store - File
Context Store Prune Result V1 - File
Context Store Status V1 - Memory
Archive Outcome - Memory
Archive Record V1 - Message
- Recall
Candidate - Recall
Filter Result - Replay
Answerability Baseline Score - Replay
Answerability Question - Replay
Answerability Report - Replay
Baseline Score - Replay
Fixture Report - Replay
Probe - Stored
Context Search Hit - Structured
Context Summary V1 - Summary
Loss Report V1
Enums§
- Allocator
Mode - Authority
Class - Budget
Mode - Content
Kind - Context
Governor Error - Item
Type - Preservation
Policy - Recall
Decision - Search
Scope - Token
Counter Kind