pub struct PlanningBudget {
pub max_tokens: u32,
pub max_elements: u32,
pub max_memories: u32,
pub max_adapter_facts: u32,
pub max_knowledge: u32,
pub max_recent_events: u32,
}Expand description
Caller-provided ceilings for one planning view.
Builders enforce these greedily — most-relevant items first, drop the
rest, count what was dropped in OmittedCounts. Budgets are advisory,
not contractual: a planner with a 128K context window can request a
larger budget; a benchmark harness can request a smaller one.
Fields§
§max_tokens: u32Soft token ceiling for the serialized view as it would appear in an LLM prompt. Builders make best-effort decisions; the absolute cap is the per-category limits below.
max_elements: u32Maximum number of PlanningElement entries.
max_memories: u32Maximum number of MemoryRef entries (PR3 selector).
max_adapter_facts: u32Maximum number of AdapterFactRef entries.
max_knowledge: u32Maximum number of KnowledgeRef entries (Tier A1 selector — pulled
from knowledge_fts via FTS5 + bm25 ranking, scoped by workflow).
serde(default) keeps backward compat with v1 callers that don’t
know about this field.
max_recent_events: u32Maximum number of EventRef entries (Tier A2 selector — pulled
from cortex observations table, ordered by priority then
recency, scoped by workflow). serde(default) keeps backward
compat with pre-A2 callers.
Trait Implementations§
Source§impl Clone for PlanningBudget
impl Clone for PlanningBudget
Source§fn clone(&self) -> PlanningBudget
fn clone(&self) -> PlanningBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more