What's New

The latest ForgeAI release focuses on deeper security hardening, durable memory, better diagnostics, and safer autonomous execution.

AreaHighlights
Security Hardening8 new defensive layers: tool output sanitization, sensitive file guard, exfiltration prevention, persistence blocker, model security profiles, network egress control, sandbox isolation, and system prompt defense.
Stability & ReliabilityMemory leak fixes across session management and plan tracking, cleaner shutdown behavior with unref'd timers, better response sanitization, and more stable CI timing assertions.
Skill RegistryRuntime-managed skills with 3 handler types: script, HTTP, and function. Skills can be installed, activated, deactivated, and managed without rebuilding the app.
Enhanced CLI Diagnosticspnpm forge doctor now checks Runtime, Configuration, LLM Providers, Services, and Workspace for a much more complete system audit.
Blocked IP PersistenceIPs blocked by rate limiting or threat detection now persist in MySQL (migration 008). Survives restarts, with automatic expiry cleanup on boot.
Audit Hash IntegrityAudit log hash chain auto-repairs on startup. Timestamp normalization fixes MySQL precision truncation. No more false integrity alerts.
Intent ClassifierZero-cost heuristic classification (no LLM call) that skips tool definitions for simple/greeting intents, saving hundreds of tokens per request.
Agent Workflow EngineState-machine-driven execution model with structured steps, retry logic, token tracking, and MySQL persistence for complex autonomous tasks.

Quick Start

Get ForgeAI running in under 2 minutes with Docker:

git clone https://github.com/forgeai-dev/ForgeAI.git
cd ForgeAI
docker compose up -d

Open http://localhost:18800 → the Setup Wizard guides you through SMTP, 2FA, and admin PIN configuration → add an LLM API key in Settings → start chatting.

No .env file needed. Security secrets are auto-generated on first run. The Setup Wizard appears only once, on the very first access.

From Source

pnpm install && pnpm -r build
node packages/cli/dist/index.js onboard   # Interactive setup wizard
node packages/cli/dist/index.js start --migrate

Prerequisites: Node.js ≥ 22, pnpm ≥ 9, MySQL 8.x. Gateway runs at http://127.0.0.1:18800.

Installation

Linux (Ubuntu/Debian)

# Install Node.js 22 + pnpm
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
corepack enable && corepack prepare pnpm@latest --activate

# Install MySQL 8
sudo apt-get install -y mysql-server
sudo systemctl start mysql && sudo systemctl enable mysql
sudo mysql -e "CREATE DATABASE forgeai CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

# Clone, install, configure, start
git clone https://github.com/forgeai-dev/ForgeAI.git && cd ForgeAI
pnpm install && pnpm -r build
pnpm forge onboard   # Interactive wizard
pnpm forge start     # http://127.0.0.1:18800

macOS

brew install node@22 mysql
brew services start mysql
mysql -u root -e "CREATE DATABASE forgeai CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
corepack enable && corepack prepare pnpm@latest --activate
git clone https://github.com/forgeai-dev/ForgeAI.git && cd ForgeAI
pnpm install && pnpm -r build
pnpm forge onboard && pnpm forge start

Windows

# Install Node.js 22 from https://nodejs.org
# Install MySQL 8 (installer or XAMPP)
corepack enable
corepack prepare pnpm@latest --activate
git clone https://github.com/forgeai-dev/ForgeAI.git
cd ForgeAI
pnpm install && pnpm -r build
pnpm forge onboard
pnpm forge start

Docker

git clone https://github.com/forgeai-dev/ForgeAI.git && cd ForgeAI
cp .env.example .env  # Edit with your settings
docker compose up -d  # Gateway + MySQL, ready at http://localhost:18800

# Optional: Enable custom domain with automatic HTTPS
bash scripts/setup-domain.sh

Configuration

Environment Variables (.env)

# Database
MYSQL_HOST=127.0.0.1
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=forgeai

# Security (auto-generated by onboard wizard)
JWT_SECRET=your-random-jwt-secret
VAULT_MASTER_PASSWORD=your-strong-vault-password

# Gateway
GATEWAY_PORT=18800

LLM API keys and channel tokens are managed via the Dashboard Settings page. They are validated with a test call and stored encrypted in the Vault — never in .env or plain text.

Workspace Files (.forgeai/)

FilePurpose
AGENTS.mdAgent definitions and configurations
SOUL.mdAgent personality and behavior rules
IDENTITY.mdAgent identity (name, capabilities)
USER.mdUser context and preferences
AUTOPILOT.mdScheduled tasks with @startup, @hourly, @daily tags

All editable from Dashboard → Workspace.

Channels (8)

One AI, every platform. Each channel gets real-time progress updates, typing indicators, and automatic message chunking.

ChannelProtocolStatus
WhatsAppBaileys (Web)Active
TelegramBot APIActive
DiscordDiscord.jsActive
SlackBolt SDKActive
Microsoft TeamsBot FrameworkActive
Google ChatGoogle APIActive
WebChatWebSocketActive
Node ProtocolWebSocket (IoT)Active

Built-in Tools (19)

ToolDescription
web_browseFetch URLs with HTTP methods, headers, extract tables/metadata/JSON. HTML→clean Markdown via Turndown.
browserPuppeteer with 21 actions: click, type, scroll, hover, select, cookies, multi-tab, extract_table. Stealth anti-detection.
Search Google or DuckDuckGo and return structured results.
file_managerFull file operations: read, write, copy, move, search, permissions, disk_info. Absolute paths supported.
shell_execExecute shell commands. Dual routing: target="server" or target="companion".
code_runExecute JavaScript in Node.js VM sandbox.
cron_schedulerCreate, list, delete scheduled tasks with cron expressions.
knowledge_baseRAG operations: ingest, search, list documents.
desktopTake screenshots, GUI control. Routes to Companion on Windows.
sessions_listList active chat sessions across channels.
sessions_historyGet chat history for a specific session.
sessions_sendSend messages to other sessions (multi-agent communication).
image_generateGenerate images with DALL-E 3, Leonardo AI, or Stable Diffusion.
smart_homeControl Home Assistant devices via natural language.
spotifyControl Spotify playback, playlists, and search.
plan_createCreate structured execution plans with steps, statuses, and auto-progression. Breaks complex goals into manageable steps (max 15).
plan_updateUpdate plan step statuses (pending/in_progress/completed/failed/skipped). Auto-advances to next step on completion.
agent_delegateDelegate tasks to temporary specialist sub-agents that run in parallel. Each sub-agent has full tool access and works independently.
forge_teamCreate coordinated teams of specialist agents with dependency graphs. Independent tasks run in parallel; dependent tasks wait for upstream results. Up to 5 workers per team.

LLM Providers (10)

All model lists are configurable per provider via the Dashboard Settings page or the POST /api/providers/:name/models endpoint. Custom models are stored encrypted in Vault.

Every provider has circuit breaker protection (5-failure threshold, 2-minute cooldown), exponential backoff retries, and automatic failover to the next provider in the chain.

ProviderModelsType
OpenAIGPT-5.2, o3-pro, o4Cloud
AnthropicClaude Opus 4.6, Sonnet 4.6Cloud
GoogleGemini 2.5 Pro, 2.5 FlashCloud
MistralLarge, Codestral, NemoCloud
GroqLlama 3.3, MixtralCloud (Fast)
DeepSeekChat, ReasonerCloud
xAIGrok 4Cloud
OpenAI-CompatibleLM Studio, llama.cpp, vLLMCompatible
Kimi (Moonshot)K2.5Cloud
OllamaAny local modelLocal

Tip: You don't need a pay-as-you-go API key to use Claude. If you have a Claude Pro/Max/CLI subscription plan, paste the API key in Dashboard → Settings → Anthropic.

Security Modules (17)

ForgeAI now ships with 17 security modules. The visualization below shows the core request flow, while the additional hardening layers protect tool outputs, file access, command execution, outbound traffic, and model-specific risk.

Request
Rate Limiter
IP Filter
JWT Auth
RBAC
Input Sanitizer
Prompt Guard
Agent
Parallel Security Layers
Smart IP Detection
Auto-detects local vs external access
Audit Log
Every action recorded with hash chains
Encrypted Vault
AES-256-GCM encrypted secrets
Authentication Paths
Local Access
PIN + 2FA (TOTP)
External Access
PIN + 2FA + Email OTP (4-factor)

Encrypted Vault

All secrets (API keys, tokens, passwords) encrypted with AES-256-GCM. PBKDF2 key derivation. Never stored in plain text or .env.

RBAC

Role-based access control. Admin and user roles with hard enforcement (403 block for non-admin authenticated users on restricted endpoints).

Rate Limiting

Configurable per-IP and per-user rate limits. Protects against brute force and abuse.

Prompt Guard

Detects and blocks prompt injection attempts before they reach the LLM. The current guard includes direct injection, role hijacking, encoding tricks, delimiter abuse, context manipulation, and multilingual attack patterns.

2FA & Email OTP

TOTP-based 2FA with QR code setup. Email OTP for external access with styled HTML emails, 5-minute expiry, rate limiting.

Audit Log

Tamper-proof audit logging with hash chains. Every action recorded. Rotation support.

First-Run Setup Wizard

Guided setup on first access: SMTP configuration with test connection, 2FA (TOTP) with QR code, admin PIN change.

Smart IP Detection

Automatically detects whether requests come from localhost or an external IP. On a VPS or any internet-facing deployment, ForgeAI automatically requires an additional Email OTP step with no extra configuration.

Tool Output Sanitizer

Scans content returned by tools before it is injected into the model context. This blocks indirect prompt injection coming from web pages, search results, files, and other external content sources.

Sensitive File Guard

Detects and blocks reads of highly sensitive material such as .env files, SSH keys, PEM/KEY files, vault artifacts, cloud credentials, and password databases like /etc/shadow or Windows SAM.

Exfiltration Prevention

Prevents suspicious outbound shell commands that attempt to send secrets to external destinations via curl, wget, scp, nc, and similar patterns.

Persistence Blocker

Blocks persistence techniques such as reverse shells, SSH key injection, cron manipulation, systemd service installation, and scheduled task abuse across both shell_exec and file_manager.

Model Security Profiles

ForgeAI maps supported models into security tiers and automatically applies stricter prompt defense thresholds to weaker or more manipulation-prone models.

Network Egress Control

Blocks known exfiltration domains and prevents SSRF-style access to sensitive metadata endpoints from AWS, GCP, and Azure.

Sandbox Isolation

Code execution is sandboxed by default with read-only filesystems, no-new-privileges, disabled networking, and memory/CPU limits to reduce blast radius during code execution tasks.

System Prompt Defense

ForgeAI injects explicit defensive rules into the model instructions so the agent treats untrusted external content as hostile by default instead of blindly obeying embedded instructions.

Dashboard (19 Pages)

Full-featured React 19 SPA served directly by the Gateway. No separate deployment needed. Real-time WebSocket updates.

Overview
Chat
Tools
Usage
Plugins
Channels
Agents
Workspace
Gmail
Memory
RAG
API Keys
Webhooks
Calendar
Voice
Audit Log
Canvas
Nodes
Settings

Desktop Apps

ForgeAI offers two desktop applications with different purposes. Understanding the distinction is important to choose the right one for your use case:

Desktop App (packages/desktop)Companion (packages/companion)
FrameworkElectronTauri 2 + React + Rust
PurposeLightweight wrapper that opens the Dashboard as a native desktop window instead of a browser tabSmart client that connects to the Gateway and lets the AI agent control your Windows PC (desktop automation, voice, file management)
PlatformsWindows, macOS, LinuxWindows 10/11 only
Requires Gateway?No — embeds the Dashboard UI directlyYes — pairs with a running Gateway via WebSocket
Key FeaturesSystem tray, global hotkeys, auto-update, startup on bootPairing, voice mode, desktop automation, dual-environment routing, Rust safety system
When to useYou want a native app to access the Dashboard without opening a browserYou want the AI to interact with your Windows PC remotely (e.g., Gateway on VPS, Companion on your desktop)

ForgeAI Companion — AI Desktop Controller (Tauri 2)

Native desktop client (packages/companion) built with Tauri 2 + React + Rust. The Companion connects to any ForgeAI Gateway (local or remote) and gives the AI agent the ability to control your Windows desktop — creating files, running commands, taking screenshots, and more. The Gateway itself can run on any platform (Linux VPS, Docker, etc.), while the Companion runs on your Windows machine.

FeatureDescription
Pairing SystemConnect to any Gateway with URL + pairing code (generated in Dashboard → Settings)
Real-time ProgressWebSocket connection shows live tool execution (which tool, success/failure, duration)
Voice ModePush-to-talk with waveform visualizer, wake word detection ("Hey Forge"), STT → AI → TTS pipeline
Config SyncSecurely transfer all Gateway config between instances using AES-256-GCM encrypted one-time sync codes
Desktop AutomationAI creates folders, deletes files, launches apps, takes screenshots, runs shell commands on the Windows machine
Dual Environment RoutingAI controls two machines simultaneously: target="server" for the Linux/Docker Gateway, target="companion" for the Windows PC. Auto-detects intent from keywords
Smart SafetyRust-based security layer protects OS-critical paths (C:\Windows, System32, boot files) while allowing operations everywhere else
Streaming HeartbeatLong-running agent tasks never timeout. Gateway sends periodic heartbeats to keep the connection alive

Desktop App — Dashboard Wrapper (Electron)

