Skip to content

Latest commit

ย 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Daedalus (Daedalus-Swarm)

Daedalus

Local-first, self-hosted, autonomous multi-agent coding swarm.

Combines the power of Claw-style tool harness with Hermes-style persistent memory, auto-skill creation, and self-improvement. Defaults to 100% local via Ollama, but supports any remote model (OpenAI, Groq, xAI/Grok, DeepSeek, etc.) via API keys with auto model fetching.

โœจ Core Philosophy

  • Defaults to fully local (Ollama)
  • Optional cloud models via simple python main.py llm selector + API key (auto-fetches model list)
  • Full user control + explicit approval for every destructive action
  • Agents that learn and improve themselves over time

โšก TL;DR - One Command Install + Run

# Windows PowerShell - Install
cd D:\hermes; python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -r requirements.txt

# Then start DAEDALUS daemon
python main.py daedalus

๐Ÿ“ Exact Project Structure

D:\hermes\
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ tools.py           # Full Claw harness (file, bash, git, search)
โ”‚   โ”œโ”€โ”€ react_loop.py      # Custom ReAct + tool-calling engine
โ”‚   โ”œโ”€โ”€ daedalus_daemon.py   # Autonomous background scanner/fixer
โ”‚   โ””โ”€โ”€ dashboard_events.py # Global event broadcaster for 3D dashboard
โ”œโ”€โ”€ hermes/
โ”‚   โ”œโ”€โ”€ memory.py          # SQLite + ChromaDB hybrid memory
โ”‚   โ”œโ”€โ”€ skills/            # Auto-generated reusable YAML skills
โ”‚   โ”œโ”€โ”€ soul.md            # Living user + project preference memory
โ”‚   โ””โ”€โ”€ self_improve.py    # (future) prompt + skill evolution
โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ orchestrator.py    # Swarm coordinator
โ”‚   โ”œโ”€โ”€ architect.py
โ”‚   โ”œโ”€โ”€ coder.py
โ”‚   โ”œโ”€โ”€ tester.py
โ”‚   โ””โ”€โ”€ scribe.py
โ”œโ”€โ”€ backend/
โ”‚   โ””โ”€โ”€ dashboard_api.py   # FastAPI + WebSocket for 3D dashboard
โ”œโ”€โ”€ dashboard/             # React 19 + Three.js 3D frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/    # Reusable 3D React components
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/         # useDashboard (WebSocket), useStore (state)
โ”‚   โ”‚   โ”œโ”€โ”€ types/         # TypeScript interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ App.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ main.tsx
โ”‚   โ”‚   โ””โ”€โ”€ index.css
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ vite.config.ts
โ”‚   โ”œโ”€โ”€ tailwind.config.js
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ interfaces/
โ”‚   โ””โ”€โ”€ messaging.py       # Unified send_message + command parser (Telegram/Discord/WhatsApp)
โ”œโ”€โ”€ config.yaml
โ”œโ”€โ”€ main.py                # Beautiful CLI + `bot` subcommand
โ”œโ”€โ”€ bot_orchestrator.py    # Central 24/7 multi-platform bot + optional dashboard
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ run_daedalus.bat
โ”œโ”€โ”€ run_forever.bat        # Auto-restarting bot service (Windows)
โ”œโ”€โ”€ run_dashboard.bat      # Launch 3D dashboard (Windows)
โ”œโ”€โ”€ run_dashboard.sh       # Launch 3D dashboard (Linux/Mac)
โ”œโ”€โ”€ run_all.bat            # Launch everything (Windows)
โ”œโ”€โ”€ run_service.py         # NSSM / systemd / Task Scheduler ready entrypoint
โ””โ”€โ”€ README.md

๐Ÿš€ Quick Start (Windows)

1. Prerequisites

  • Python 3.11+
  • Git
  • Ollama (for local mode) โ€” optional if you only use remote providers

2. One-Liner Install

Copy & paste this single command into PowerShell:

cd D:\hermes; python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -r requirements.txt

Alternatively, for cmd.exe:

cd D:\hermes & python -m venv .venv & .venv\Scripts\activate.bat & pip install -r requirements.txt

Or step-by-step (if you prefer):

cd D:\hermes
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt

3. (Optional) Start Ollama + Pull Local Models

ollama serve

In another terminal (for local use):

ollama pull qwen2.5-coder:7b          # or bigger
ollama pull deepseek-coder-v2:16b
ollama pull nomic-embed-text

For remote models (OpenAI, Groq, xAI, DeepSeek...): just run

python main.py llm

It will let you pick provider, paste API key โ†’ auto-fetches all available models, pick one with arrows/numbers, and it becomes the new default instantly. No code changes needed anywhere.

4. First Run

python main.py --help
python main.py status
python main.py swarm "Create a FastAPI hello-world endpoint with Pydantic models and tests"

5. Start the Autonomous Daemon (DAEDALUS)

Double-click run_daedalus.bat or:

python -m core.daedalus_daemon
# or one-shot
python -m core.daedalus_daemon --once

DAEDALUS will wake up every 15 minutes (configurable), find issues, and propose fixes โ€” always asking for your approval on changes.

๐Ÿค– Multi-Provider LLM Support (Ollama + Remote)

Run this any time to switch models or add cloud providers:

python main.py llm

What happens:

  1. Shows current provider/model
  2. Lists all supported providers (OpenAI, Groq, xAI/Grok, DeepSeek, Together, Fireworks, Ollama)
  3. You pick one โ†’ if it needs a key, you paste it
  4. Auto-fetches the full list of models from that provider's API
  5. You choose the model (number or name)
  6. Optional: save the key locally in config.yaml
  7. From that moment on, every swarm, claw, daedalus call uses the new model automatically.

Examples of direct set (non-interactive):

python main.py llm --set groq llama-3.1-70b-versatile
python main.py llm --list --key sk-...          # test fetch without saving

Supported env vars (recommended, never saved to disk):

  • OPENAI_API_KEY
  • GROQ_API_KEY
  • XAI_API_KEY
  • DEEPSEEK_API_KEY
  • etc.

All ReAct loops, agent calls, and direct make_llm_call now go through the unified manager โ€” zero changes in agents or tools needed.

๐Ÿ“ฑ Multi-Platform Bot Control (Telegram + Discord + WhatsApp + 24/7 Service)

Control your entire Daedalus swarm from your phone or Discord server โ€” no need to be at the terminal.

Quick Start

  1. Install extra packages

    pip install -r requirements.txt
  2. Get tokens

    • Telegram: Open @BotFather โ†’ /newbot โ†’ copy token
    • Discord: https://discord.com/developers/applications โ†’ New Application โ†’ Bot โ†’ Token + enable Message Content Intent + add bot to your server
    • WhatsApp: Optional (pywhatkit is unofficial & limited). For real use, get WhatsApp Business API.
  3. Configure allowed users + tokens (edit config.yaml or use .env)

    messaging:
      telegram_token: "123456:ABC-DEF..."
      discord_token: "your_discord_token"
      allowed_users: ["987654321"]     # your Telegram user id / Discord user id

    Or create .env in project root (recommended):

    TELEGRAM_BOT_TOKEN=...
    DISCORD_BOT_TOKEN=...
    ALLOWED_USERS=123456789,987654321
    
  4. Launch the bot

    python main.py bot

    Now send in Telegram/Discord:

    /goal Create a FastAPI endpoint for user login with JWT
    /status
    /daedalus on
    /help
    

    The bot will forward the goal to the full multi-agent swarm and reply with the result on the same platform.

Always-Running 24/7 Service

  • Simple persistent mode (Windows): Double-click run_forever.bat (auto-restarts on crash)

  • Production Windows Service (recommended): Use NSSM

    nssm install DaedalusBot
    Path: C:\Python311\python.exe
    Arguments: D:\hermes\run_service.py
    
  • Linux / systemd: Create a simple service file pointing to python run_service.py

  • Optional Web Dashboard (port 8000):

    uvicorn bot_orchestrator:dashboard_app --port 8000

    Visit http://localhost:8000/status and trigger goals from browser.

All responses, logs, and errors go to logs/bot.log.

The core (core/, agents/, hermes/) is completely untouched โ€” the bot layer only calls the existing public functions (run_swarm, get_react_loop, etc.).

๐ŸŽจ Futuristic 3D Dashboard

Real-time cyberpunk command center with 3D AI swarm visualization.

Quick Launch (Windows):

run_dashboard.bat

Manual Launch (Any OS):

# Terminal 1: Backend
python -m uvicorn backend.dashboard_api:app --reload --port 8001

# Terminal 2: Frontend
cd dashboard && npm run dev

Then open: http://localhost:3000

