-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Cognitive Workbench is a pure-Python Zenoh-based stack for LLM cognitive architecture research. The system prioritizes inspectable agent behavior and fast iteration over stability.
Orchestrates one or more character instances defined in scenario YAML files under scenarios/. Each character runs as an independent process with its own executive node.
Implements the OODA loop (Observe, Orient, Decide, Act) for each character:
- Observe: Collects current situation and sense data
- Orient: Assesses current state and goals
- Decide: Chooses next action via incremental planning
- Act: Executes the chosen action
Interleaves reasoning and tool execution using SGLang's structured generation. The planner:
- Maintains a tool catalog (world tools + core infospace tools)
- Generates plans step-by-step with reflection
- Executes tools and observes results before deciding next steps
- Uses SGLang's KV caching to avoid re-tokenizing large prefixes
Central execution engine that:
- Executes primitives (save, load, create, index, search, etc.)
- Executes Python tools (from
src/tools/andsrc/world-tools/<world_name>/) - Manages plan-local bindings (
plan_bindingsstack) - Maintains persistent
world_statefor world integrations - Publishes action results to Zenoh for UI/logging
Manages persistent Notes and Collections:
- Creates and stores Notes (text documents)
- Creates and manages Collections (sets of Notes)
- Handles vector indexing (FAISS) for semantic search
- Persists resources to
scenarios/<world_name>/resources/
Web dashboard for visualizing agent behavior:
- Displays plans, actions, and results in real-time
- Shows world state (State tab)
- Provides character management and control
- Uses WebSockets for live updates
Launcher
└─> Executive Node (per character)
├─> Incremental Planner (SGLang)
│ └─> Tool Catalog (world + core)
│
├─> Infospace Executor
│ ├─> Execute primitives
│ ├─> Execute Python tools
│ └─> Manage world_state
│
└─> Resource Manager
├─> Notes & Collections
└─> Vector indexes
All components communicate via Zenoh topics:
-
cognitive/{character}/action- Action results -
cognitive/{character}/planning/plan_log- Plan execution logs -
cognitive/{character}/world_state- World state updates -
cognitive/{character}/control/*- Control commands (step, run, stop)
World-specific functionality is loaded per character via world_config.world_name:
- Tools loaded from
src/world-tools/<world_name>/ - Resources stored in
scenarios/<world_name>/resources/ -
world_stateinitialized fromworld_config.stateJSON -
inittool auto-executed on executor startup (if present)
- Inspectability: All actions logged, world state visible in UI
- Modularity: World tools isolated from core infospace primitives
- Persistence: Notes, Collections, and world state survive across plans
- Incremental Planning: Interleaved reasoning and execution (not pure planning)
-
Uniform Returns: All tools return consistent format via
_create_uniform_return()