AboutWhat I doProjectsLabContact
  • LLM
  • SQL
  • AGENT

LLM SQL Agent

LLM SQL Agent

An LLM agent that answers questions over a SQL database: it translates natural language into queries, runs them read-only and summarises the result. Code at github.com/delcenjo/llm-sql-agent.

Plain-language questions over a SQL database, with no hand-written queries behind it: the agent is handed a few tools and left to inspect the schema, write a SELECT, do a bit of arithmetic and come back with an answer.

  • Moderead-only
  • Toolsschema + SQL
  • DemoHF Spaces

Agency with limits

The agent can only run read-only queries, with bounded tools and a log of every step it takes. That is the lesson of the project: agency is useful exactly to the extent that it is well fenced.

Seeing the reasoning

Every answer arrives with the trace: which tables it looked at, what SQL it wrote and what the database returned. When the agent gets it wrong — and it does —, the trace turns the failure into something debuggable instead of a black box.

Try it live

The HuggingFace Spaces demo ships with a sample database: you ask the question, see the SQL it generates and the result. Watching the trace live explains the project better than any description.

LLM SQL Agent

Interactive demo hosted on HuggingFace Spaces

Shall we connect?

Let's talk: feedback, collaboration or an opportunity.

You can write to me about a project, a technical question, to give me feedback, or about an internship or a first junior role. I always reply.

Write to me

Next projects:

Built with

PythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllamaPythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllama
hola@jmwebsoluciones.com