Copied to clipboard

Make
Postgres
Faster

Catch PostgreSQL performance regressions and govern autonomous database agents before they reach production. Deterministic EXPLAIN tree analysis, automated AI index rewrites, and zero-trust policies.

QueryPilot 3D Engine
PostgreSQL 14–17
ArmorIQ Zero-Trust
Prisma AST
Neon Serverless
Supabase
MCP Streamable HTTP (:3333)
Docker Runner
GitHub Actions Gate
Groq & Gemini LLM
PostgreSQL 14–17
ArmorIQ Zero-Trust
Prisma AST
Neon Serverless
Supabase
MCP Streamable HTTP (:3333)
Docker Runner
GitHub Actions Gate
Groq & Gemini LLM

More Scale, Less Latency

QueryPilot inspects execution plans with zero database locks. Detect slow scans, generate optimal covering indexes, and fail pull requests before production regressions occur.

qp analyze queries/report.sql
CRITICAL: Seq Scan Detected

└─ Parallel Seq Scan on orders

Filter: (created_at > '2026-01-01')

cost: 0.00..41890.50 | rows: 184,000

└─ Hash Join (users.id = orders.user_id)

CI Regression Gate · PR #42
CI GATE FAILED (Threshold 20%)
Query Base PR Diff
get_active 12.4 12.8 +3.2%
list_trans 45.1 8,420 +18,569%
user_feed 88.0 89.1 +1.2%

ArmorIQ Zero-Trust Governance

When autonomous AI agents interact with your database, ArmorIQ validates cryptographic CSRG intent tokens to approve read-only inspections while blocking destructive schema mutations.

Cryptographic Intent Verification

Autonomous agents can easily generate dangerous DDL or unrestricted table locks. QueryPilot embeds ArmorIQ at the control plane to enforce strict zero-trust boundaries.

CSRG Intent Tokens

Mints short-lived (300s TTL) cryptographic tokens required for all tool invocations.

Read-Only Tool Authorization

Enforces policy allowing explain_query and analyze_plan while denying raw writes.

Audit Logging & Replay Trail

Every decision is signed and verifiable via the ArmorIQ customer proxy.

Config: armoriq.yaml · Policy Engine Active
armoriq.yaml
version: v1
identity:
  api_key: $ARMORIQ_API_KEY
  user_id: querypilot-user
  agent_id: querypilot

environment: sandbox
proxy:
  url: https://customer-proxy.armoriq.ai
  timeout: 30

mcp_servers:
  - id: querypilot-db
    auth:
      type: bearer
      token: $QUERY_PILOT_MCP_TOKEN

# Zero-trust principle: allow inspection, block mutation
policy:
  allow:
    - querypilot-db.explain_query
  deny: []

intent:
  ttl_seconds: 300
  require_csrg: true

Model Context Protocol Server

QueryPilot operates an MCP server over Streamable HTTP on port :3333. Seamlessly connect Claude Desktop, Cursor, or autonomous agents to analyze database plans.

Tool: explain_query

Safe Plan Extraction

Accepts raw SQL queries, runs EXPLAIN (FORMAT JSON) without executing data mutations, and returns parsed AST metrics.

Tool: analyze_plan

Anti-Pattern Detection

Scans the execution tree for high-cost sequential scans, cartesian products, and missing foreign key join indexes.

Tool: suggest_indexes

Deterministic DDL

Cross-references table statistics and schema to output exact CREATE INDEX CONCURRENTLY recommendations.

claude_desktop_config.json
{
  "mcpServers": {
    "querypilot": {
      "command": "npx",
      "args": ["tsx", "src/mcp/server.ts"],
      "env": {
        "PORT": "3333",
        "DATABASE_URL": "postgresql://..."
      }
    }
  }
}

Live Execution Lab

Test real SQL queries against our plan evaluator. Switch presets or write custom SQL to see live cost calculation and AI index generation.

Presets:
SQL Query Input
CRITICAL: Seq Scan Cost: 41,890.50

Execution Plan Tree:

└─ Parallel Seq Scan on orders

Filter: (status = 'unfulfilled' AND created_at >= '2026-01-01')

cost: 0.00..41890.50 | rows: 184,000

└─ Hash Join (users.id = orders.user_id)

Diagnostic: Full table scan over 1.4M rows. Click "⚡ AI Optimize" above to generate the composite index migration.

Install in Seconds

$ npx tsx src/index.ts analyze queries/report.sql
Analyzing PostgreSQL execution plan...
✔ EXPLAIN (FORMAT JSON) complete [14ms]

⚡ Execution Plan Tree:
└─ Index Scan using users_pkey on users (cost=0.42..8.44 rows=1)
   Index Cond: (id = 42)

✔ No sequential scans or unindexed sorts detected. Safe to ship!