OctoArch is not a simple transactional bot. It is an advanced Cognitive Runtime and Autonomous Agent designed to execute complex workflows, manage servers (via MCP), process documents via Omnichannel Gateways (WhatsApp/Telegram), and autonomously monitor corporate environments.
With the v5.0 Omnichannel Architecture, the system has reached a new paradigm: AIEOS (AI Entity Object Specification), Swarm Intelligence, Provider-Agnostic Orchestration, and a B2B-Ready White-Labeling structure. OctoArch can dynamically inject its own TypeScript code into its neural network at runtime, morph its personality based on mathematical DNA files, and defend its corporate identity under a strict "Titanium Cage" security model.
✨ Core Capabilities 🏢 B2B White-Labeling (The Corporate Soul) OctoArch is designed for immediate SaaS deployment. Through environment variables (BOT_NAME, COMPANY_NAME), the system injects a permanent "Layer 1 Soul" into the LLM. The agent guarantees absolute brand loyalty, natively presenting itself as your company's official AI and strictly refusing to reveal its underlying architecture, OpenAI, or Google origins.
🧠 Provider-Agnostic Cognitive Core OctoArch is no longer tied to a single AI. Through the ProviderManager Factory Pattern, the system can swap its brain globally via a single .env variable (AI_PROVIDER). Supported elite models include:
Google Gemini (Default Multimodal)
OpenAI (GPT-4o)
Anthropic (Claude 3.5 Sonnet)
DeepSeek (V3 / Reasoner)
xAI (Grok 2)
Alibaba Cloud (Qwen 2.5 Max)
🧬 AIEOS Digital DNA & Cognitive Sandwich The system abandons static, text-based prompts for a multi-layered Cognitive Sandwich (Soul + DNA + Skills + Working Context). Personas are defined via strict JSON contracts in the Identity Vault (logic_weight, creativity_weight, risk_tolerance). The Core reads this DNA and physically alters the LLM's Temperature and forbidden vocabulary in real-time, switching from a creative Growth Hacker (Temp: 0.85) to a robotic OCR processor (Temp: 0.00) in milliseconds.
🗣️ Natural Language Gateway Commands are no longer robotic. The Omnichannel Gateway features a Natural Language Processing (NLP) filter that cleanses filler words. Users can type octo entra en modo dev, octo ponte en cfo, or octo dev and the router will seamlessly extract the core intent and map it to the correct AIEOS DNA.
🛡️ Zero-Trust Architecture & Anti-History Poisoning "God Mode" is dead. The Titanium Cage implements strict Policy-Based Access Control (PBAC) per role. Furthermore, OctoArch features a Kernel Override mechanism that purges conflicting past personas from its short-term memory (History Poisoning defense), ensuring immediate and absolute obedience when a new role is forced by the Architect.
🤖 Swarm Intelligence & Autonomous Forging Spawns Sub-Agents (Workers) in isolated sandboxes (src/temp_tools), consumes secrets via WORKER_SECRETS, runs tsc for validation, and promotes code to src/dynamic_tools via Hot-Swap without restarting the server.
🎧 Self-Healing Auditory Cortex & Link Purifier Audio: Native WhatsApp and Telegram audio transcription with an indestructible fallback mechanism to guarantee continuous operation.
Links: When analyzing URLs, OctoArch strips DOM trash (ads, navbars, scripts) and feeds pure, semantic Markdown to the LLM, reducing token usage by up to 90% and preventing hallucinations.
🚀 Getting Started Prerequisites Node.js (v18+ recommended)
PostgreSQL (Supabase) for session memory
API Keys for your preferred AI Providers
Installation Clone the repository:
git clone https://github.com/OctoArch-Labs/octoarch.git cd octoarch
Install dependencies:
npm install
Environment Setup: Copy the example environment file and configure your keys and White-Label identity.
cp .env.example .env
Example .env configuration:
BOT_NAME="OctoArch" COMPANY_NAME="OctoArch Labs" AI_PROVIDER="gemini" GEMINI_API_KEY="your_api_key_here" SUPABASE_URL="your_supabase_url" SUPABASE_KEY="your_supabase_key"
Start the Main Server:
npm run start
- WhatsApp: Scan the QR code presented in the terminal.
- Telegram: Connects instantly via Polling (Requires
TELEGRAM_BOT_TOKEN). - Gmail: OAuth2 persistent token managed in
workspace/token.json.
Interact with OctoArch using the following prefixes to trigger specific AIEOS DNA profiles.
| Command | Persona | Description |
|---|---|---|
!ping |
System | Returns server, vision, and sandbox status. |
octo sw [task] |
Coder | LLM Worker Swarm Mode. High Autonomy, 5 Iterations to forge new tools. |
octo chat [task] |
Concierge | (Default) Safe Mode. Friendly, high creativity, restricted tools. |
octo dev [task] |
Software Engineer | Architecture & coding mode. Admin access, strict TypeScript. |
octo cfo [task] |
Chief Financial Officer | Mathematical analyst. Zero risk tolerance, strict PBAC. |
octo cmo [task] |
Chief Marketing Officer | Growth Hacker. ROI-focused, persuasive copywriter. |
octo research [task] |
OSINT Investigator | Zero hallucinations. Strict fact-checking, neutral academic tone. |
octo invodex [task] |
Fiscal Extractor | Robotic OCR engine. 0.0 Temp, strict JSON output into ERPs. |
octoarch/ ├── src/ │ ├── channels/ # 📱 Gateway Ingress (WhatsApp, Telegram) │ ├── config/ # ⚙️ Zod schemas, env validation, White-Label injection │ ├── core/ │ │ ├── llm.ts # 🧠 Cognitive Director & Kernel Override │ │ ├── prompt_manager.ts # 🧬 Cognitive Sandwich Assembler │ │ ├── tool_orchestrator.ts # 🛠️ Execution delegator (RBAC Filter) │ │ └── session_manager.ts # 🐘 Cloud memory synchronization │ ├── gateway/ # 🌉 Universal Message Envelope Router (NLP Filter) │ ├── identity/ # 🧬 AIEOS Digital DNA Vault (JSON Personas & I/O Cache) │ ├── link-understanding/# 🧹 Web Scraper & DOM Purifier │ ├── media/ # 🎧 Auditory Cortex & Transcriber │ ├── providers/ # 🌐 AI Factory (Gemini, OpenAI, DeepSeek, etc.) │ ├── swarm/ # 🤖 Sub-Agent Auto-Programming System │ ├── dynamic_tools/ # 🚀 Auto-generated tools (Production) │ └── tools/ # 💻 Base Tools (Shell, File System) └── index.ts # 🚀 Main Entry Point
OctoArch - Forging the future of autonomous systems, one iteration at a time.
⚖️ License This project is licensed under the Apache License 2.0. See the LICENSE file for details.
