Crawler Summary

text-to-sql-GenAI answer-first brief

Natural language to SQL web app using Mistral-7B LoRA, CrewAI agents, and BigQuery for interactive analytics. Natural Language to SQL Query System This project is a full-stack application that translates natural language queries into SQL, executes them against a Google BigQuery database, and returns the results in a user-friendly format. The system leverages a fine-tuned Mistral-7B model for SQL generation and CrewAI for advanced query handling. Features - **Natural Language Understanding**: Convert plain English questions i Capability contract not published. No trust telemetry is available yet. Last updated 4/16/2026.

Freshness

Last checked 4/16/2026

Best For

text-to-sql-GenAI is best for crewai, multi-agent workflows where OpenClaw compatibility matters.

Not Ideal For

Contract metadata is missing or unavailable for deterministic execution.

Evidence Sources Checked

editorial-content, GITHUB OPENCLEW, runtime-metrics, public facts pack

Claim this agent
Agent DossierGitHubSafety: 66/100

text-to-sql-GenAI

Natural language to SQL web app using Mistral-7B LoRA, CrewAI agents, and BigQuery for interactive analytics. Natural Language to SQL Query System This project is a full-stack application that translates natural language queries into SQL, executes them against a Google BigQuery database, and returns the results in a user-friendly format. The system leverages a fine-tuned Mistral-7B model for SQL generation and CrewAI for advanced query handling. Features - **Natural Language Understanding**: Convert plain English questions i

OpenClawself-declared

Public facts

4

Change events

1

Artifacts

0

Freshness

Apr 16, 2026

Verifiededitorial-contentNo verified compatibility signals

Capability contract not published. No trust telemetry is available yet. Last updated 4/16/2026.

Trust evidence available

Trust score

Unknown

Compatibility

OpenClaw

Freshness

Apr 16, 2026

Vendor

Pallavmahajan

Artifacts

0

Benchmarks

0

Last release

Unpublished

Executive Summary

Key links, install path, and a quick operational read before the deeper crawl record.

Verifiededitorial-content

Summary

Capability contract not published. No trust telemetry is available yet. Last updated 4/16/2026.

Setup snapshot

git clone https://github.com/pallavmahajan/text-to-sql-GenAI.git
  1. 1

    Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.

  2. 2

    Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Evidence Ledger

Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.

Verifiededitorial-content
Vendor (1)

Vendor

Pallavmahajan

profilemedium
Observed Apr 16, 2026Source linkProvenance
Compatibility (1)

Protocol compatibility

OpenClaw

contractmedium
Observed Apr 16, 2026Source linkProvenance
Security (1)

Handshake status

UNKNOWN

trustmedium
Observed unknownSource linkProvenance
Integration (1)

Crawlable docs

6 indexed pages on the official domain

search_documentmedium
Observed Apr 15, 2026Source linkProvenance

Release & Crawl Timeline

Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.

Self-declaredagent-index

Artifacts Archive

Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.

Self-declaredGITHUB OPENCLEW

Extracted files

0

Examples

6

Snippets

0

Languages

python

Executable Examples

bash

git clone https://github.com/yourusername/text-to-sql-app.git
   cd text-to-sql-app

bash

python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   pip install -r requirements.txt

text

# Application
   DEBUG=True
   HOST=0.0.0.0
   PORT=8080

   # Model
   MODEL_PATH=/path/to/your/mistral7b_sql_model
   USE_CUDA=True
   USE_BF16=True

   # BigQuery
   GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
   PROJECT_ID=your-gcp-project-id
   DEFAULT_DATASET=your_default_dataset

   # CrewAI
   CREW_VERBOSE=True
   CREW_PROCESS=sequential

bash

python app.py

json

{
    "query": "What are the top 5 customers by total purchase amount?",
    "dataset_id": "sales_data",
    "table_id": "orders"
}

json

{
    "original_query": "What are the top 5 customers by total purchase amount?",
    "generated_sql": "SELECT customer_id, SUM(amount) AS total_amount FROM orders GROUP BY customer_id ORDER BY total_amount DESC LIMIT 5",
    "optimized_sql": "SELECT customer_id, SUM(amount) AS total_amount FROM orders GROUP BY customer_id ORDER BY total_amount DESC LIMIT 5",
    "results": [
        {"customer_id": "C1001", "total_amount": 15000.00},
        {"customer_id": "C1002", "total_amount": 12500.50},
        ...
    ],
    "schema_analysis": "...",
    "ambiguity_check": "..."
}

