Skip to content

Latest commit

Β 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

hivestack β€” Local-First AI Agent Platform

License: MIT Docker Image Unraid Template Security Scan CI

hivestack is a local-first AI agent and AIOps platform that runs fully offline on a Tesla M40 (Maxwell, CC 5.2). It ships as a single Docker/Unraid app with a Web UI. Every cloud provider (OpenAI, Anthropic, Gemini, etc.) sits behind its own enable switch β€” local-only by default.

Status: Stage 12 β€” Distro & Hardening (in progress). Stages 0–11 complete. Offline e2e suite: 14/14 βœ…


Why hivestack?

Problem hivestack Solution
Cloud dependency Runs 100% offline β€” no API keys required for core features
Data privacy Your data never leaves your hardware (M40 GPU or CPU)
Provider lock-in Unified provider gate: switch between local Ollama and cloud models instantly
Complex setup Single container deploy via Docker Compose or Unraid Community Apps
Observability gap Built-in AIOps: telemetry, alerts, RCA, chaos testing, postmortems

Core Features

πŸ”’ Provider Gate β€” Zero Cloud by Default

  • Global offline_mode β€” hard block on all cloud calls (returns 403 PROVIDER_DISABLED)
  • Per-provider toggles β€” OpenAI, Anthropic, Gemini, Ollama each independently enabled
  • Credentials only read when both offline_mode=false AND provider enabled
  • Zero network calls in default configuration

πŸ’¬ Chat & Agents

  • Streaming chat via SSE with provider auto-selection
  • Agent runtime β€” planβ†’act loop with scoped tools, step caps, cancel flags
  • Tool sandbox β€” calculator, filesystem, shell, web fetch (offline-gated), MCP client/server
  • MCP support β€” acts as both MCP server and MCP client

🧠 Memory & Knowledge (RAG)

  • Hybrid search β€” local embeddings (all-MiniLM-L6-v2 via fastembed/ONNX) + FTS5 keyword
  • Temporal knowledge graph β€” entities/relations with validity windows
  • Compaction β€” summaries archive originals, token-budget context packing

πŸ”„ Workflows & Orchestration

  • Persisted DAGs β€” tool/agent/chat/wait/map/board steps with parallel waves
  • Checkpoints + resume β€” approval stops, retries, {step}/{item} substitution
  • Cron scheduler β€” interval/cron triggers with daemon

πŸ“‹ Kanban Boards

  • Boards β†’ columns β†’ cards with drag-drop moves
  • Workflow board steps emit cards automatically

πŸ›  Skills & Packaging

  • Versioned skill registry injected into agent runs
  • Generator with template/LLM-author modes, eval trial runs
  • Portable SKILL.md export, install from local paths or git (offline-gated)

πŸ“„ Studio: Documents, Data & Media

  • Word β€” sections, tables, {{field}} merge with preview/audit/diff
  • Excel β€” sheets + live formulas, CSV/JSON profiling, anomaly detection
  • PowerPoint β€” builders with approval-gated local outbox publishing

πŸ“‘ Comms & Voice

  • Channels: webhook, email, Telegram, Discord, Slack, Matrix (external = offline-gated)
  • Reply pipeline: agent β†’ RAG-chat β†’ memory-backed offline fallback
  • Encrypted secrets vault (Fernet), wake-word β†’ STT β†’ agent β†’ TTS loop

🚨 AIOps (Full Observability Loop)

  • Telemetry ingestion β€” points + logs with windowed queries
  • Anomaly detection β€” z-score, IQR, Isolation Forest
  • Alerts with ack/close, service topology + RCA engine
  • Incidents with timelines, remediation with approval β†’ recovery verification
  • Chaos fault-injection β€” demo targets: fault β†’ detect β†’ alert β†’ incident β†’ RCA β†’ approve & verify
  • One-call demo: POST /api/aiops/demo drives full loop

πŸ›‘ Governance & Security

  • RBAC β€” admin/operator/viewer with PBKDF2
  • Immutable audit log β€” wired into toggles, approvals, vault, self-service
  • Token budgets β€” daily + per-run cost caps enforced in agent runtime
  • Security posture self-review dashboard

