Skip to main content

SQL Generator Pack

★Trusted◇Sandbox optionalv1.0.0MIT✔Verified80

by AgentNode · published 6 months ago · toolpack

Generate SQL queries from natural language descriptions.

Translates natural language to SQL with schema awareness and query validation.

langchaincrewaigeneric

Quick Start

bash
agentnode install sql-generator-pack

Runs in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.

Usage

From package
python
from sql_generator_pack.tool import run

result = run(
    question="Show me the top 10 customers by total order value this quarter",
    schema={
        "customers": ["id", "name", "email", "created_at"],
        "orders": ["id", "customer_id", "total_amount", "status", "created_at"]
    },
    dialect="postgresql"
)

print(result["sql"])
# SELECT c.name, c.email, SUM(o.total_amount) AS total_value
# FROM customers c
# JOIN orders o ON c.id = o.customer_id
# WHERE o.created_at >= date_trunc('quarter', CURRENT_DATE)
#   AND o.status = 'completed'
# GROUP BY c.id, c.name, c.email
# ORDER BY total_value DESC
# LIMIT 10;

print(f"Tables used: {result['tables_referenced']}")
print(f"Query type: {result['query_type']}")

Runs locally on your machine. No execution data is sent to AgentNode. Permissions are checked before execution. Learn how this works

Verification

high confidence80/100✔ Verified
smokeReturned valid result
+25/25
testsTests failed
0/15
importAll tools imported successfully
+15/15
installInstalled in 2.5s
+15/15
contractAll contract checks passed
+10/10
determinismConsistent output across runs (normalized)
+5/5
reliability3/3 runs passed
+10/10

Package installs and imports correctly. runtime checks passed.

✔install2.5s
✔import530ms
✔smoke312ms
✖tests1.2s

This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.

Verified in real_auto mode

Python 3.12.3ffmpegpopplertesseractuv

Last verified 9/8/2026· Runner v2.0.0

Use this when you need to...

  • ›Convert plain English questions into SELECT queries for analytics
  • ›Generate complex JOIN queries from schema descriptions
  • ›Build parameterized INSERT and UPDATE statements from natural language
  • ›Translate business KPI definitions into aggregate SQL queries
  • ›Generate database migration DDL from schema change descriptions

README

Version History

Capabilities

sql_generationgenerate_sqltool

Permissions

◇Sandbox optionalFrom a trusted publisher — runs on the host by default. You can require isolation with sandbox.host_trust_policy.

Declared by the publisher. Checked before execution by the policy gate.

Networknone
Filesystemnone
Code Executionnone
Data Accessinput_only
User Approvalonce

Permissions are policy-checked before execution. For trusted and curated packages that run on the host, network and filesystem access are policy-checked but not OS-sandboxed. When runtime isolation is required for untrusted/community code, AgentNode uses sandbox-or-fail-closed if the required container runtime and pinned image are available. Learn more

Privacy

All tool execution happens locally on your machine. AgentNode never receives:

  • • Tool inputs or outputs
  • • Execution logs
  • • Data your agent processes

Only install events and search queries are sent to the registry.

bash
agentnode install sql-generator-pack

Files (3)

License

MIT

Stats

Downloads0
Installs0
Versionv1.0.0
Published3/16/2026
Channelstable
Typetoolpack
Entrypointsql_generator_pack.tool

Compatibility

Frameworks

langchaincrewaigeneric

Runtime

python

Python Version

>=3.10

Trust & Security

Publisher★Trusted
SignatureNone
ProvenanceNone
Security Issues0

Publisher

A

AgentNode

@agentnode