How cellium-project/cellium-agent works
Cellium Agent is a self-learning assistant exposed through a Web UI and messaging channels. Its principal workflow accepts a user task, runs an agent session that consults memory and tools and streams model output, then uses control-loop feedback to adapt later decisions. Major documented branches include heuristic decisions, scheduled and component-triggered work, multi-platform messaging, and security controls. The graph follows README-described behavior and SOURCE INDEX references; unsampled implementations are represented only where the tree or README supports them.
Main entry points: agent_loop.py Agent Loop · control_loop.py Control Loop · task_manager.py Task Manager · App.tsx Web UI
Components 20
User Interfaces
- Web UI
ui/src/App.tsx - Chat Routes
app/server/routes/chat.py - Channel Manager
app/channels/channel_manager.py
Agent Execution
- Agent Loop
app/agent/loop/agent_loop.py - Task Manager
app/server/task_manager.py - LLM Engine
app/agent/llm/engine.py
Decision and Learning
- Control Loop
app/agent/control/control_loop.py - Heuristic Engine
app/agent/heuristics/engine.py - Policy Learning
app/agent/learning - Feedback Evaluator
app/agent/control/feedback_evaluator.py
Agent Capabilities
- Agent Tools
app/agent/tools - Three-Layer Memory
app/agent/memory/three_layer.py - Memory Retrieval
app/agent/memory/repository.py
Platform Services
- Event Streaming
app/messaging/message_broker.py - WebSocket Events
app/server/routes/ws_event_manager.py - Scheduled Tasks
app/core/scheduler/manager.py - Extensible Components
components/component_builder.py - Security Policies
app/core/security/policy.py
Other components
- User
- Model Provider
Connections 21
- User → Web UI: submits task
- User → Channel Manager: messages through
- Web UI → Chat Routes: sends chat
- Chat Routes → Task Manager: starts task
- Channel Manager → Task Manager: routes messages
app/channels/channel_manager.py - Task Manager → Agent Loop: runs session
app/server/task_manager.py - Agent Loop → LLM Engine: requests completion
- LLM Engine → Model Provider: streams model output
app/agent/llm/engine.py - Agent Loop → Agent Tools: executes actions
- Agent Loop → Three-Layer Memory: uses session memory
- Three-Layer Memory → Memory Retrieval: retrieves memories
- Agent Loop → Control Loop: enters decision cycle
- Control Loop → Heuristic Engine: evaluates rules
app/agent/heuristics/engine.py - Control Loop → Policy Learning: selects policy
- Control Loop → Feedback Evaluator: evaluates feedback
- Feedback Evaluator → Policy Learning: updates policy
- Task Manager → Event Streaming: publishes events
app/server/task_manager.py - Event Streaming → WebSocket Events: forwards events
app/messaging/message_broker.py - Scheduled Tasks → Agent Loop: triggers execution
- Extensible Components → Agent Loop: triggers background work
- Agent Loop → Security Policies: enforces controls