How shenseanchen/waku-agent works
Waku is a local-first personal AI assistant: a user sends a message through a terminal or other gateway, the app assembles configuration, memory, tools, and a model client, and the agent loop returns a response while emitting trace data. Memory retrieval and consolidation, graph workflows, dashboard/voice interfaces, and evaluation are meaningful branches of that workflow. The tree and excerpts also show a distinct hosted multi-tenant platform. Some subsystem links are documented by the README or source index; unsampled implementation details are not inferred.
Main entry points: waku/app.py Waku App · brain.py Memory Brain · gateway/app.py Hosted Gateway · agent.py Agent Loop
Components 31
Assistant Interfaces
- Chat Gateways
waku/gateway - Dashboard
waku/ops/dashboard.py - Voice Gateway
waku/gateway/voice.py
Agent Runtime
- Waku App
waku/app.py - Configuration
waku/config.py - Agent Loop
waku/loop/agent.py - Model Adapters
waku/loop/models.py - Tool Registry
waku/tools/registry.py - Graph Workflows
waku/graph/workflows/triage.py - Graph Engine
waku/graph/engine.py - Runtime Session
waku/runtime/session.py
Memory
- Memory Brain
waku/memory/brain.py - Memory Gates
waku/memory/retrieval_gate.py - Memory Consolidation
waku/memory/consolidation.py - Memory Stores
waku/memory/semantic/store.py - Episodic Store
waku/memory/episodic/store.py - Procedural Skills
waku/memory/procedural/loader.py - Local State DB
waku/db.py
Operations
- Turn Tracing
waku/ops/tracing.py - Observability
waku/ops/observability.py - Eval and Release Gate
waku/ops/turn_evals.py
Hosted Platform
- Hosted Gateway
hosted/gateway/app.py - Tenant Core
hosted/core/tenant.py - Control Store
hosted/gateway/store.py - Container Launcher
hosted/gateway/launch.py - Spawner Client
hosted/gateway/spawner_client.py - Container Spawner
hosted/spawner/service.py - Docker Runtime
hosted/spawner/docker.py - Metering Proxy
hosted/proxy/app.py
Other components
- User
- Model Provider
Connections 34
- User → Chat Gateways: sends message
README.md - Chat Gateways → Waku App: calls respond
waku/app.py - User → Dashboard: uses cockpit
README.md - Dashboard → Waku App: invokes agent
waku/ops/dashboard.py - Voice Gateway → Waku App: calls assistant
waku/gateway/voice.py - Waku App → Configuration: loads settings
waku/app.py - Waku App → Local State DB: opens state
waku/app.py - Waku App → Tool Registry: assembles tools
waku/app.py - Waku App → Memory Brain: assembles memory
waku/app.py - Waku App → Runtime Session: creates session
waku/app.py - Waku App → Agent Loop: runs turn
waku/app.py - Waku App → Graph Workflows: tries triage
waku/app.py - Waku App → Turn Tracing: records turn
waku/app.py - Agent Loop → Tool Registry: executes tools
waku/loop/agent.py - Agent Loop → Model Provider: requests completion
waku/loop/agent.py - Model Adapters → Configuration: reads provider settings
waku/loop/models.py - Graph Workflows → Graph Engine: runs graph
waku/graph/workflows/triage.py - Runtime Session → Configuration: reads settings
waku/runtime/session.py - Memory Brain → Memory Gates: uses retrieval gate
- Memory Brain → Memory Consolidation: uses consolidation
- Memory Brain → Memory Stores: configures semantic store
- Memory Brain → Episodic Store: configures episodic store
- Memory Brain → Procedural Skills: loads skills
- Turn Tracing → Observability: emits events
waku/ops/tracing.py - Eval and Release Gate → Turn Tracing: uses turn traces
README.md - User → Hosted Gateway: uses hosted service
README.md - Hosted Gateway → Tenant Core: uses tenant rules
hosted/gateway/app.py - Hosted Gateway → Control Store: uses control store
hosted/gateway/app.py - Hosted Gateway → Container Launcher: dispatches launches
hosted/gateway/app.py - Container Launcher → Spawner Client: requests containers
hosted/gateway/launch.py - Spawner Client → Container Spawner: sends socket requests
hosted/gateway/spawner_client.py - Container Spawner → Docker Runtime: dispatches operations
hosted/spawner/service.py - Docker Runtime → Model Provider: hosts tenant agent
- Model Provider → Metering Proxy: sends metered calls
hosted/proxy/app.py