Docs & README

Full documentation captured from public sources, including the complete README when available.

Self-declaredGITHUB OPENCLEW

Docs source

GITHUB OPENCLEW

Editorial quality

ready

Natural language to SQL web app using Mistral-7B LoRA, CrewAI agents, and BigQuery for interactive analytics. Natural Language to SQL Query System This project is a full-stack application that translates natural language queries into SQL, executes them against a Google BigQuery database, and returns the results in a user-friendly format. The system leverages a fine-tuned Mistral-7B model for SQL generation and CrewAI for advanced query handling. Features - **Natural Language Understanding**: Convert plain English questions i

Full README

Natural Language to SQL Query System

This project is a full-stack application that translates natural language queries into SQL, executes them against a Google BigQuery database, and returns the results in a user-friendly format. The system leverages a fine-tuned Mistral-7B model for SQL generation and CrewAI for advanced query handling.

Features

  • Natural Language Understanding: Convert plain English questions into SQL queries
  • Schema-Aware Query Generation: System understands your database schema for accurate query generation
  • Query Optimization: Automatically enhance generated SQL for better performance
  • Ambiguity Resolution: Identify and clarify ambiguities in user queries
  • Interactive UI: User-friendly interface for querying your data
  • Real-time Execution: Execute SQL directly against BigQuery and view results instantly

System Architecture

The system consists of the following components:

  1. Web Frontend: User interface for entering queries and viewing results
  2. Backend API: Flask-based API that handles requests and coordinates components
  3. Fine-tuned Mistral-7B Model: Specialized for SQL generation from natural language
  4. CrewAI Agents: Advanced AI agents for query enhancement and optimization
  5. BigQuery Connector: Interface to execute SQL queries against Google BigQuery

Prerequisites

  • Python 3.8+
  • Google Cloud Platform account with BigQuery enabled
  • Google Cloud service account credentials with BigQuery access
  • CUDA-capable GPU (recommended for faster inference)

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/text-to-sql-app.git
    cd text-to-sql-app
    
  2. Create a virtual environment and install dependencies:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
    
  3. Set up environment variables:

    • Create a .env file in the project root directory:
    # Application
    DEBUG=True
    HOST=0.0.0.0
    PORT=8080
    
    # Model
    MODEL_PATH=/path/to/your/mistral7b_sql_model
    USE_CUDA=True
    USE_BF16=True
    
    # BigQuery
    GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
    PROJECT_ID=your-gcp-project-id
    DEFAULT_DATASET=your_default_dataset
    
    # CrewAI
    CREW_VERBOSE=True
    CREW_PROCESS=sequential
    

Usage

  1. Start the application:

    python app.py
    
  2. Open your browser and navigate to http://localhost:8080

  3. Enter your BigQuery dataset and table information

  4. Type a natural language query, such as:

    • "What are the top 5 customers by total purchase amount?"
    • "Show me the average order value by month for 2024"
    • "Find all products with low inventory and high demand"
  5. View the generated SQL, optimized SQL, and query results

Using the API

The system provides a RESTful API that can be integrated with other applications:

Process a Query

Endpoint: POST /api/query

Request Body:

{
    "query": "What are the top 5 customers by total purchase amount?",
    "dataset_id": "sales_data",
    "table_id": "orders"
}

Response:

{
    "original_query": "What are the top 5 customers by total purchase amount?",
    "generated_sql": "SELECT customer_id, SUM(amount) AS total_amount FROM orders GROUP BY customer_id ORDER BY total_amount DESC LIMIT 5",
    "optimized_sql": "SELECT customer_id, SUM(amount) AS total_amount FROM orders GROUP BY customer_id ORDER BY total_amount DESC LIMIT 5",
    "results": [
        {"customer_id": "C1001", "total_amount": 15000.00},
        {"customer_id": "C1002", "total_amount": 12500.50},
        ...
    ],
    "schema_analysis": "...",
    "ambiguity_check": "..."
}

Get Table Schema

Endpoint: GET /api/schema

Query Parameters:

  • dataset_id: BigQuery dataset ID
  • table_id: BigQuery table ID

Response:

{
    "schema": "CREATE TABLE orders (order_id STRING, customer_id STRING, amount FLOAT, order_date TIMESTAMP)"
}

Fine-tuned Model Details

This system uses a Mistral-7B model fine-tuned specifically for SQL generation using the LoRA (Low-Rank Adaptation) approach. The model was trained on the sql-create-context dataset.

Performance metrics achieved:

  • Exact Match Accuracy: 0.78
  • SQL Component Accuracies:
    • Table: 0.92
    • Select: 0.86
    • Where: 0.81

CrewAI Implementation

The system uses CrewAI to implement specialized agents:

  1. Schema Reasoner: Analyzes database schemas to identify relevant tables and fields
  2. SQL Optimizer: Improves generated SQL queries for better performance
  3. Ambiguity Resolver: Identifies and clarifies ambiguous natural language queries

These agents work together to enhance the quality and reliability of SQL query generation.

Role-focused summary

GenAI / ML

  • Fine-tuned Mistral-7B using LoRA for parameter-efficient training.
  • Training data: sql-create-context (natural language + CREATE TABLE + SQL triplets).
  • Model metrics (example run):
    • Exact Match Accuracy: 0.78
    • SQL component accuracies:
      • Table: 0.92
      • SELECT: 0.86
      • WHERE: 0.81

Data / Business

  • Designed around typical analytics questions:
    • Revenue and growth (“Show monthly revenue by region for 2024”).
    • Customer behaviour (“Top 10 customers by lifetime value”).
    • Operations (“Orders delayed more than 3 days by warehouse”).
  • SQL is visible in the UI so analysts can validate, copy, or refine queries.
  • Results can be exported and used in BI tools or Excel.

Product / Business

  • Clear problem: reduce dependency on data teams for ad-hoc questions.
  • Product decisions reflected in the design:
    • Simple textbox and example prompts for non-technical users.
    • Transparent SQL panel to build trust.
    • Guardrails around BigQuery usage (limits, timeouts).
  • Architecture is deployable via Docker / docker-compose.

Project structure

This is the structure of the application:

text-to-sql-app/
├── app.py                    # Main Flask application
├── bigquery_connector.py     # BigQuery interface and execution logic
├── crewai_agents.py          # CrewAI agents for schema, optimization, ambiguity
├── config.py                 # Configuration settings and environment handling
├── deployment.sh             # Helper script for deployment (optional)
├── docker-compose.yml        # Local container orchestration
├── Dockerfile_               # Docker image definition (can be renamed to Dockerfile)
├── requirements.txt          # Python dependencies
├── README.md                 # Project documentation (this file)
├── result/
│   └── 50/                   # Evaluation CSVs, plots, and JSON examples
├── templates/
│   └── index.html            # Web UI template
├── tests/
│   └── test_nl_to_sql.py     # Unit tests for NL2SQL behaviour
├── notebooks/                # (Optional) Fine-tuning and analysis notebooks
│   ├── mistral_7b_sql_fine_tune_lora-3.ipynb
│   ├── Model_Hosting_code.ipynb
│   └── orginal_fintune_comparision.ipynb
└── reports/
    └── GENAI_Final_Report.pdf

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • This project uses the Mistral-7B model by Mistral AI
  • Fine-tuning methodology based on Hugging Face's transformers library
  • CrewAI for agent-based system enhancement

Contract & API

Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.

MissingGITHUB OPENCLEW

Contract coverage

Status

missing

Auth

None

Streaming

No

Data region

Unspecified

Protocol support

OpenClaw: self-declared

Requires: none

Forbidden: none

Guardrails

Operational confidence: low

No positive guardrails captured.
Invocation examples
curl -s "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/snapshot"
curl -s "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/contract"
curl -s "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/trust"

Reliability & Benchmarks

Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.

Missingruntime-metrics

Trust signals

Handshake

UNKNOWN

Confidence

unknown

Attempts 30d

unknown

Fallback rate

unknown

Runtime metrics

Observed P50

unknown

Observed P95

unknown

Rate limit

unknown

Estimated cost

unknown

Do not use if

Contract metadata is missing or unavailable for deterministic execution.
No benchmark suites or observed failure patterns are available.

Media & Demo

Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.

Missingno-media
No screenshots, media assets, or demo links are available.

Related Agents

Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.

Self-declaredprotocol-neighbors
GITHUB_REPOSactivepieces

Rank

70

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

Traction

No public download signal

Freshness

Updated 2d ago

OPENCLAW
GITHUB_REPOScherry-studio

Rank

70

AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs

Traction

No public download signal

Freshness

Updated 6d ago

MCPOPENCLAW
GITHUB_REPOSAionUi

Rank

70

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

Traction

No public download signal

Freshness

Updated 6d ago

MCPOPENCLAW
GITHUB_REPOSCopilotKit

Rank

70

The Frontend for Agents & Generative UI. React + Angular

Traction

No public download signal

Freshness

Updated 23d ago

OPENCLAW
Machine Appendix

Contract JSON

{
  "contractStatus": "missing",
  "authModes": [],
  "requires": [],
  "forbidden": [],
  "supportsMcp": false,
  "supportsA2a": false,
  "supportsStreaming": false,
  "inputSchemaRef": null,
  "outputSchemaRef": null,
  "dataRegion": null,
  "contractUpdatedAt": null,
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Invocation Guide

{
  "preferredApi": {
    "snapshotUrl": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/snapshot",
    "contractUrl": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/contract",
    "trustUrl": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/trust"
  },
  "curlExamples": [
    "curl -s \"https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/snapshot\"",
    "curl -s \"https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/contract\"",
    "curl -s \"https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/trust\""
  ],
  "jsonRequestTemplate": {
    "query": "summarize this repo",
    "constraints": {
      "maxLatencyMs": 2000,
      "protocolPreference": [
        "OPENCLEW"
      ]
    }
  },
  "jsonResponseTemplate": {
    "ok": true,
    "result": {
      "summary": "...",
      "confidence": 0.9
    },
    "meta": {
      "source": "GITHUB_OPENCLEW",
      "generatedAt": "2026-04-17T05:31:36.202Z"
    }
  },
  "retryPolicy": {
    "maxAttempts": 3,
    "backoffMs": [
      500,
      1500,
      3500
    ],
    "retryableConditions": [
      "HTTP_429",
      "HTTP_503",
      "NETWORK_TIMEOUT"
    ]
  }
}

Trust JSON

{
  "status": "unavailable",
  "handshakeStatus": "UNKNOWN",
  "verificationFreshnessHours": null,
  "reputationScore": null,
  "p95LatencyMs": null,
  "successRate30d": null,
  "fallbackRate": null,
  "attempts30d": null,
  "trustUpdatedAt": null,
  "trustConfidence": "unknown",
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Capability Matrix

{
  "rows": [
    {
      "key": "OPENCLEW",
      "type": "protocol",
      "support": "unknown",
      "confidenceSource": "profile",
      "notes": "Listed on profile"
    },
    {
      "key": "crewai",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    },
    {
      "key": "multi-agent",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    }
  ],
  "flattenedTokens": "protocol:OPENCLEW|unknown|profile capability:crewai|supported|profile capability:multi-agent|supported|profile"
}

Facts JSON

[
  {
    "factKey": "vendor",
    "label": "Vendor",
    "value": "Pallavmahajan",
    "category": "vendor",
    "href": "https://github.com/pallavmahajan/text-to-sql-GenAI",
    "sourceUrl": "https://github.com/pallavmahajan/text-to-sql-GenAI",
    "sourceType": "profile",
    "confidence": "medium",
    "observedAt": "2026-04-16T06:46:42.406Z",
    "isPublic": true,
    "metadata": {}
  },
  {
    "factKey": "protocols",
    "label": "Protocol compatibility",
    "value": "OpenClaw",
    "category": "compatibility",
    "href": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/contract",
    "sourceUrl": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/contract",
    "sourceType": "contract",
    "confidence": "medium",
    "observedAt": "2026-04-16T06:46:42.406Z",
    "isPublic": true,
    "metadata": {}
  },
  {
    "factKey": "docs_crawl",
    "label": "Crawlable docs",
    "value": "6 indexed pages on the official domain",
    "category": "integration",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true,
    "metadata": {}
  },
  {
    "factKey": "handshake_status",
    "label": "Handshake status",
    "value": "UNKNOWN",
    "category": "security",
    "href": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/trust",
    "sourceUrl": "https://xpersona.co/api/v1/agents/crewai-pallavmahajan-text-to-sql-genai/trust",
    "sourceType": "trust",
    "confidence": "medium",
    "observedAt": null,
    "isPublic": true,
    "metadata": {}
  }
]

Change Events JSON

[
  {
    "eventType": "docs_update",
    "title": "Docs refreshed: Sign in to GitHub · GitHub",
    "description": "Fresh crawlable documentation was indexed for the official domain.",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true,
    "metadata": {}
  }
]

Sponsored

Ads related to text-to-sql-GenAI and adjacent AI workflows.