Features:

  • โœจ 3D holographic control tower + 5 neon agent avatars with live status animations
  • ๐ŸŽฏ Click agents to focus/see detailed task info + progress
  • ๐Ÿ“Š Real-time animated stats rings (tasks, skills, tokens, DAEDALUS)
  • ๐ŸŽฎ Interactive camera (orbit, zoom, drag to rotate)
  • ๐Ÿ“ Live terminal feed (color-coded logs)
  • ๐Ÿ’ซ Particle effects synchronized with agent activities
  • โšก WebSocket real-time updates (<2ms latency)

Integrate with your agents:

from core.dashboard_events import emit_agent_update, emit_log, emit_metrics

emit_agent_update("Coder", "working", "Writing handler", progress=45)
emit_log("โœ“ Tests passed", level="success", agent="Tester")
emit_metrics(tasks_completed=42, skills_created=17)

All updates appear instantly on the 3D dashboard! Backend: FastAPI + WebSocket. Frontend: React 19 + Three.js.

๐Ÿš€ Run Bot + Dashboard Together (One Command)

Want everything running at once? Use the unified launcher โ€” starts FastAPI backend, React dashboard, and bot orchestrator simultaneously.

Windows (Batch):

run_bot_and_dashboard.bat

Windows (PowerShell):

.\run_bot_and_dashboard.ps1

Any OS (Python):

python run_unified.py

What it does:

  1. Creates Python venv (if needed)
  2. Installs all Python dependencies
  3. Creates npm install Node modules (if needed)
  4. Starts FastAPI backend on http://localhost:8001
  5. Starts React dashboard on http://localhost:3000
  6. Starts bot orchestrator (listens for Telegram/Discord/etc.)

Then open your browser to http://localhost:3000 and watch the 3D swarm in action!

Configuration:

  • Copy .env.example โ†’ .env and add your:
    • OPENAI_API_KEY, GROQ_API_KEY, etc.
    • TELEGRAM_BOT_TOKEN, DISCORD_BOT_TOKEN
    • ALLOWED_USERS (comma-separated IDs)
    • VITE_API_URL, VITE_WS_URL (usually defaults work)

See .env.example for all available options.

Command Description
python main.py swarm "..." Full multi-agent swarm (Architect โ†’ Coder โ†’ ...)
python main.py claw "..." Direct powerful ReAct single-agent mode
python main.py daedalus --once One autonomous scan + fix cycle
python main.py daedalus Start the 24/7 background daemon
python main.py status Memory stats + project health
python main.py llm Interactive LLM provider + model selector (auto-fetch models after pasting API key)
python main.py bot Always-on multi-platform bot (Telegram/Discord/WhatsApp) + dashboard support

๐Ÿ”’ Safety (Non-negotiable)

  • Every file delete, git push, or high-risk shell command requires explicit approval
  • All operations confined to the project root (path escape protection)
  • Full audit trail in hermes/hermes.log and SQLite

๐Ÿง  How It Learns

  1. Every successful task โ†’ stored in Hermes memory (SQLite + vectors)
  2. After complex success โ†’ Scribe agent auto-generates a reusable YAML skill in hermes/skills/
  3. Every 10 tasks โ†’ self-improvement loop can rewrite prompts/skills (future)
  4. soul.md accumulates your preferences and project conventions

๐Ÿงช Development Tips

  • Edit config.yaml freely (hot-reloaded in many places)
  • Add your own tools in core/tools.py โ€” they automatically become available to ReAct
  • Skills are just YAML โ€” drop new ones in hermes/skills/ and the swarm will discover them
  • Run with PYTHONPATH=. if importing from outside

๐Ÿ“ฆ Optional / Future

  • FastAPI web dashboard (port 7777)
  • Docker-isolated agent execution
  • Full self_improve.py with evolutionary prompt optimization
  • MCP / A2A protocol support

๐Ÿค Contributing

This is a living local system. The best way to contribute is to:

  1. Run it on your own repos
  2. Let DAEDALUS find real issues
  3. Improve the agents when they make mistakes
  4. Share interesting auto-generated skills

License

MIT โ€” Use freely. Keep it local. Make it better.


Built with โค๏ธ for developers who want a true local AI teammate that gets smarter every day.

Contracts & Rewards

  • See README_REWARDS.md for the daily Top-20 vs Developer reward mechanics and distribution rules.
  • A minimal contracts scaffold (Hardhat + Solidity) is available in the contracts/ folder (HerToken, FeeSplitter, RewardDistributor, Staking).

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages