Neugi Documentation
Deploy, manage, and scale a multi-agent neural swarm acting autonomously on your infrastructure. NEUGI v2.1.3 delivers production-grade orchestration across 29 subsystems, 120+ modules, and ~71K lines of deterministic multi-agent state logic.
Welcome to the Neugi documentation. Here you will find everything you need to know about setting up and running a local fleet of specialized, deterministic AI agents capable of code generation, browser automation, web search, and raw operating system execution.
Verified on 2026-05-24 against runtime fingerprint:
version 2.1.3,
25 top-level CLI commands,
32 dashboard REST endpoints,
17 provider catalog entries,
and 388 collected tests.
Re-validate anytime with python scripts/validate_doc_claims.py --mode strict.
NEUGI can execute autonomous, tool-driven actions. Treat outputs as assistive, keep a human approval path for impactful operations, and validate workflows in staging before production rollout. For legal and policy boundaries, review Terms of Service and Privacy Policy.
Governance now includes severity-based audit triage (All/Info/Warn/Critical), keyword filtering, and batch approval safety prompts with optional reason logging. Plugin controls now support live enable/disable, bulk actions, and persisted state overrides across restarts.
In Dashboard ops mode: Ctrl/Cmd+K opens command search, and Alt+1..4 switches Governance audit severity filters (All, Info, Warn, Critical) for fast triage.
You can also run /smoke from chat to execute a quick dashboard wiring health check.
Neugi now runs provider-agnostic workflows. You can start with cloud-first or local-first routing, then switch providers/models safely from dashboard setup. Current catalog includes OpenAI, Anthropic, Gemini, Grok, DeepSeek, Groq, Mistral, Cohere, OpenRouter, NVIDIA NIM, Together, Fireworks, Cerebras, and compatible custom endpoints.
What is Neugi?
NEUGI (Neural General Intelligence) is a deterministic multi-agent state machine designed for production-grade reliability at scale. Unlike monolithic chatbots, Neugi decomposes every task into specialized agent workflows orchestrated by a central director.
Key differentiators:
- Deterministic orchestration — Tasks are routed to specialized agents with guaranteed execution paths
- Hierarchical memory — Karpathy-style dreaming memory with episodic, semantic, and procedural scopes
- Auto-learning — Pattern tracking and automatic skill generation from every successful task
- 6-tier skill system — From global shared skills to ephemeral session-level tools
- Built-in web search & browser — Jina Reader, DuckDuckGo, Playwright, and stealth browser automation
- Multi-modal vision — Screenshot analysis, computer use, and image understanding
- Agent mesh (A2A) — Agents can discover and communicate with each other via protocol
Installation
Neugi requires Python 3.10+. Local Ollama is optional, not mandatory. The framework supports cloud and custom endpoints out of the box.
Prerequisites
| Component | Minimum | Recommended |
|---|---|---|
| Python | 3.10 | 3.12 |
| RAM | 4 GB | 8 GB |
| Disk | 2 GB | 5 GB |
| GPU | Optional | 8 GB VRAM for local LLMs |
One-Liner Install
macOS / Linux:
curl -fsSL https://neugi.com/install.sh | bash
Windows (PowerShell):
irm https://neugi.com/install.ps1 | iex
No WSL required. Install with PowerShell one-liner, run neugi wizard, pick your provider, test connection, and continue. Ollama is only required if you intentionally choose local Ollama routing.
Manual Install
git clone https://github.com/atharia-agi/neugi_swarm.git
cd neugi_swarm
pip install -e "neugi_swarm_v2[dev]"
After installation, run neugi wizard for interactive first-time setup, or neugi rescue if you encounter any issues.
Quickstart
Get from clean install to production-ready workflow with a provider-agnostic setup path.
Step 1: Install (One-Liner)
irm https://neugi.com/install.ps1 | iex
Step 2: Run the Wizard
The wizard walks you through provider selection, model choice, key setup, and connectivity verification. No manual config editing required.
neugi wizard
Step 3: Run Readiness Smoke Check
neugi smoke
Step 4: Run Shipping Gate (Strict)
neugi verify-release --json --no-tests
Step 5: Start Runtime + Dashboard
neugi start
Then open http://localhost:17901 for the web dashboard. The Setup tab can choose providers, search models, enter a key, test the connection, and save the AI config without using the terminal.
Step 6: Run Primary Workflow
neugi chat
If neugi command is not found, ensure your Python scripts directory is in PATH. The wizard can fix this automatically with neugi rescue --fix.
Architecture
Neugi v2 isn't a chatbot loop. It's a deterministic multi-agent state machine with 29 subsystems designed for production-grade reliability at scale.
Core Subsystems
| Subsystem | Function |
|---|---|
| Memory | Karpathy dreaming, hierarchical scopes, SQLite FTS5, vector embeddings (MiniLM/Ollama/TF-IDF) |
| Skills | 6-tier loading (global → ephemeral), SKILL.md v3, gating, token budgets |
| Agents | 6 deterministic archetypes with typed LLM wiring and tool schema injection |
| Session | 4 isolation modes, compaction, steering, write locks |
| Context | 10-section prompt assembly, token budget, KV cache |
| MCP Server | Full Model Context Protocol (stdio + HTTP + SSE transports, tool cancellation, rate limiting, auth tokens) |
| Governance | Budget tracking, approval gates, immutable audit logs |
| Plugins | SDK, manifest discovery, topological deps, 8 lifecycle hooks |
| Workflows | StateGraph, durable checkpoints, human-in-the-loop |
| Learning | Pattern tracking, auto skill generation, feedback loops |
| Gateway | WebSocket RPC, device pairing, cron, heartbeat |
| Planning | Tree of Thoughts, Chain of Verification, goal decomposition |
| Tools | 61 builtins across 10 categories, composition, dynamic generation |
| Channels | Unified Telegram, Discord, Slack, WhatsApp manager |
| Security | 7-layer sandbox, neuro-symbolic validation, AES-256 secrets |
| CLI + Wizard | 25 top-level commands, interactive chat, rescue mode, setup wizard |
| Dashboard | Glass-morphism HTML, 32 REST endpoints, setup provider test, approval queue, WebSocket events |
| Evals | Benchmark harness, regression detection, skill scoring |
| Multimodal | Vision input, screenshot analysis, computer use |
| A2A Protocol | Agent-to-agent mesh, capability discovery, heartbeat |
| Web Search | Jina Reader + DuckDuckGo fallback with intelligent caching |
| Browser | 3-tier automation: requests → Playwright → stealth browser |
| Vector Memory | all-MiniLM-L6-v2 embeddings with TF-IDF fallback |
| WebSocket | RFC 6455 stdlib server, real-time event streaming |
| Computer Use | Vision-guided browser automation with multimodal LLM |
Agent Archetypes
Neugi uses six deterministic agent archetypes working in orchestrated harmony. Each is locked to a specific role, capable of routing to specialized sub-modules without human intervention.
Builder
Code generation, file manipulation, system execution, and software architecture
Planner
Goal decomposition, Tree of Thoughts, Chain of Verification, strategy
Analyst
Data parsing, pattern detection, web search, research synthesis
Evaluator
Quality assurance, code review, output scoring, safety checks
Memory
Recall, context injection, memory consolidation (dreaming), embedding search
Communicator
Multi-channel routing, Telegram/Discord/Slack, message formatting
Typed Agent LLM Wiring
Every agent is strongly typed with auto-generated tool schemas from Python type hints. The TypedAgent class injects tool definitions directly into the LLM prompt, enabling structured function calling across local, cloud, and custom compatible providers.
from neugi_swarm_v2.agents.typed import TypedAgent, agent_tool
class MyAgent(TypedAgent):
@agent_tool(description="Search the web")
def search(self, query: str, max_results: int = 5) -> dict:
...
Context Memory
Neugi utilizes a built-in hierarchical memory system bridging the gap between small context windows and massive operational history. It reads and writes deterministically without heavy dependencies.
Memory Scopes
| Scope | Lifetime | Use Case |
|---|---|---|
| Episodic | Session | Current conversation turns |
| Semantic | Daily TTL (30d) | Facts, concepts, entities |
| Procedural | Persistent | Skills, workflows, patterns |
Vector Memory (v2.1.1)
Neugi now includes vector embeddings with three-tier fallback:
- sentence-transformers (all-MiniLM-L6-v2, 384-dim, ~80MB)
- Ollama embeddings (nomic-embed-text via local API)
- TF-IDF (pure Python, zero dependencies)
Hybrid recall blends TF-IDF scoring (0.7) with vector similarity (0.3) for maximum accuracy.
Dreaming
The Memory agent triggers sleep-cycle consolidation ("dreaming") during idle periods. This compresses ephemeral memories into semantic summaries and prunes stale entries automatically.
Skill System
Neugi's skill system is designed for production reliability. Skills are loaded in 6 tiers with automatic promotion/demotion based on usage frequency and relevance.
| Tier | Scope | Priority |
|---|---|---|
| Global | All sessions, all users | Highest |
| Project | Current project/workspace | High |
| Agent | Specific agent instance | Medium-High |
| Session | Current session only | Medium |
| User | Current user profile | Medium-Low |
| Ephemeral | Single task completion | Low |
Skills are defined via SKILL.md v3 specification with gating, token budgets, and automatic schema validation.
CLI Reference
Neugi provides a robust CLI for full swarm management, interactive chat, diagnostics, and configuration. The table below highlights key commands; run neugi help for the complete live command tree.
| Command | Description |
|---|---|
neugi start | Start gateway and all subsystems |
neugi stop | Gracefully shutdown all agents |
neugi status | Health, agents, sessions, channels |
neugi chat | Interactive chat mode |
neugi wizard | Interactive first-time setup |
neugi rescue | Diagnose and fix common issues |
neugi doctor | System diagnostics with auto-fix |
neugi update | Check for updates |
neugi smoke | Run fast end-to-end readiness checks |
neugi verify-release | Strict release-grade diagnostics and workflow validation |
neugi quickstart | One-command setup, diagnose, smoke test, and start |
neugi autonomous status | Show autonomous loop state and statistics |
neugi agents list | List all active agents |
neugi skills list | List installed skills |
neugi memory recall <query> | Search memory |
neugi memory dream | Trigger consolidation |
neugi sessions list | List active sessions |
neugi channels list | List messaging channels |
neugi config view | View current configuration |
neugi backup | Backup all NEUGI data |
neugi restore | Restore from backup |
New in v2.1.1: neugi rescue runs an interactive rescue mode that detects and fixes common issues like missing directories, broken configs, permission errors, and missing dependencies.
REST API
The Neugi gateway exposes REST API endpoints on the configured dashboard port (default 17901).
Agent Operations
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/agents | List all agents |
| POST | /api/agents/{id}/task | Delegate task to an agent |
| GET | /api/sessions | List active sessions |
| GET | /api/sessions/{id}/messages | Get session transcript |
| POST | /api/chat | Run chat request |
Provider & Runtime Setup
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/providers | Fetch provider/model catalog |
| GET | /api/providers/health | Readiness and key presence status |
| GET | /api/config | Read runtime configuration |
| PUT | /api/config | Update runtime configuration |
| POST | /api/config/test-llm | Validate provider/model connection |
WebSocket Events
Connect to ws://localhost:17901/ws for real-time events:
agent_status— Agent state changesmemory_event— Memory writes/recallstool_execution— Tool call resultssystem_alert— Errors and warnings
Telegram Bot
Command your swarm remotely via a secure Telegram bridge. The bot provides full parity with the CLI interface and supports image uploads with vision model fallback.
Available Commands
| Command | Description |
|---|---|
/start | Welcome message and setup help |
/help | List all available commands |
/reset | Reset conversation context |
/status | Show bot status and model info |
Configuration
# In config.json or via neugi wizard
"channels": {
"enabled": true,
"telegram": {
"token": "YOUR_BOT_TOKEN",
"mode": "polling"
}
}
With vision-enabled models (e.g., llava via Ollama), the bot can analyze images directly. With text-only models, it auto-generates image descriptions before processing.
Rescue & Wizard
Neugi v2.1.3 includes a comprehensive Rescue Wizard designed to help users when things go wrong — no terminal expertise required.
Setup Wizard
First-time users can run neugi wizard for guided setup:
- Directory creation and permission checks
- Provider selection from current multi-provider catalog (including NVIDIA NIM and compatible endpoints)
- Model selection with compatibility hints
- Feature enablement (memory, skills, channels, dashboard)
- Connection test before finishing
Rescue Mode
When something breaks, run neugi rescue to auto-detect and fix:
| Category | Issues Detected |
|---|---|
| Configuration | Missing config, corrupted JSON, invalid provider settings |
| Provider Connectivity | Unreachable endpoint, invalid base URL, missing/invalid API key, model mismatch |
| Directories | Missing required folders (skills, memory, sessions) |
| Permissions | No write access to NEUGI directory |
| Dependencies | Missing Python packages |
| Database | SQLite corruption, integrity check failures |
| Ports | Conflicts on dashboard and runtime service ports |
Corruption Repair
neugi rescue --repair detects and fixes corrupted files:
- Invalid JSON configs are restored from defaults
- SQLite databases are integrity-checked and repaired
- Session files are validated and pruned if corrupted
Provider Switching
neugi rescue --switch-provider guides you through changing LLM providers without breaking existing configuration:
neugi rescue --switch-provider
# Interactive wizard:
# 1. Choose new provider
# 2. Select model
# 3. Test connection
# 4. Keep old config as fallback
Enterprise Risk & Safety
This section is designed for due diligence, security review, and production governance. NEUGI is powerful agentic infrastructure; safe deployment requires explicit controls, human approval paths, and staged rollout discipline.
Autonomous and tool-executing workflows can have side effects. Treat AI outputs as assistive by default, enforce operator approval for high-impact actions, and validate behavior in staging before production.
Risk Runbook
Use this runbook as the standard operational loop for all environments:
- Scope and classify task risk (info / warn / critical) before execution.
- Constrain capabilities: load only required tools, providers, and channels for the task.
- Gate with approval policy: require explicit human approval for medium/high impact actions.
- Execute in staged environment first with representative data and limited blast radius.
- Observe and audit via governance logs, approval queue, and severity triage.
- Promote to production only after repeatable pass criteria are met.
Approval Matrix by Risk Level
| Risk Level | Typical Actions | Required Controls | Approval SLA |
|---|---|---|---|
| Info | Read-only queries, summarization, diagnostics, safe metadata checks | Auto-approve allowed, audit log required, reversible context | Immediate |
| Warn | Config updates, non-destructive file edits, provider/model switching | Single human approval, dry-run preferred, rollback path mandatory | < 15 minutes |
| Critical | Network/system commands, deployment mutation, privileged or irreversible operations | Two-person approval, staged validation, explicit command preview, post-action verification | < 60 minutes |
Environment Policy Baseline
| Environment | Default Autonomy | Approval Policy | Notes |
|---|---|---|---|
| Dev | Enabled (bounded) | Warn/Critical require approval | Fast iteration, full audit retention recommended |
| Staging | Enabled (strict) | All non-read actions require approval | Mirror production topology and provider policies |
| Production | Limited autonomy | Critical requires 2 approvers | Change windows, incident runbooks, rollback tested |
Operational Checklist (Go / No-Go)
- Identity & Access: least-privilege keys, scoped credentials, rotation policy documented.
- Guardrails: approval queue active, high-risk tooling gated, sandbox boundaries validated.
- Observability: runtime logs, governance events, and alert routing verified.
- Resilience: fallback provider strategy tested, rescue workflow practiced.
- Compliance: data handling and retention aligned with internal/legal requirements.
Recommended Command Sequence
neugi doctor --fix
neugi smoke --strict
neugi verify-release --json --no-tests
neugi start
neugi status
Compliance Artifact Mode
Generate an auditable due-diligence package (JSON + executive markdown) while enforcing a governance profile:
neugi verify-release --json --no-tests --risk-profile enterprise --force-policy --report
Artifacts are written to ~/.neugi/reports/ and include runtime fingerprint, gate results, governance stats, and active approval rules.
For partner/security review, provide: runtime fingerprint, strict docs validation report, smoke/verify-release output, governance policy snapshot, and approval matrix used in production.
Ecosystem & Partnership
Neugi is designed as a Neural Bridge — a unifying layer that connects the reliability of local core engines with the raw reasoning power of frontier SOTA models.
Ecosystem Vision 2026
- Provider-Agnostic Foundation — Cloud, local, and custom compatible endpoints within one unified runtime
- Global Reach — Native integration for OpenAI, Anthropic, Gemini, Grok, and more
- Cost Efficiency — Flexible scaling across DeepSeek, Qwen, NVIDIA NIM, and other optimized providers
- Hardware Agnostic — Runs on CPU, GPU, or Apple Silicon with automatic backend selection
Collaboration & Grants
We are actively seeking partnerships with AI hardware and software providers to expand the boundaries of autonomous swarm intelligence. If you are a model provider or research organization, we invite you to connect for grants and integration opportunities.
Contact: atharia.agi@gmail.com • @Atharia_AGI
Last updated May 24, 2026. Claims revalidated against current v2.1.3 runtime and test suite.