xml-pipeline/xml_pipeline/llm
dullfig e6697f0ea2 Add BudgetWarning system alerts for token budget thresholds
- Create BudgetWarning primitive payload (75%, 90%, 95% thresholds)
- Add threshold tracking to ThreadBudget with triggered_thresholds set
- Change consume() to return (budget, crossed_thresholds) tuple
- Wire warning injection in LLM router when thresholds crossed
- Add 15 new tests for threshold detection and warning injection

Agents now receive BudgetWarning messages when approaching their token limit,
allowing them to design contingencies (summarize, escalate, save state).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:41:34 -08:00
..
__init__.py Add token budget enforcement and usage tracking 2026-01-27 21:07:43 -08:00
backend.py Rename agentserver to xml_pipeline, add console example 2026-01-19 21:41:19 -08:00
router.py Add BudgetWarning system alerts for token budget thresholds 2026-01-27 21:41:34 -08:00
token_bucket.py Rename agentserver to xml_pipeline, add console example 2026-01-19 21:41:19 -08:00
usage_tracker.py Add token budget enforcement and usage tracking 2026-01-27 21:07:43 -08:00