-
-
Notifications
You must be signed in to change notification settings - Fork 119
Daemon Supervisor
scarecr0w12 edited this page Jun 25, 2026
·
4 revisions
The daemon supervisor manages three background processes required for tool security and job scheduling.

cortex daemon start
│
▼
supervisor-process.ts
│
├── validator-process.ts ← IPC socket: approves/rejects tool intents
│ policy check → allow/deny → logged to Lens
│
├── executor-process.ts ← IPC socket: executes approved tool calls
│ file read/write, shell commands, directory listing
│
└── scheduler-process.ts ← DB polling: runs cron jobs every 30s
memory consolidation, scheduled commands
- Each child is spawned via
Deno.Commandwith scoped--allow-*permissions - On crash (non-zero exit): wait
min(2^n × 1s, 30s)then restart - On clean exit (zero exit): not restarted
-
SIGINT/SIGTERM: cascading shutdown of all children
Three daemons communicate via Unix domain sockets (configurable via CORTEX_SOCKET_DIR):
/tmp/cortex/validator.sock
/tmp/cortex/executor.sock
/tmp/cortex/scheduler.sock
Messages are JSON-line, connection-per-message. Heartbeat pings check liveness.
cortex daemon start # Start supervisor (background)
cortex daemon stop # Stop supervisor
cortex daemon restart # Restart supervisor
cortex daemon run # Run in foreground (systemd/tmux)
cortex daemon status # Check process status
cortex service install --daemon-only # Install as system service (all platforms)
cortex service uninstall --daemon-only # Remove system servicecortex agent chat and cortex server start call ensureDaemons() which pings the validator socket and starts the supervisor if needed.
Validator is fail-closed: when the validator daemon is unreachable, tool calls are denied rather than silently auto-approved.
- Service Installation — Platform-specific service setup
- Security — Policy validation and tool gating
CortexPrism — Open-source AI agent operating system · Discord · Apache 2.0 License · Built with Deno 2.x + TypeScript
- Agent Loop
- Built-in Agents
- Metacognition
- Memory System
- Skills System
- Sub-Agents
- Built-in Tools
- Code Intelligence
- Code Sandbox
- Cross-Agent Context Protocol
- Prompt Lab
- PKM Assistant
- Voice Pipeline
- Computer Use
- Browser Tool
- Git & GitHub
- Scheduler & Jobs
- Dashboard
- Observability
- A2A Protocol
- MCP Gateway
- Distributed Nodes
- Memori Checkpoints
- Eval System
- Workflow Engine
- Triggers
- Projects
- TUI
- Glossary
- Update System
- Chrome Bridge
- Swarm
- AgentLint
- Model Benchmarking
- Smart Context
- Cost Optimizer