Skip to content

v3.0.0.dev1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Sep 16:55
· 4 commits to main since this release

Hi everyone,

Today, I am releasing the first developer preview of TESHQ v3: v3.0.0.dev1.

When people hear about AI and databases, the first phrase that comes to mind is "text-to-SQL." But if we are honest, most "text-to-SQL" tools are just thin prompt wrappers that output a raw SQL string and leave you to deal with the fallout—hallucinated columns, broken joins, unindexed full table scans, or dangerous syntax errors.

That is why we don't think of TESHQ as a "text-to-SQL" tool.

TESHQ is an Autonomous Conversational Database Engine and Safety Harness. It sits directly between you and your live production databases, managing the complete lifecycle: introspecting schema topologies, pruning 100+ tables down to relevant context, verifying read-only safety via an AST firewall, executing queries across 11+ dialects, self-healing runtime errors in an automated closed loop, and delivering typed analytical data directly into your workflow.

With v3.0.0.dev1, we completely re-engineered TESHQ to bring local air-gapped models, conversational REPL exploration, and modern data engineering formats together into one unified runtime:

  1. 100% Offline, In-Process Local Inference
    Run completely air-gapped without API keys, external network calls, or background Docker containers. TESHQ loads GGUF models directly in-process via llama-cpp-python, auto-detecting your CPU, RAM, and GPU acceleration (CUDA or Apple Silicon Metal). To physically prevent smaller models from hallucinating invalid syntax, we implemented a custom GBNF grammar engine that mathematically constrains token sampling to valid SQL.

  2. Interactive Conversational Terminal (teshq chat)
    A dedicated REPL featuring an ambient HUD, live multi-turn context threading, a 6-stage cognitive progress tracker, and slash commands (/tables, /sql, /explain, /export, /copy, /model). You can now explore your database conversationally—ask a question, review results, and say "now filter by west region" without losing context.

  3. Zero-Copy Modern Data Formats: Polars & Apache Arrow
    Pandas is no longer the only option. v3 introduces native, zero-copy outputs for Polars DataFrames (result.polars) and Apache Arrow Tables (result.arrow), alongside built-in export to Parquet, JSONL, and Excel (.xlsx).

  4. Asynchronous Execution, Event Streaming & Cancellation
    The Python SDK now provides non-blocking async execution (await client.aquery()), cooperative cancellation tokens (CancellationToken) to safely abort long-running queries, and real-time lifecycle event streaming (client.stream_query()) so your backend services can track planning, SQL synthesis, and execution live.

  5. Bring Your Own Engine (BYOE) & Expanded Dialects
    Pass an existing SQLAlchemy Engine directly into TESHQ to reuse your production connection pools, IAM auth, or custom SSL certificates. We also expanded database connectors to 11+ engines, including Microsoft SQL Server (T-SQL), Google BigQuery, Snowflake, Databricks, Amazon Redshift, DuckDB, and ClickHouse, backed by dynamic multi-schema introspection.

  6. Iterative Multi-Round Self-Healing
    v2 stopped after a single retry. v3 accumulates syntax error history across up to 3 iterative self-healing passes, guiding the model to correct complex joins and column references.

Compatibility & Prerelease Notice:
Please keep in mind that v3.0.0.dev1 is a development prerelease. While our test suite (319 tests) is green, APIs may undergo minor refinements before the stable 3.0.0 release. We do not recommend deploying this dev version directly into mission-critical production pipelines without thorough sandbox testing.

Who should try it now?

  • Data engineers and developers who want conversational database access running completely on their local laptops without sensitive data leaving their network.
  • Teams building internal data assistants or analytics agents needing streaming and async execution.
  • Existing TESHQ users looking for multi-turn sessions and Polars/Arrow integration.

How to try it:
pip install --pre "teshq[local,data]"

GitHub: https://github.com/theshashank1/TESH-Query
PyPI: https://pypi.org/project/teshq/3.0.0.dev1/
Issues & Feedback: https://github.com/theshashank1/TESH-Query/issues

If you work with databases or developer tools, please take it for a spin on your local databases, benchmark your queries, and share your feedback. Bug reports and community contributions are very welcome!

Full Changelog: v2.1.1...v3.0.0.dev1