MetaOps is an enterprise-grade autonomous AI agent framework built on the Google Agent Development Kit (ADK) 2.3.0. Running on both Telegram and CLI, it acts as a fully self-directed software engineer, featuring persistent memory, multi-provider LLM failovers, secure shell execution, automated coding loops, deep research pipelines, and an interactive real-time monitoring cockpit.
- Single-Model Default: The entire agent hierarchy (6 distinct roles) runs on a single primary model configuration (OpenRouter, Gemini, OpenAI, etc.). This simplifies setup and avoids complex multi-provider boilerplate.
- Dynamic Model Overrides: Swap or override the provider and model of any individual agent at runtime via the
set_modeltool (e.g., GPT-4o for code generation, and DeepSeek for research). - Sequential Fallbacks: Define alternative model configurations (
METAOPS_FALLBACK_1_*, etc.) to automatically recover from rate limits, timeouts (METAOPS_LLM_TIMEOUT), or provider outages. - Autonomous Model Discovery: Autonomously searches, checks, and validates alternative free models from OpenRouter, Kilo AI, and Groq when primary providers fail.
- RBAC Shell Guard: Full Role-Based Access Control (
admin,user,guest). Non-admin users are strictly gated by command allowlists and blocked from destructive operators (;,|,&,$, backticks) and sub-invocation shells (bash -c,python -c). - Concurrent Cache Isolation: Unique cache partitioning keying on
session_idto prevent memory cross-pollution during concurrent executions. - Credential Propagation: Safely forwards active parent credentials to spawned sub-agents, maintaining authorization flow across nested tasks.
- Timeout & Resumability: Long-running planning tasks are bounded by customizable execution timeouts. If interrupted, the agent parses the SQLite task state to resume work right from the last pending step.
- Unified SQLite Store: A single, thread-safe WAL database (
.data/metaops.db) storing sessions, learned skills, execution logs, loop contexts, and crash recovery checkpoints. - ChromaDB Semantic Memory: Episodic memory (conversational history), semantic memory (source code and RAG files), and procedural memory (learned skills).
- Hybrid Retrieval: Integrates semantic vector search and BM25 Okapi keyword search combined via Reciprocal Rank Fusion (RRF) for high-precision context retrieval.
- RAG Parsers: Ingests files (PDFs, Word docs, codebases) using contextual chunking.
MetaOps structures its execution around a Coordinator agent that plans and delegates tasks to specialized sub-agents:
┌─────────────────────────────────┐
│ User Gateway │
│ (CLI / Telegram / Cron Job) │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ ADK Runner Loop │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ Coordinator Root Agent │ (Gemini / Anthropic / GPT)
└──────┬──────────────────┬───────┘
│ │
┌───────────────┴──────────────┐ └───────────────┬────────────────┐
│ Interactive Sub-Agents │ │ Workflow Loops│
│ (Direct Tool Invocation) │ │ (SQLite Bus) │
└───────┬──────────────┬───────┘ └───────┬────────┘
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Thinker │ │Researcher │ │ Vibe Code │ (Coder/Reviewer)
└───────────┘ └───────────┘ └───────────┘
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Auditor │ │Creative │ │Deep Resch │ (Search/Refine)
└───────────┘ └───────────┘ └───────────┘
Instead of passing raw messages between agents (which consumes context tokens), sub-agents write structured results back to SQLite tables (loop_context, subagent_logs). The coordinator queries these tables at zero token cost to monitor progress.
Complex sub-tasks are spawned as fire-and-forget background jobs. The main session returns a confirmation immediately, allowing the coordinator to remain responsive to the user while background agents run their loops and update the database.
A real-time terminal dashboard designed with Rich rendering, enabling instant queries over the local SQLite database.
metaops-monitor loops: Visualize all running, completed, or failed autonomous loops.metaops-monitor stats: Summary of total LLM calls, costs, prompt/completion tokens, and latency.metaops-monitor logs <plan_id>: Trace execution logs, steps, and subagent session IDs.
┌──────────────────────────────────────────────────────────────────┐
│ 📊 METRICS & STATISTICS SUMMARY │
│ │
│ 🤖 LLM Calls: │
│ • Total Calls: 274 │
│ • Total Tokens: 6395751 (Prompt: 6025327 | Completion: 370424) │
│ • Cumulative Latency: 3423.96s │
│ • Estimated Cost: $1.1261 │
│ │
│ 🔄 Autonomous Loops: │
│ • Total Loops Created: 26 │
│ • Completed/Approved Loops: 4 / 26 │
│ │
│ 👥 Subagent Linkages: │
│ • Total Spawned Subagent Executions: 65 │
└──────────────────────────────────────────────────────────────────┘
- Telegram Bot (
metaops gateway): Group policy support, typing indicators, and emoji reactions. - CLI Chat (
metaops): Interactive terminal session with prompt streaming and RAG file ingestion. - Cron Scheduler: Automatic execution of scheduled tasks (e.g. nightly security and code quality audits).
Install MetaOps and its dependencies (including virtual environment setup, local database initialization, and audit utilities):
# Clone the repository
git clone https://github.com/Metrium987/MetaOps.git
cd MetaOps
# Run the installer
python install.pyCopy .env.example to .env and set your API keys:
cp .env.example .env# Primary LLM Configuration
METAOPS_PROVIDER=openrouter
METAOPS_MODEL=deepseek/deepseek-chat
METAOPS_API_KEY=sk-or-...
METAOPS_BASE_URL=https://openrouter.ai/api/v1
# Integrations
TAVILY_API_KEY=tvly-...
TELEGRAM_BOT_TOKEN=...# Launch the interactive CLI
metaops
# Run the Telegram bot
metaops gateway
# Run a one-shot CLI command
metaops run "Auditer la sécurité de ce dépôt"MetaOps maintains 100% test coverage for its custom modules using Ruff, MyPy, and Pytest.
# Run code linting
uv run ruff check .
# Check formatting
uv run ruff format . --check
# Execute the 442 test cases
uv run pytest tests/This project is licensed under the MIT License - see the LICENSE file for details.