System Synapse is an advanced, bio-inspired AI operating system designed to bridge the gap between Large Language Models (LLMs) and local execution. It creates a nervous system for your computer, allowing AI to "think" and "act" through a robust, event-driven architecture.
The system mimics a biological nervous system, distinguishing between the Brain (Decision Making), the Nervous System (Communication), and the Hand (Action).
The central command node implemented in Rust (egui + tokio).
- Neural Interface: Integrated Gemini AI (Brain) that processes natural language into structured intents.
- Dynamic Model Discovery: Automatically scans and links to the best available Gemini model (e.g.,
gemini-1.5-flash,gemini-pro) upon API key entry. - Supervisor: Monitors the health of all connected components via a generic Heartbeat protocol.
- Visual Cortex: A GUI dashboard for monitoring system status, chat interaction, and neural configuration.
A detached, autonomous agent that performs kinetic actions on the host machine.
- Kinetic Engine: Listens for
Commandimpulses and executes them via the OS shell (e.g., "Open Calculator"). - Sensory Feedback: Captures
stdout/stderrof executed commands and sendsFeedbackimpulses back to the Citadel. - Vital Signs: Emits a
Heartbeatevery 2 seconds to signal its presence to the Supervisor.
A low-latency, asynchronous communication bus connecting all components.
- Protocol: JSON-based "Impulses".
- Impulse Types:
Heartbeat: Component health check.Command: Structured execution instruction (Citadel -> Executor).Feedback: Execution result/logs (Executor -> Citadel).Intention/Perception: Reserved for future cognitive flows.
- Natural Language Layout: "Open WhatsApp", "Ping google.com", "List my files".
- Auto-Healing Connection: If the Executor dies, the Citadel detects it within 5 seconds. When it restarts, they auto-negotiate and reconnect.
- AI Model Agnostic: The system adapts to available AI API capabilities automatically.
- Closed-Loop Verification: The AI knows if its command failed or succeeded via the Feedback loop.
- Rust: Latest stable.
- ZeroMQ:
brew install zeromq(macOS) orapt install libzmq3-dev(Linux). - Gemini API Key: From Google AI Studio.
-
Launch the Citadel (Brain)
cargo run --bin cortex_citadel
- Action: Enter your Gemini API Key in the GUI Settings.
- Observation: Watch the chat for "🧠 Neural Link Established".
-
Launch the Executor (Hand) Open a new terminal:
cargo run --bin cortex_executor
- Observation: Citadel UI "Cortex Executor" light will turn GREEN.
-
Command & Control Type in Citadel Chat:
"Open Calculator"
- Chain of Events:
- Brain parses intent ->
open -a Calculator. - Citadel sends
Commandvia ZMQ. - Executor receives, executes, and captures output.
- Executor sends
Feedback. - Citadel displays:
🤖 Executor Report: ✅ Success.
- Brain parses intent ->
- Chain of Events:
cortex_citadel/: The GUI and Brain logic.src/brain.rs: Gemini API client & Model Discovery.src/bus/: ZeroMQ implementation.src/supervisor.rs: Component monitoring logic.
cortex_executor/: The execution agent.src/main.rs: Command loop and feedback system.
PROTOCOL.md(internal): Detailed wire specification.
MIT License