You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoBot currently loads context into agent sessions via unconditional snippet injection (e.g. `CAUSAL_REASONING_SNIPPET` — see #4811) and full chat-history recall. This wastes tokens and degrades signal-to-noise: every agent gets the same preamble regardless of what the session is about.
There is no token-budgeted, tiered wake-up strategy. The agent either has too little context (cold start) or too much (session with accumulated history).
Proposed change
Introduce a 4-tier wake-up stack in `autobot-backend/chat_history/layers.py`:
L0 Identity (~100 tok, always loaded) — who this agent is, role, owner. From a small config file / identity table.
L1 Essential Story (~500-800 tok, always loaded) — auto-generated from highest-weight / most-recent memory-graph entities and KB facts for the current user/session.
L2 On-Demand (~200-500 tok each) — loaded when a topic/entity is mentioned in the user message; scoped pull from memory graph and KB.
L3 Deep Search (unlimited) — existing hybrid search + rerank path, invoked only for explicit retrieval-heavy queries.
Target: wake-up cost ≤ 900 tokens for L0+L1, leaving ≥95% of the context window for actual conversation.
Acceptance criteria
`Layer0/Layer1/Layer2/Layer3` classes with a common `render()` + `token_estimate()` interface
Activity
feat(chat): tiered L0-L3 context wake-up to replace unconditional pro…
mrveiss commentedon Apr 28, 2026
✅ Closed — merged to Dev_new_gui.
Merge commit: 52ac25c feat(chat): tiered L0-L3 context wake-up to replace unconditional prompt injection (#5066) (#6436)
Acceptance criteria met:
Layer0/Layer1/Layer2/Layer3withrender()+token_estimate()—chat_history/layers.pychat_workflow/llm_handler.py_prepare_llm_request_paramsTIERED_CONTEXT_ENABLED=true/false(default false) — safe A/B rolloutEssentialStoryGeneratorDiscovery issues filed: none found
test(memory): run the #5066 A/B with all five layers live and record …
test(memory): run the #5066 A/B with all five layers live and record …
test(memory): run the #5066 A/B with all five layers live and record …
feat(memory): run the #5066 A/B, record the result, and enable the ti…