Expand description
§ICE Classifier / Router
Implements the Interpreter-Classifier-Executor cognitive architecture inspired by OpenAgent’s cortex design.
§Overview
Before sending a large prompt to the LLM, the classifier:
- Interprets the user’s intent from their message
- Classifies the task type (coding, research, file ops, etc.)
- Routes only the relevant tools into the LLM context
This reduces token usage and prevents “tool overload” where having too many tools degrades LLM performance.
§Architecture
User Input
│
▼
┌──────────────┐
│ Interpreter │ Extract intent + entities
└──────┬───────┘
│
▼
┌──────────────┐
│ Classifier │ Map intent → task category
└──────┬───────┘
│
▼
┌──────────────┐
│ Router │ Filter tools for category
└──────────────┘§Example
ⓘ
use bob_runtime::classifier::{Classifier, HeuristicClassifier};
let classifier = HeuristicClassifier::new();
let routing = classifier.classify("read the file src/main.rs", &tools).await;
// routing.filtered_tools only contains file-related toolsStructs§
- Classification
Result - Classification result with confidence and routing information.
- Heuristic
Classifier - Heuristic keyword-based classifier.
- Pass
Through Classifier - No-op classifier that returns all tools without filtering.
Enums§
- Task
Category - Task categories for classification.
Traits§
- Classifier
- Trait for task classifiers.