Skip to content

Latest commit

Β 

History

18 Commits

Folders and files

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

Repository files navigation

Digital Garage β€” AI Agents Orchestration Platform
image

Create AI agents, configure their behaviour, connect them into collaborative workflows β€” all from a self-hosted web UI.

Features Β· Architecture Β· Quick Start Β· Demo


What is Digital Garage?

Digital Garage is a platform where users can create AI agents, control how they behave (personality, tools, schedules, memory, limits), and connect them into collaborative workflows. Agents run on a real runtime, execute real tools, and communicate with each other to complete tasks autonomously. At least one agent is reachable through an external messaging channel (Email) so a human can interact with it conversationally. The platform includes a web UI for managing everything visually.

Dimension What you can configure
Identity Name, role, system prompt, model
Capabilities Tools, MCP servers, skills, memory
Behaviour Schedules, interaction rules, guardrails
Channels Email (IMAP/SMTP), web chat, API tokens
Limits Token budgets, rate limits, admin gates

Features

  • Chat β€” Multi-turn chat with any local model or API (Huggingface, vLLM, llama.cpp, Ollama, OpenRouter, OpenAI)
  • Agent Mode β€” Autonomous agents that plan, call tools, and work through tasks end-to-end. Built on opencode with MCP, web, files, shell, skills, and memory tools image
  • DYOM (Deploy Your Own Models) β€” Hardware-aware model recommendations, one-click download and serving. Built on llmfit. VRAM-aware scoring across 270+ models
  • Deep Research β€” Multi-step research runs that gather, read, and synthesize sources into a visual report. Adapted from Tongyi DeepResearch
  • Compare β€” Blind multi-model comparison. Send one prompt to several models, compare answers side-by-side
  • Documents β€” Multi-tab editor where YOU write the text and AI assists (markdown, HTML, CSV, syntax highlighting, AI edits)
  • Memory & Skills β€” Persistent vector memory and self-evolving skills. Your agent gets more capable over time (ChromaDB, fastembed ONNX, vector + keyword retrieval)
  • Email Agent β€” IMAP/SMTP inbox with AI triage: urgency detection, auto-tag, auto-summary, auto-reply drafts, spam filtering. Agents can receive and respond to emails autonomously
  • Notes & Tasks β€” Quick notes with reminders, todo lists, and scheduled tasks the agent can act on
  • Calendar β€” Local-first calendar with CalDAV sync (Radicale, Nextcloud, Apple, Fastmail)
  • Mobile β€” Responsive PWA with touch gestures
  • Edit Files β€” Directly Chat about them with AI
image Configure/Modify Tools β€” Give more power to your AI image Create: To-Do lists, Notes, Docs, pdfs – Set Reminders and trigger workflows through Email & Mobile applications image

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Web UI (static/)                     β”‚
β”‚  index.html Β· app.js Β· style.css Β· js/ (modular ES)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ REST / WebSocket
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FastAPI (app.py)                       β”‚
β”‚  Auth Β· Middleware Β· Rate Limiting Β· CORS                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ routes/  β”‚   src/   β”‚  core/   β”‚services/ β”‚mcp_servers/  β”‚
β”‚ REST API β”‚ Agent    β”‚ Auth, DB β”‚ Memory,  β”‚ MCP protocol β”‚
β”‚ handlers β”‚ loop,    β”‚ Session  β”‚ Search,  β”‚ servers for  β”‚
β”‚ for each β”‚ tools,   β”‚ Mgmt     β”‚ Shell,   β”‚ email, RAG,  β”‚
β”‚ feature  β”‚ LLM core β”‚          β”‚ DYOM     β”‚ image gen    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                β–Ό                β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ SQLite  β”‚    β”‚ ChromaDB  β”‚    β”‚  LLM     β”‚
   β”‚ (data/) β”‚    β”‚ (vectors) β”‚    β”‚ (Ollama/ β”‚
   β”‚ sessionsβ”‚    β”‚ memory,   β”‚    β”‚  vLLM/   β”‚
   β”‚ docs,   β”‚    β”‚ RAG       β”‚    β”‚  API)    β”‚
   β”‚ presets β”‚    β”‚           β”‚    β”‚          β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Clear Separation of Concerns

Layer Directory Responsibility
UI static/ HTML, CSS, modular JS β€” no business logic
API routes/ FastAPI endpoints β€” request validation, response formatting
Runtime src/ Agent loop, tool execution, LLM orchestration
Data core/ + data/ SQLAlchemy models, auth, session management, SQLite
Services services/ Memory, search, DYOM, shell β€” isolated business logic
MCP mcp_servers/ Model Context Protocol servers for tool integration

Multi-Agent System & Agentic Behaviour

How agents work

Each agent runs through a tool-calling loop (ReAct) (src/agent_loop.py):

  1. Plan β€” The agent receives a task and its system prompt (personality, rules, available tools)
  2. Act β€” It calls tools (shell commands, file operations, web search, email send, memory recall)
  3. Observe β€” Tool results feed back into the next reasoning step
  4. Loop β€” Steps 2–3 repeat until the agent decides the task is complete or hits a limit

Agent-to-agent communication

Agents communicate asynchronously through persisted message queues:

  • Email channel β€” An agent can be assigned to an email account. Incoming emails become tasks; the agent drafts and sends replies autonomously. This is the external messaging channel integration
  • Internal messages β€” Agents can trigger other agents via scheduled tasks and event bus (src/event_bus.py)
  • Shared memory β€” All agents read/write to the same ChromaDB vector store, enabling knowledge sharing across the workflow

Message persistence

All agent conversations are stored in SQLite (data/app.db):

  • sessions table β€” conversation metadata, timestamps, agent config
  • chat_messages table β€” full message history with role, content, tool calls
  • Visible in the UI under the Chat and History panels

Configurable dimensions per agent

Config Where
Name, role, system prompt Agent creation UI
Model selection /api/models discovery
Tool toggles Per-agent tool permissions
Schedules Task scheduler (src/task_scheduler.py)
Memory scope Agent-specific or shared memory
Skills Self-evolving skill library (services/memory/skills.py)
Guardrails Prompt security (src/prompt_security.py)
Rate limits Per-user rate limiter (src/rate_limiter.py)

Pre-built Workflow Templates

1. Research Agent Workflow

A multi-step research pipeline: gather sources β†’ read & extract β†’ synthesize into a visual report. image

[User Query] β†’ Web Search β†’ Source Collection β†’ Content Extraction β†’ LLM Synthesis β†’ Visual Report

2. Email Triage Workflow

Autonomous email processing: monitor inbox β†’ classify urgency β†’ summarize β†’ draft replies β†’ await approval. image

[IMAP Poll] β†’ Urgency Classification β†’ Auto-Tag β†’ Summary Generation β†’ Reply Draft β†’ Human Approval

Runtime & Framework Choices

Why FastAPI + Python?

  • Async-native β€” Agent loops are inherently async (wait for LLM, wait for tools). FastAPI's async/await model handles this natively
  • Type safety β€” Pydantic models validate all API inputs/outputs
  • Performance β€” Uvicorn ASGI server handles concurrent agent sessions efficiently
  • Ecosystem β€” Rich Python ML/AI ecosystem (embeddings, NLP, document processing)

Why opencode as the agent framework?

  • Open source β€” Fully auditable, no vendor lock-in
  • MCP support β€” Model Context Protocol enables standardized tool integration
  • Proven patterns β€” Battle-tested agent loop with tool execution, memory, and skill management
  • Justification β€” Compared against AutoGen, CrewAI, and LangGraph. opencode offered the best balance of simplicity, MCP support, and local-first design

Why ChromaDB for vector memory?

  • Self-hosted β€” Runs locally via Docker Compose, no cloud dependency
  • Fast β€” HNSW indexing for sub-millisecond similarity search
  • Embedded β€” Can run in-process or as a service

Quick Start

Option 1: Docker (recommended)

git clone <repo-url>
cd digital_garage
cp .env.example .env
docker compose up -d --build

Opens at http://localhost:7000. Compose starts: Digital Garage app, ChromaDB, SearXNG, and ntfy.

Option 2: Manual install

Requirements: Python 3.11+

# Linux/macOS
git clone <repo-url> && cd digital_garage
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python setup.py
uvicorn app:app --host 0.0.0.0 --port 7000

# Windows (PowerShell)
git clone <repo-url>
cd digital_garage
python -m venv venv
venv\Scripts\Activate.ps1
pip install -r requirements.txt
python setup.py
uvicorn app:app --host 0.0.0.0 --port 7000

Option 3: Test with Uvicorn directly

uvicorn app:app --host 0.0.0.0 --port 8000 --reload

Demo

End-to-end workflow

  1. Agent creation β€” Create an agent with name, role, system prompt, and model
  2. Tool configuration β€” Enable web search, shell, file, and email tools
  3. Multi-agent task β€” Two agents collaborate: one researches, one writes a report
  4. Email channel β€” Live conversation with an agent through email (IMAP/SMTP)
  5. Memory & skills β€” Agent recalls previous conversations and evolves new skills

Live monitoring

The UI includes real-time monitoring:

  • Agent logs β€” Stream agent reasoning steps and tool calls in real-time
  • Inter-agent messages β€” View messages passed between agents
  • Token/cost tracking β€” Per-session and per-agent token usage and estimated cost

Adding New Workflow Templates

  1. Create a new template in data/presets.json
  2. Define the agent chain: which agents run, in what order, with what handoffs
  3. Add a UI entry in static/js/ for the template selector
  4. Test end-to-end with the template runner

Adding New Messaging Channels

  1. Implement a channel handler in routes/ (e.g., routes/slack_routes.py)
  2. Add polling logic in src/bg_jobs.py for inbound messages
  3. Register the channel in the agent config UI
  4. Messages flow through the same agent loop β€” no runtime changes needed

Configuration

Variable Default Description
LLM_HOST localhost Your LLM server
SEARXNG_INSTANCE http://localhost:8080 SearXNG URL for web search
AUTH_ENABLED true Enable/disable login
DATABASE_URL sqlite:///./data/app.db Database connection
CHROMADB_HOST localhost ChromaDB host for vector memory
DIGITAL_GARAGE_ADMIN_PASSWORD (generated) Initial admin password, change later

Project Structure

app.py                   # FastAPI entry point
core/                    # Auth, database, middleware, constants, models
src/                     # Agent loop, tools, LLM core, search, chat processor
routes/                  # REST API endpoints (chat, email, documents, DYOM, etc.)
services/                # Memory, search, DYOM (model serving), shell, research
mcp_servers/             # MCP protocol servers (email, RAG, image gen, memory)
static/                  # Web UI (index.html, app.js, style.css, modular JS)
scripts/                 # CLI tools (digital_garage-dyom, database migrations)
tests/                   # Pytest test suite
docs/                    # Landing page and documentation
data/                    # Runtime data (SQLite DB, uploads, memory, presets)

Security

  • AUTH_ENABLED=true for any network-accessible deployment
  • Do not expose directly to public internet without HTTPS + reverse proxy
  • Keep data/, .env, logs out of Git (ignored by default)
  • Non-admin users cannot access shell/Python/file tools by default
  • Admin-only routes are gated: MCP management, API tokens, webhooks, DYOM serving, backup/vault

HTTPS Setup

your-domain.com {
  reverse_proxy localhost:7000
}

Tests

pip install -r requirements.txt
pytest tests/ -v

Critical path tests cover: agent creation, workflow execution, message delivery, auth regressions, security gates.

Built for professionals