Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SQL-Agent

Overview

SQL-Agent is a multi-agent system designed to assist with SQL query generation and execution. It leverages Langgraph's multi-agent collaboration to interact with a database, generate accurate SQL queries, and provide results based on natural language questions.

Features

  • Table Discovery: Automatically fetches available tables from the database.
  • Relevance Determination: Identifies which tables are relevant to the user's question.
  • DDL Fetching: Retrieves the Data Definition Language (DDL) for the relevant tables.
  • Query Generation: Generates SQL queries based on the user's question and the DDL of relevant tables.
  • Query Validation: Uses a Language Model (LLM) to double-check the query for common mistakes.
  • Query Execution: Executes the SQL query against the database and returns the results.
  • Error Handling: Iteratively corrects any mistakes surfaced by the database engine until the query is successful.
  • Response Formulation: Provides a clear response to the user based on the query results.

End-to-end workflow

image

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages