convez.ai
AgenteAutomaçãoAvançado
ttracx

OilGas Nanobot Swarm

ttracx/oilgas-nanobot-swarm

Multi-agent IA para engenharia upstream, midstream e downstream

Ver no GitHub
InicialPluginScore · de 0 a 100

Sistema multi-agente hierárquico de IA para engenharia de petróleo e gás. Executa análises especializadas em perfuração, reservatórios, produção, dutos, petrofísica, controle de poço, segurança e economia. Funciona via API REST com Ollama Cloud e NVIDIA NIM, sem GPU local.

Instalação

$npx convez-ai ttracx/oilgas-nanobot-swarm

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 4 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Cálculos de perfuração e design de coluna
  • Avaliação de reservatórios e curvas IPR/Vogel
  • Análise de queda de pressão em dutos
  • Modelagem petrofísica (porosidade, saturação)
  • Controle de poço e kill sheets
  • Análise econômica de projetos e AFE

Veredito

Sistema robusto e especializado para engenharia de óleo e gás com arquitetura de agentes bem estruturada. Pronto para produção, mas requer expertise técnica da indústria para máximo aproveitamento.

README

A tradução para o português deste README ainda está na fila.

OilGas Nanobot Swarm

Hierarchical AI Agent Swarm for Oil & Gas Engineering

Python 3.11+ FastAPI Ollama Cloud NVIDIA NIM Redis License: MIT Deploy with Vercel Open in GitHub Codespaces

Autonomous multi-agent engineering intelligence for upstream, midstream, and downstream operations

Live Demo · Quick Start · Architecture · Agent Teams · Tools · Deploy · API · Docs


Overview

OilGas Nanobot Swarm is an open-source, production-ready hierarchical multi-agent AI system purpose-built for oil and gas engineering. It runs on Vercel using Ollama Cloud and NVIDIA NIM as AI backends — no GPU required, no local model downloads.

Live Deployment

URLStatus
oilgas-nanobot-swarm.vibecaas.appDashboard
oilgas-nanobot-swarm.vibecaas.app/healthHealth check
oilgas-nanobot-swarm.vibecaas.app/docsSwagger UI

What It Does

DomainCapabilities
DrillingECD, kick tolerance, MAASP, well control kill sheets, casing design
ReservoirIPR/Vogel curves, Darcy flow, formation evaluation, water saturation (Archie)
ProductionProductivity index, decline curves, artificial lift selection
PipelinePressure drop (Darcy-Weisbach), flow regime, line sizing
PetrophysicsSonic porosity (Wyllie), shale volume (GR), Archie Sw, net pay
Well ControlKill mud weight, MAASP, driller's method kill schedule
HSE & RegulatoryAPI standards, BSEE/BOEM, OSHA PSM (14 elements), EPA emissions
EconomicsAFE preparation, NPV/IRR, break-even price, EUR sensitivity

Architecture

                    ┌─────────────────────────────────┐
                    │      FastAPI Gateway :8100       │
                    │  OpenAI-Compatible REST API      │
                    └──────────────┬──────────────────┘
                                   │
                    ┌──────────────▼──────────────────┐
                    │     Queen Orchestrator (L0)      │
                    │  Decomposes goals into L1 tasks  │
                    └──┬──────┬──────┬──────┬─────────┘
                       │      │      │      │
           ┌───────────▼┐ ┌───▼──┐ ┌▼────┐ ┌▼──────────┐
           │   Coder    │ │Rsrch │ │Anlst│ │ Executor  │  (L1)
           └──────┬─────┘ └──┬───┘ └──┬──┘ └─────┬─────┘
                  │          │         │           │
          ┌───────▼──────────▼─────────▼───────────▼──────┐
          │            L2 Sub-Agents (15 roles)            │
          └─────────────────────┬──────────────────────────┘
                                │
          ┌─────────────────────▼──────────────────────────┐
          │              Engineering Tool Layer             │
          │  reservoir_pressure_calc · drilling_eng_calc   │
          │  production_eng_calc     · pipeline_hydraulics │
          │  well_control_calc       · formation_eval_calc  │
          │  oilgas_regulatory_ref   · web_search          │
          └────────────────────────────────────────────────┘
                                │
          ┌─────────────────────▼──────────────────────────┐
          │               AI Backend Layer                  │
          │  Primary:  Ollama Cloud (ministral-3:8b)        │
          │  Fallback: NVIDIA NIM (llama-3.3-70b-instruct)  │
          └────────────────────────────────────────────────┘

Tier Structure

TierRoleCountResponsibility
L0Queen Orchestrator1Strategic decomposition and synthesis
L1Domain Leads6Coder, Researcher, Analyst, Validator, Executor, Architect
L2Sub-Agents15Narrow specialists (planner, writer, tester, searcher, etc.)

Technology Stack