πŸ’° Economy (Experimental, Opt-In)

  • Local escrow/gig marketplace with ledger
  • ECDSA signature identity + one-time nonce challenges (anti-replay)
  • Signed federation pings via /api/federation/ingest

Quick Start

Docker Compose (Linux/macOS/Windows)

git clone https://github.com/wildfirebill-ai/hivestack.git
cd hivestack
cp .env.example .env
# Edit .env: set HIVESTACK_ADMIN_PASSWORD=your-strong-password
docker compose -f docker/docker-compose.yml up -d
# Open http://localhost:8080 β†’ login: admin / your-password

Unraid Community Apps

  1. Install NVIDIA GPU Plugin + Driver 580 branch (required for M40/CC 5.2)
  2. Apps β†’ Search "hivestack" β†’ Install
  3. Set paths: /config, /data, /models (defaults work)
  4. Set Admin password (required)
  5. Optional: GPU UUID(s) = all for M40
  6. Apply β†’ Web UI at http://<unraid-ip>:8080

Local Development

# Linux/macOS
python3 -m venv .venv && ./.venv/bin/pip install -r backend/requirements.txt
./scripts/dev.sh          # API :8110 + Web :5173

# Windows PowerShell
python -m venv .venv
.\.venv\Scripts\python -m pip install -r backend\requirements.txt
.\scripts\dev.ps1

Hardware Requirements

Component Minimum Recommended
GPU Tesla M40 (24 GB VRAM, CC 5.2) Same
Driver NVIDIA 580 branch (Linux) Same
System RAM 16 GB 32 GB
Disk 20 GB free 50 GB free (models + data)
CPU 4 cores 8+ cores

Note: Stage 1 (core platform) runs CPU-only. Stage 2+ (local inference via Ollama) requires M40 GPU.


Documentation

Guide Description
Getting Started Docker Compose & Unraid quick start
Configuration All config.yaml options, env overrides, security
Provider Management Enable/disable cloud & local providers
Unraid Guide Template install, GPU setup, backup/restore
API Reference REST endpoints, auth, WebSockets, errors
Architecture System design, data flow, invariants

Testing & Quality

make test          # pytest unit suite
make e2e           # offline end-to-end suite (14 scenarios, must exit 0)
make typecheck     # TypeScript strict mode
make build         # Docker image

CI Pipeline runs on every push/PR:

  • Offline e2e suite (no network calls)
  • Security scan: gitleaks + pip-audit + npm audit + Trivy image scan
  • Results aggregated to vulnerabilities.md

Release & Backup

# Version lives in VERSION file (source of truth)
./scripts/build.sh                    # build locally
./scripts/release.sh                  # build + push to GHCR
git tag -a v$(cat VERSION) -m "Release v$(cat VERSION)" && git push origin v$(cat VERSION)

# Backup / restore
python scripts/backup.py --data /data --config /config --out ./backups
python scripts/backup.py --restore ./backups/hivestack-backup-<ts>.zip --dest ./restore

Architecture Decisions

ADR Title Status
0001 SQLite WAL + Migrations Accepted

Contributing

See CONTRIBUTING.md for:

  • Branching strategy, commit conventions
  • Local test commands (make test && make e2e && make typecheck)
  • Architecture invariants (offline-first, provider gate, DB migrations)
  • Security reporting: security@wildfirebill.ai

Security

  • Never commit secrets β€” .env, .env.*, runtime/ are gitignored
  • Report vulnerabilities privately: security@wildfirebill.ai
  • Automated scanning: gitleaks, pip-audit, npm audit, Trivy (weekly + on push)
  • See SECURITY.md for full policy

License

MIT License β€” see LICENSE for details.

Copyright (c) 2024 wildfirebill-ai


Links

About

Local-first AI agent & AIOps platform running fully offline on Tesla M40 (Maxwell CC 5.2). Single Docker/Unraid app with provider gate, RAG, MCP, workflows, AIOps, governance.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages