-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
aibountyenhancementNew feature or requestNew feature or requestpriority: criticalMust have for MVP - work on these firstMust have for MVP - work on these first
Description
Problem
Cortex currently runs as a CLI tool invoked per-command. No persistent system presence or proactive capabilities.
Solution
Create cortexd - a native C++ daemon that:
- Runs as systemd service on boot
- Embeds llama.cpp for local inference (no Ollama dependency)
- Monitors system state continuously
- Exposes Unix socket for cortex CLI
- Provides proactive security alerts and suggestions
Architecture
┌─────────────────────────────────────────┐
│ cortex CLI │
│ (Python, user-facing) │
└─────────────────┬───────────────────────┘
│ Unix Socket
▼
┌─────────────────────────────────────────┐
│ cortexd │
│ (C++ daemon, systemd) │
│ ┌─────────────────────────────────┐ │
│ │ llama.cpp (embedded inference) │ │
│ └─────────────────────────────────┘ │
│ ┌─────────────────────────────────┐ │
│ │ System Monitor (apt, dpkg, CVE)│ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
Technical Requirements
- Single static binary preferred
- Must start in < 1 second
- Memory footprint < 50MB idle (< 150MB with model)
- Logging to journald
- Graceful shutdown handling
- Consider sd-bus for D-Bus integration
Acceptance Criteria
- C++ daemon compiles on Ubuntu 22.04/24.04
- systemd service unit (cortexd.service)
- Unix socket API (/run/cortex.sock)
- Embedded llama.cpp inference working
- Basic system monitoring (disk, memory, apt state)
- CLI can communicate with daemon
- Documentation for building and installing
Dependencies
- Blocked by: Architecture doc (this issue's sibling)
- Enables: [FEATURE] AI Shell with lightweight apt-trained model for natural language command generation #424 (tiny model), [FEATURE] [CRITICAL] Autonomous Security Vulnerability Management & Patching #422 (security patching)
Bounty: $200 (+ $200 bonus after funding)
Paid on merge to main.
This is a critical path item for the 'AI operating system' vision.
Metadata
Metadata
Assignees
Labels
aibountyenhancementNew feature or requestNew feature or requestpriority: criticalMust have for MVP - work on these firstMust have for MVP - work on these first