Lightweight native wrapper (packages/desktop) that packages the ForgeAI Dashboard as a standalone desktop application. Instead of opening a browser tab to access http://localhost:18800, the Desktop App gives you a native window with OS-level integration. It does not connect to the Gateway as a client or give the AI control over your PC — it simply displays the same Dashboard UI in a native window.

FeatureDescription
System TrayRuns in background, double-click to show, context menu with quick actions
Global HotkeysCtrl+Shift+F to toggle window, Ctrl+Shift+C for quick chat
Native NotificationsOS-level notifications for agent events
Auto-UpdateAutomatic updates via GitHub Releases (electron-updater)
Startup on BootOptional auto-start with operating system
Single InstancePrevents multiple windows; close button minimizes to tray instead of quitting
Persistent SettingsGateway URL, window bounds, preferences stored in user data directory

Persistent Memory

ForgeAI memory is now durable across restarts, rebuilds, and deployments. Instead of living only in-process, important learnings are stored in MySQL and retrieved with semantic search when relevant.

CapabilityDescription
MySQL PersistenceCross-session memory survives server restarts, Docker rebuilds, and redeploys.
OpenAI EmbeddingsUses semantic similarity search when an OpenAI key is available for richer recall quality.
TF-IDF FallbackWorks even without an embeddings provider, so memory remains useful in fully self-hosted mode.
Entity ExtractionProjects, URLs, technologies, and file paths are extracted to improve retrieval quality and structure.

Skill Registry

The Skill Registry lets you extend ForgeAI with runtime-managed capabilities. Skills are persisted, can be enabled or disabled on demand, and are injected into the agent context automatically.

Handler TypeDescription
ScriptRuns a configured shell command or script as a skill handler.
HTTPCalls an external HTTP endpoint as part of a reusable skill.
FunctionExecutes a JavaScript function-based skill for custom local behaviors.

Intent Classifier

Zero-cost heuristic classification that runs before every LLM call — no extra API request needed. Classifies user messages into intent types and optimizes what gets sent to the model.

FeatureDescription
5 Intent Typessimple, complex, ambiguous, followup, greeting — detected via regex patterns for greetings, status checks, yes/no, thanks, and follow-ups.
skipTools OptimizationSimple and greeting intents skip tool definitions entirely, saving hundreds of input tokens per request.
DisambiguationMaps ambiguous terms (e.g. "status", "deploy", "mysql") to the correct intent using a built-in disambiguation dictionary.
Context InjectionbuildIntentContext() injects the classification result into the system prompt so the LLM knows the user's intent upfront.

Agent Workflow Engine

A state-machine execution model for complex autonomous tasks. The engine tracks structured steps, manages retries, and persists state to MySQL so workflows survive restarts.

FeatureDescription
State MachineStates: pendingextracting_contextplanningexecutingverifyingcompleted. Each transition is tracked.
Context ExtractionAutomatically extracts task type, entities, constraints, language, and complexity from the user message.
Step TrackingSteps with title, objective, allowed tools, retry logic, and per-step token usage tracking.
MySQL Persistenceworkflow_states table (migration 007) with session/agent IDs, steps JSON, context, metadata, and timestamps. Falls back to in-memory if DB unavailable.

Forge Teams & Task Delegation

Create coordinated teams of specialist agents that work together on complex projects. Independent tasks run in parallel; dependent tasks wait for upstream results and receive them as context.

FeatureDescription
Forge TeamsUp to 5 specialist workers per team with dependency graphs. 2 concurrent teams max. Visible at GET /api/teams/active and in the Agents dashboard page.
Task DelegationDelegate tasks to temporary sub-agents via agent_delegate. Each sub-agent has full tool access, runs independently, returns results. Multiple delegates run in parallel via Promise.allSettled. No recursion (sub-agents cannot delegate further).
Execution Planningplan_create and plan_update tools for structured step-by-step execution. Plans with up to 15 steps, auto-advance on completion, plan context injected on each LLM iteration.
Agentic Loop RuntimeThe agent runs with a 200-iteration safety cap, stuck-loop detection, and a reflection phase after multi-step work. In practice this is effectively unlimited for real production tasks while still protecting against runaway execution.

Adaptive Prompt Optimizer

The agent learns from past task outcomes and automatically improves prompts for future tasks. Inspired by DSPy's optimization concepts, built natively for ForgeAI.

FeatureDescription
Task ClassificationCategorizes tasks into 9 types: web_creation, api_development, data_analysis, scripting, research, file_operations, system_admin, automation, general
Success PatternsRecords tool-call sequences from successful tasks with scores (0–1) based on failures, reflection triggers, and iteration count
Anti-PatternsTracks failure patterns and generates avoidance instructions for future tasks
Few-Shot InjectionInjects proven strategies and warnings into prompts for similar future tasks
Temporal DecayOld patterns lose relevance (30-day window), keeping the most recent and effective strategies at the top

Blocked IP Persistence

IPs blocked by rate limiting or threat detection are now persisted in MySQL instead of only living in memory. They survive server restarts, Docker rebuilds, and redeploys.

FeatureDescription
MySQL Tableblocked_ips (migration 008) with IP, reason, auto_blocked flag, threat count, timestamps, and optional expiration.
Auto-CleanupExpired entries are automatically removed on startup and periodically during runtime.
Boot HydrationIPFilter.loadBlocked() restores all persisted blocks from the database on every Gateway start.

Audit Hash Chain Integrity

The audit log uses a hash chain (each entry's hash includes the previous entry's hash) for tamper detection. Phase 36 fixed a precision issue and added auto-repair.

FeatureDescription
Timestamp NormalizationMySQL TIMESTAMP truncates milliseconds. computeHash() now normalizes to second precision before hashing, eliminating false mismatches.
Auto-RepairrepairHashChain() recomputes the full chain on startup if integrity check fails, instead of raising a critical alert.
/info EndpointDashboard Overview now shows dynamic security module status from GET /info, including all 17 active modules.

Node Protocol (IoT/Embedded)

Connect lightweight devices to your AI via WebSocket. A single Go binary (~5MB, zero dependencies) turns any Linux board into an AI-powered node.

Supported: Raspberry Pi, Jetson Nano, BeagleBone, Orange Pi, NanoKVM, ESP32 (MicroPython).

# Download binary from GitHub Releases
wget https://github.com/forgeai-dev/ForgeAI/releases/download/node-agent-latest/forgeai-node-linux-arm64
chmod +x forgeai-node-linux-arm64

# Run
./forgeai-node-linux-arm64 \
  --gateway http://YOUR_GATEWAY_IP:18800 \
  --token YOUR_NODE_API_KEY \
  --name "My-RaspberryPi"

RAG Engine

Ingest documents (text, markdown, PDF text), chunk with configurable overlap, generate TF-IDF or OpenAI embeddings, search semantically. Retrieved context is injected into the agent's prompt automatically. Persistence to disk with auto-load on startup.

Workflow Engine

Define multi-step workflows with conditions, delays, transforms, and parallel branches. Execute via API or schedule with cron. Each step can call tools, send messages, or trigger other workflows.

Autopilot

Define scheduled tasks in AUTOPILOT.md with tags: @startup, @hourly, @morning, @evening, @daily, @weekly. Editable from Dashboard.

Config Sync

Securely transfer all Gateway configurations between instances using encrypted one-time sync codes. AES-256-GCM encryption, 5-minute TTL, single-use, rate-limited, audit-logged.

Domain / HTTPS (Native)

Built-in Caddy reverse proxy with automatic Let's Encrypt SSL. Run bash scripts/setup-domain.sh for interactive setup that validates DNS, checks ports, configures .env, and deploys.

Static Site Hosting

The Gateway automatically serves static websites created by the agent at /sites/<project-name>/. No extra ports, no HTTP servers needed. With a domain: https://yourdomain.com/sites/<project-name>/.

API Reference (150+ Endpoints)

Full list available at GET /info. Key endpoints:

EndpointDescription
POST /api/chatSend message to agent
GET /api/chat/sessionsList chat sessions
GET /api/agentsList agents
POST /api/agentsCreate agent
GET /api/providersList LLM providers
GET /api/providers/balancesCredit balances
GET /api/toolsList available tools
POST /api/tools/executeExecute a tool
POST /api/rag/ingestIngest RAG document
POST /api/rag/searchSemantic search
GET /api/nodesList IoT nodes
POST /api/nodes/:id/commandExecute command on device
GET /api/security/summarySecurity status
GET /api/audit/eventsAudit log events
POST /api/workflowsCreate workflow
POST /api/config/sync-pushPush config to another Gateway
GET /api/gdpr/exportGDPR data export
GET /healthHealth check

CLI Reference

pnpm forge onboard   # Interactive first-time setup
pnpm forge start     # Start Gateway + Dashboard
pnpm forge doctor    # Check Runtime, Configuration, LLM Providers, Services, Workspace
pnpm forge status    # Quick status check

Chat Commands (from any channel)

CommandDescription
/newStart new conversation
/statusShow agent status
/think <off|low|medium|high>Control reasoning depth
/usage <off|tokens|full>Toggle usage display
/compactCompact conversation history
/pair FORGE-XXXXPair with invite code
/autopilotView scheduled tasks
/helpShow available commands