Pack, debug, red-team, and orchestrate LLM context windows
17 packages | 2,172 tests | TypeScript + Python
A dual TypeScript/Python toolkit for managing what goes into LLM context windows. The core problem: given a finite token budget and a pile of potentially useful context (documents, conversation history, tool definitions, memories), which items should you include, in what order, and at what cost?
This toolkit provides algorithms, strategies, and infrastructure for that decision at every level — from basic packing to multi-model deliberation to adversarial testing of your context pipeline.
- Installation & Setup — npm/pip install, prerequisites
- Core Concepts — items, scoring, budgets, volatility
- Your First Pipeline — chain operations together
- Package Overview — all 17 packages with architecture diagram
- Core — ce-core, ce-providers, ce-memory, ce-cli
- Multi-Model — ce-council, ce-entangle, ce-router
- Quality — ce-adversarial, ce-immune, ce-debugger, ce-drift
- Optimisation — ce-compiler, ce-adaptive, ce-time-travel
- Integration — ce-sdk-interceptors, ce-frameworks, ce-rag
| Topic | What you'll learn |
|---|---|
| Deliberation Strategies | How parallel, debate, stepladder, and delphi strategies work |
| Adversarial Testing | 6 attack types, severity scoring, CI/CD integration |
| Context Compilation | Declarative programs, slot-based allocation, per-model optimisation |
| Drift Detection | 6 quality dimensions, trend detection, production alerting |
| Multi-Agent Entanglement | Scoped pub/sub mesh, propagation policies, budget-aware injection |
| Context Immune System | Fingerprinting, antibodies, failure pattern screening |
| Context Time Travel | Checkpoint, fork, merge with 5 strategies |
| Resource | Description |
|---|---|
| Architecture | Design principles, data flow, package categories |
| Core Concepts | Items, scoring, budgets, quality metrics |
| CLI Reference | 11 CLI commands |
| Contributing | Development setup, code style, PR process |
| Changelog | Release history |
| Example | What it shows |
|---|---|
| RAG Chatbot | Retrieval + information-gain filtering + pipeline packing |
| Code Review Council | 3 experts debate a PR (architect, security, performance) |
| Production Agent | Drift monitoring + time travel + adversarial + immune |
| Causal Compaction | BEADS task graph compaction |
| Full Pipeline | Complete pipeline with allocation + quality gates |
| Node Basic | Minimal Node.js setup |
| Python Basic | Minimal Python setup |
| Python Full Pipeline | Python pipeline end-to-end |
| Webhook Telemetry | Telemetry to external endpoints |
| Demo Pack | Basic packing demo (single file) |
| Demo Memory | Memory store basics (single file) |
| Full Pipeline (TS) | TypeScript pipeline (single file) |
| Trace Viewer Data | Debugging trace output |
| Context Compiler | Declarative slots, constraints, per-model compilation |
| Adaptive Weights | Learn scoring weights from quality feedback |
| Multi-Agent Entanglement | Pub/sub context sharing between agents |