ComponentTechnology
API FrameworkFastAPI 0.115
Primary AIOllama Cloud (ministral-3:8b, ~3-5s)
Fallback AINVIDIA NIM (meta/llama-3.3-70b-instruct)
State StoreRedis 7.4 (full-stack deployments)
SerializationPydantic v2
HTTP Clienthttpx 0.28

Quick Start

Option 1 — Vercel (Zero Setup, Live Now)

The app is already deployed. Grab the API key and start querying:

# Health check
curl https://oilgas-nanobot-swarm.vibecaas.app/health

# Engineering query (requires x-api-key header)
curl -X POST https://oilgas-nanobot-swarm.vibecaas.app/swarm/run \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_GATEWAY_KEY" \
  -d '{"goal": "Calculate ECD at 10,000 ft TVD with 10.5 ppg mud and 320 psi APL"}'

Option 2 — GitHub Codespaces

Open in GitHub Codespaces

# Inside Codespace — set env vars and start
export OLLAMA_API_KEY=your-ollama-key
export GATEWAY_API_KEY=your-gateway-key
python -m uvicorn nanobot.api.gateway:app --reload --port 8100

Option 3 — Local Docker Compose

git clone https://github.com/ttracx/oilgas-nanobot-swarm.git
cd oilgas-nanobot-swarm

# Configure
cp .env.example .env
# Edit .env — add OLLAMA_API_KEY and GATEWAY_API_KEY

# Start (includes Redis)
docker compose up -d

Option 4 — Local Python

git clone https://github.com/ttracx/oilgas-nanobot-swarm.git
cd oilgas-nanobot-swarm
pip install -e ".[dev]"
cp .env.example .env   # configure OLLAMA_API_KEY
docker run -d -p 6379:6379 redis:7.4-alpine
python -m uvicorn nanobot.api.gateway:app --reload --port 8100

Configuration

# .env — copy from .env.example

# ── Primary AI Backend ─────────────────────────────────────────────────────────
# Ollama Cloud (recommended — fast, cost-effective)
OLLAMA_API_KEY=your-ollama-key
# Models available: ministral-3:8b, glm-5, kimi-k2:1t, qwen3-coder:480b, etc.

# ── Fallback AI Backend ────────────────────────────────────────────────────────
# NVIDIA NIM (high quality, robust fallback)
NVIDIA_API_KEY=nvapi-your-key
# Models: meta/llama-3.3-70b-instruct, moonshotai/kimi-k2-instruct-0905

# ── Optional: Anthropic Claude ────────────────────────────────────────────────
ANTHROPIC_API_KEY=sk-ant-your-key
ANTHROPIC_MODEL=claude-sonnet-4-20250514

# ── Gateway ────────────────────────────────────────────────────────────────────
GATEWAY_API_KEY=your-secure-api-key

# ── Redis State Store ──────────────────────────────────────────────────────────
REDIS_HOST=127.0.0.1
REDIS_PORT=6379

# ── Oil & Gas Features ─────────────────────────────────────────────────────────
ENABLE_OILGAS_TEAMS=true

Oil & Gas Agent Teams

TeamModeUse Case
well-engineering-reviewHierarchicalCasing design, ECD, kick tolerance, regulatory
reservoir-analysisHierarchicalIPR curves, Sw, formation eval, reserve estimate
drilling-ops-dailyFlatDaily report, NPT tracking, cost per foot
production-optimizationHierarchicalAI lift, decline curves, waterflood analysis
pipeline-integrityHierarchicalCorrosion, ILI review, MAOP verification
hse-compliance-auditHierarchicalPSM 14-element audit, HAZOP, well integrity
well-economicsHierarchicalAFE, NPV/IRR, break-even, EUR sensitivity
oilgas-field-briefingFlatDaily ops briefing, production summary, safety
completions-designHierarchicalFrac design, stage spacing, proppant selection

Example: Well Engineering Review

curl -X POST https://oilgas-nanobot-swarm.vibecaas.app/swarm/run \
  -H "x-api-key: $GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Review well X-1: TD 12,500 ft TVD, MW=10.5 ppg, shoe at 8,200 ft with FG=14.2 ppg. Check ECD, kick tolerance, and MAASP.",
    "team": "well-engineering-review",
    "mode": "hierarchical"
  }'

Example: Daily Field Briefing

curl -X POST https://oilgas-nanobot-swarm.vibecaas.app/swarm/run \
  -H "x-api-key: $GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Generate daily field briefing. Production: 8,200 BOPD, 14.5 MMSCFD gas, 22,000 BWPD. 2 wells shut-in for ESP replacement.",
    "team": "oilgas-field-briefing"
  }'

Engineering Tools

ToolCalculates
reservoir_pressure_calcHydrostatic gradient, BHP, pore pressure, fracture gradient
drilling_engineering_calcECD, kick tolerance, mud weight window, surge/swab
production_engineering_calcPI, Vogel IPR, Darcy flow, artificial lift selection
pipeline_hydraulics_calcPressure drop (D-W), flow regime, line sizing
well_control_calcMAASP, kill mud weight, driller's method
formation_evaluation_calcArchie Sw, Wyllie sonic porosity, GR shale volume
oilgas_regulatory_referenceAPI standards, BSEE, OSHA PSM, EPA emissions

API Reference

MethodPathAuthDescription
GET/health—System health check
GET/—Web dashboard
GET/docs—Interactive Swagger UI
POST/swarm/runAPI keyDispatch an engineering task
POST/v1/chat/completions—OpenAI-compatible chat
GET/v1/models—List available models
GET/swarm/health—Swarm status
GET/swarm/topology—Agent hierarchy

/swarm/run Request

{
  "goal": "Your engineering question or task",
  "mode": "hierarchical",
  "team": "optional-team-name",
  "metadata": {}
}

/swarm/run Response

{
  "success": true,
  "session_id": "vercel-1234567890",
  "goal": "...",
  "final_answer": "Full engineering analysis with calculations...",
  "subtask_count": 1,
  "duration_seconds": 7.6,
  "mode": "vercel-serverless",
  "model": "ministral-3:8b"
}

Deployment

Deploy to Vercel

Deploy with Vercel

npm i -g vercel
vercel login
vercel --prod

Required environment variables in Vercel dashboard:

VariableDescription
OLLAMA_API_KEYOllama Cloud API key (primary AI)
NVIDIA_API_KEYNVIDIA NIM API key (fallback AI)
GATEWAY_API_KEYAuth key for /swarm/run

Deploy to Render

Deploy to Render

The render.yaml provisions: web service + managed Redis + 5 GB disk.


Deploy to Railway

Deploy on Railway

npm i -g @railway/cli && railway login && railway up

Open in GitHub Codespaces

Open in Codespaces


Scheduled Workflows

Configure recurring agent team runs in workspace/schedules.json:

[
  {
    "name": "daily-field-briefing",
    "team": "oilgas-field-briefing",
    "goal": "Generate the 7am daily field operations briefing.",
    "schedule": "07:00",
    "enabled": true
  },
  {
    "name": "weekly-production-review",
    "team": "production-optimization",
    "goal": "Analyze production performance for all wells over the past 7 days.",
    "schedule": "monday 08:00",
    "enabled": true
  }
]

Start the scheduler: python -m nanobot.scheduler.scheduler


Project Structure

oilgas-nanobot-swarm/
├── api/
│   ├── index.py            # Vercel serverless entry (Ollama + NVIDIA NIM)
│   └── requirements.txt    # Slim deps for Vercel function
├── nanobot/
│   ├── core/               # Agent hierarchy (Queen L0, L1 leads, L2 sub-agents)
│   ├── tools/
│   │   ├── oilgas_tools.py     ← 7 engineering calculators
│   │   ├── web_search.py
│   │   └── code_runner.py
│   ├── teams/
│   │   └── oilgas_teams.py     ← 9 pre-configured O&G agent teams
│   ├── scheduler/          # Background job scheduler
│   ├── knowledge/          # Markdown vault (Obsidian-compatible)
│   ├── state/              # Redis persistence
│   ├── integrations/       # External services (MS Graph, OpenClaw)
│   ├── api/                # FastAPI gateway (full-stack mode)
│   └── static/
│       └── index.html      # NeuralQuantum-branded web dashboard
├── docs/                   # Comprehensive documentation
│   ├── ARCHITECTURE.md
│   ├── API.md
│   ├── AGENTS.md
│   ├── DEPLOYMENT.md
│   ├── ENGINEERING_TOOLS.md
│   ├── AGENT_TEAMS.md
│   └── DEVELOPMENT.md
├── scripts/                # Setup and launch scripts
├── .devcontainer/          # GitHub Codespaces config
├── docker-compose.yml      # Local dev stack (gateway + Redis)
├── Dockerfile              # Production container
├── render.yaml             # Render deployment
├── railway.toml            # Railway deployment
├── vercel.json             # Vercel deployment
└── pyproject.toml

Safety Disclaimer

⚠️ ENGINEERING DISCLAIMER: This system is a decision-support tool for qualified petroleum engineers. All calculations, regulatory references, and recommendations must be verified by licensed engineers before use in operational decisions.


Pro Edition

⭐ Pro Edition Coming Soon — Full hierarchical swarm, Redis memory, knowledge vault, background scheduler, MS 365 integration, and priority support.

Contact: info@neuralquantum.ai


Contributing

git checkout -b feature/my-tool
# implement, add tests
pytest tests/ -v
git push && open PR

License

MIT License — see LICENSE.


Powered by VibeCaaS.com · a division of NeuralQuantum.ai LLC

© 2026 OilGas Nanobot Swarm powered by VibeCaaS.com a division of NeuralQuantum.ai LLC. All rights reserved.

Ver o original no GitHub

Bom para

Relacionados