Helix AI Agent โ Self-hosted, provider-agnostic AI agent with memory, plugins, and CLI
Project description
Helix AI Agent ๐
A self-hosted, provider-agnostic AI Agent Framework that learns, remembers, and adapts to each user.
Phase 1: Core Foundation โ
Features
- โ Provider-Agnostic: Works with OpenAI, Anthropic, Ollama, or any OpenAI-compatible API
- โ Self-Hosted: User owns all data (local ChromaDB)
- โ Memory: Conversation history with ChromaDB vector storage
- โ Onboarding: Personality formation through first conversation
- โ Telegram: Full Telegram bot interface
Phase 2: Smart Memory โ
Features
- โ Memory Compression: Summarizes long conversations to reduce token usage
- โ Smart Context Retrieval: Semantic search for relevant facts
- โ Token Tracking: Cost monitoring and budget alerts
- โ Error Learning: Tracks mistakes and learns to avoid them
- โ Auto Fact Extraction: Automatically extracts user facts from conversations
Phase 3: Tools & Safety โ
Features
- โ Safe SSH Client: Remote server management with approval system
- โ File Operations: Read/write with sandbox and backup
- โ API Caller: Generic HTTP client for external APIs
- โ Obedience Engine: Safety layer for dangerous operations
- โ Docker Support: Production-ready containerization
Phase 4: Voice & Production Polish โ
Features
- โ Voice Input: Whisper API (cloud-based) + Nemotron ASR (local fallback)
- โ Health Monitoring: System health checks for all components
- โ Production Logging: Advanced logging with rotation
- โ Rate Limiting: Request throttling protection
- โ Complete Documentation: Full deployment guides
Phase 5: Vision & OCR โ
Features
- โ Image OCR: Extract text from images using EasyOCR (Arabic + English)
- โ Image Processing: Automatic resize, format conversion
- โ Async Processing: Non-blocking with timeout protection
- โ Memory Persistence: Fixed CHROMA_PATH environment variable
Phase 6: Plugin Architecture โ (Complete)
Features
- โ Dynamic Plugins: Load features without restart
- โ Plugin Registry: Easy install/uninstall
- โ Hot Reload: Enable/disable on the fly
- โ Safe Mode: Plugins can't break core
- โ 5 Active Plugins: OCR, Voice, SSH, Web Search, File Ops
Available Plugins
| Plugin | Status | Description |
|---|---|---|
| ocr | โ Ready | Extract text from images |
| voice | โ Ready | Speech-to-text with Whisper |
| ssh | ๐ Ready | Remote server management |
| memory | โ Ready | ChromaDB conversation storage |
| file_ops | โ Ready | Safe file read/write |
| web_search | โ Ready | Search the web |
| code_exec | ๐ด Planned | Safe code execution |
Quick Start
1. Clone and Setup
cd helix
pip install -r requirements.txt
2. Configure
# Copy example files
cp .env.example .env
cp config/config.example.yaml config/config.yaml
# Edit .env with your API keys
nano .env
3. Run
python run.py
Configuration
Environment Variables (.env)
OPENAI_API_KEY=sk-your-key-here
TELEGRAM_BOT_TOKEN=your-telegram-token
Config File (config/config.yaml)
providers:
default: "openai" # or "anthropic", "ollama"
agent:
language: "ar" # or "en"
๐ Deployment Guide
Method 1: Docker Compose (Recommended for Beginners)
The easiest way to deploy Helix on any server with Docker support.
Step 1: Prepare Your Server
# Install Docker & Docker Compose
curl -fsSL https://get.docker.com | sh
Step 2: Download Helix
# Clone the repository
git clone https://github.com/Nabilkarem911/Helix.git
cd Helix
# Or just download the files you need:
# - docker-compose.yml
# - docker/Dockerfile
# - .env.example
Step 3: Configure Environment
# Copy environment template
cp .env.example .env
# Edit with your values
nano .env
.env file:
# Required: Telegram Bot Token (get from @BotFather)
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxyz
# Required: At least one LLM provider
OPENAI_API_KEY=sk-your-openai-key-here
# Or: ANTHROPIC_API_KEY=sk-ant-your-key-here
# Optional: Settings
DEFAULT_PROVIDER=openai
ENABLE_COMPRESSION=false
# Phase 4: Enable Voice (optional)
ENABLE_VOICE=false
ASR_MODEL_PATH=./models/nemotron-3.5-asr-q4_0.gguf
Optional: Voice Setup (Phase 4)
To enable voice message support:
# 1. Download Nemotron ASR model
mkdir -p models
cd models
wget https://huggingface.co/mudler/parakeet-cpp-gguf/resolve/main/nemotron-3.5-asr-q4_0.gguf
# 2. Enable in config
echo 'ENABLE_VOICE=true' >> .env
# 3. Restart Helix
docker-compose restart
Features:
- ๐ค 40+ languages supported
- ๐ง 0.6B parameters (lightweight)
- ๐ป CPU-only (no GPU needed)
- โก 2.5x faster than NVIDIA NeMo
Step 4: Deploy!
# Start Helix
docker-compose up -d
# Check logs
docker-compose logs -f helix
# Stop Helix
docker-compose down
# Update to new version
git pull
docker-compose down
docker-compose up -d --build
Method 2: Dokploy (One-Click Deployment)
Deploy on Dokploy or similar platforms (Railway, Coolify, etc.)
Step 1: Fork/Clone Repository
Fork this repo to your GitHub account.
Step 2: Connect to Dokploy
- Log in to Dokploy dashboard
- Click "Create Service" โ "Template"
- Select "Docker Compose"
- Connect your GitHub account
- Choose the forked Helix repository
Step 3: Add Environment Variables
In Dokploy dashboard, add these environment variables:
| Variable | Value | Required |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Your bot token | โ Yes |
OPENAI_API_KEY |
Your OpenAI key | โ * |
ANTHROPIC_API_KEY |
Your Anthropic key | โ * |
DEFAULT_PROVIDER |
openai or anthropic |
No (default: openai) |
* At least one provider key required
Step 4: Deploy
Click "Deploy" and wait for build to complete.
Helix will start automatically and connect to Telegram.
๐ Detailed Guide: See DOKPLOY_DEPLOY.md for complete step-by-step instructions with troubleshooting.
Method 3: Manual Installation (Advanced)
For servers without Docker or custom setups.
Requirements
- Python 3.11+
- pip
- git
Installation Steps
# 1. Clone repository
git clone https://github.com/Nabilkarem911/Helix.git
cd Helix
# 2. Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Install as command (optional, for CLI mode)
pip install -e .
# 5. Configure
cp .env.example .env
# Edit .env and add your API keys
# 6. Run โ choose your mode:
python run.py # Telegram mode (default)
python run.py --interface api # HTTP API only
python run.py --interface both # Telegram + API
python run.py --cli # Interactive CLI mode
# Or if you installed with pip install -e .:
helix --cli # CLI in any directory
helix --interface telegram # Telegram bot
helix --interface api # API server
helix --interface both # Both Telegram + API
Using Systemd (Linux Servers)
# Create service file
sudo nano /etc/systemd/system/helix.service
Service file content:
[Unit]
Description=Helix AI Agent
After=network.target
[Service]
Type=simple
User=your-username
WorkingDirectory=/path/to/Helix
Environment=PYTHONUNBUFFERED=1
ExecStart=/path/to/Helix/venv/bin/python run.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
# Enable and start service
sudo systemctl enable helix
sudo systemctl start helix
# Check status
sudo systemctl status helix
sudo journalctl -u helix -f
Method 4: Custom API Proxy (Orcanox, etc.)
Use a unified API proxy that combines multiple providers.
.env:
TELEGRAM_BOT_TOKEN=your-telegram-token
OPENAI_API_KEY=your-api-key-here
config/config.yaml:
providers:
default: "openai"
openai:
api_key: "${OPENAI_API_KEY}"
base_url: "https://api.orcanox.xyz/v1" # Custom proxy URL
model: "gpt-4o"
temperature: 0.7
Post-Deployment: Verify Installation
After deployment, verify everything works:
# Check container is running
docker ps | grep helix
# Check logs
docker-compose logs helix
# Test Telegram bot
# 1. Open Telegram
# 2. Find your bot (by username you created with @BotFather)
# 3. Send /start
# 4. You should receive welcome message
Updating Helix
# Using Docker Compose
cd /path/to/Helix
git pull # Get latest code
docker-compose down # Stop old version
docker-compose up -d --build # Build and start new version
# Using manual installation
git pull
source venv/bin/activate
pip install -r requirements.txt # In case deps changed
python run.py
Troubleshooting
Container keeps restarting
# Check logs for errors
docker-compose logs helix
# Common issues:
# 1. Missing TELEGRAM_BOT_TOKEN
# 2. Invalid API key
# 3. Network issues
Bot not responding in Telegram
- Check bot token is correct in .env
- Verify bot is started with @BotFather
- Check logs:
docker-compose logs -f helix - Try sending /start again
Permission denied errors
# Fix data directory permissions
sudo chown -R $USER:$USER ./data
# Or for Docker:
sudo chown -R 1000:1000 ./data
Architecture
helix/
โโโ helix_core/ # Core system (lightweight)
โ โโโ config_loader.py # Pydantic config
โ โโโ core.py # Main orchestrator
โ โโโ providers/ # LLM providers
โ โ โโโ openai_provider.py
โ โ โโโ anthropic_provider.py
โ โ โโโ router.py
โ โโโ memory/ # ChromaDB storage
โ โ โโโ chroma_store.py
โ โโโ plugins/ # โ
Plugin system (Phase 6)
โ โ โโโ manager.py
โ โ โโโ base.py
โ โโโ safety/ # Security layer
โ โโโ obedience.py
โโโ plugins/ # ๐ Dynamic plugins
โ โโโ ocr/ # โ
Phase 5
โ โโโ voice/ # โ
Phase 4
โ โโโ web_search/ # ๐ด Planned
โโโ interfaces/
โ โโโ telegram_bot.py # Telegram interface
โโโ docker/
โ โโโ Dockerfile
โโโ docker-compose.yml
โโโ config/
โ โโโ config.example.yaml
โโโ README.md
โโโ requirements.txt
Usage
First Conversation (Onboarding)
When user first messages the bot:
User: Hello!
Helix: Hello! I'm Helix, your AI companion. ๐
To get started, I'd love to know:
1. What would you like to name me?
2. How would you describe my role?
Just reply with something like: "Name me Sara, you're my assistant"
User: Name me Luna, you're my friend
Helix: Perfect! I'm now Luna, your friend. How can I help you?
Commands
| Command | Description |
|---|---|
/start |
Start conversation |
/help |
Show help |
/stats |
Memory, learning & tools statistics |
/tokens |
Detailed token usage & cost report |
/lessons |
Learned lessons from past errors |
/clear |
Clear conversation history |
/memory |
Show stored user facts |
/remind |
Set a reminder |
/monitor |
Server health monitoring |
/plugins |
Manage plugins (list, enable, disable) |
/connect |
Connect to SSH server |
/exec |
Execute SSH command |
/servers |
List connected servers |
/search |
Web search |
/read |
Read a file from server |
/write |
Write a file to server |
/ls |
List files on server |
/skills |
Manage knowledge base skills |
/alert |
Smart monitoring alerts |
/approve |
Approve a dangerous command |
/reject |
Reject a dangerous command |
/pending |
List pending approvals |
/stop |
Cancel current operation |
CLI Mode (helix --cli):
| Command | Description |
|---|---|
/tree [depth] |
Show project file tree |
/read <file> |
Read file with syntax highlight |
/ls [dir] |
List files |
/undo |
Undo last file edit |
/history |
Show edit history |
/diff |
Show pending edits |
/approve [id] |
Approve file edit |
/reject [id] |
Reject file edit |
CLI Mode (Phase 7)
Run Helix directly in your terminal with project awareness:
# 1. Clone the repo
git clone https://github.com/Nabilkarem911/Helix.git
cd Helix
# 2. Install dependencies
pip install -r requirements.txt
# 3. Install as command (one-time)
pip install -e .
# 4. Configure your API key
cp .env.example .env
# Edit .env and add your keys
# 5. Start CLI in any project directory
cd /path/to/your-project
helix --cli
# or without installing: python run.py --cli
Interactive terminal features:
- ๐๏ธ Project scanner โ auto-detects type (Python, Node, etc.)
- ๐ File tree โ
/treeshows project structure - ๐ Syntax-highlighted file reading โ
/read src/app.py - ๐ Safe editing โ diff preview + approval gate before any file change
- โฉ๏ธ Undo stack โ
/undoreverts last edit - ๐ง Shared memory โ same profile from Telegram
$ helix --cli
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ H E L I X C L I โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Helix โ your developer
Project: my-project (python)
โ Found 42 files
> /read main.py
๐ main.py
1 | import os
2 | def main():
...
> add logging to main.py
๐ Helix: I'll add logging. Here's the diff:
--- a/main.py
+++ b/main.py
+ import logging
...
Approve this edit? [y/n]: y
โ Edited main.py
> /exit
๐ Goodbye!
Natural Language Triggers
- Learn skills: "ุงุชุนูู ู [URL]" or "learn [URL]"
- Set alerts: "ูุจูููู ูู CPU ูุตู 90%" or "alert me if..."
- Ask for commands: "ุงูู ุงูุงูุงู ุฑ" or "what commands" โ shows full list
- Voice: Send voice message for transcription
- Photos: Send image for GPT-4o vision analysis
Providers Supported
| Provider | Status | Notes |
|---|---|---|
| OpenAI | โ Ready | GPT-4, GPT-4o-mini, etc. |
| Anthropic | โ Ready | Claude 3 Haiku, Sonnet, etc. |
| Ollama | โ Ready | Local models (Llama, etc.) |
Roadmap
- Phase 1 โ : Core Foundation (Provider-agnostic, Memory, Telegram)
- Phase 2 โ : Smart Memory (Compression, Token tracking, Error learning)
- Phase 3 โ : Tools (SSH, files), Safety layer, Docker
- Phase 4 โ : Voice (Whisper API + Nemotron), Health monitoring
- Phase 5 โ : Vision OCR (EasyOCR), Memory persistence fix
- Phase 6 โ : Plugin Architecture (dynamic loading, hot reload, dependency management)
- Phase 7 โ : CLI Mode (interactive terminal, project awareness, diff preview, undo)
Project Status
Helix is a production-ready AI Agent Framework with:
- ๐ค Multi-provider LLM support
- ๐ง Persistent memory with ChromaDB
- ๐ ๏ธ Safe tool execution
- ๐ค Voice input capability
- ๐๏ธ OCR for images
- ๐ณ Docker deployment
- ๐ Health monitoring
- ๐ป Interactive CLI with project awareness & diff preview
Quick Feature Toggle (via Environment Variables)
# Core (Required)
TELEGRAM_BOT_TOKEN=your-token
OPENAI_API_KEY=your-key
# Features (Optional)
ENABLE_VOICE=true # Voice messages
ENABLE_OCR=true # Image text extraction
ENABLE_SSH=false # Remote server access
ENABLE_FILE_OPS=false # File management
โ ๏ธ Security Notice
Helix can execute system commands when enabled.
Safety Features:
- โ Approval System: Destructive actions require manual approval
- โ Sandbox: File operations restricted to allowed paths
- โ Dry-run Mode: Preview SSH commands before execution
- โ Audit Log: All actions are logged
Enable Tools (Optional):
# config/config.yaml
tools:
ssh:
enabled: true
require_approval: true
allowed_hosts: ["trusted-server.com"]
file_ops:
enabled: true
allowed_paths: ["./data/"]
Warning: Only enable tools if you trust the LLM and understand the risks. SSH/file operations can damage your system.
License
MIT License - Self-hosted for everyone.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helix_nox-1.0.4.tar.gz.
File metadata
- Download URL: helix_nox-1.0.4.tar.gz
- Upload date:
- Size: 115.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a261ce9ddeea4806a7ab6678d13ee9337cc7c360c41a0a0253ac0ede1c94f5
|
|
| MD5 |
5ee672ecb985d4357ba2f56261fec2ef
|
|
| BLAKE2b-256 |
341c6d9e3d40b817c3aca4ce54d32f4d971f1367b95892bfcb91feaca0a9c7fd
|
File details
Details for the file helix_nox-1.0.4-py3-none-any.whl.
File metadata
- Download URL: helix_nox-1.0.4-py3-none-any.whl
- Upload date:
- Size: 127.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ade5167001e11681aa6148d2d96d8f03b19a0dd879e4caae4bf8bfdaa565865a
|
|
| MD5 |
8d3fddfc3e03d240bc197ede5b8d6b75
|
|
| BLAKE2b-256 |
66060d2f3204e66351eb8347aca1c4f15dc626e0838fb62e60a9893646dc52b1
|