Skip to main content

Under construction

gitnasrgitnasr

Kakaw AI

A web app that answers questions about your database in plain English: it writes the SQL, runs it and shows a table or a chart.

Kakaw AI: project overview

What it is

Kakaw AI is a web app that lets you ask a database questions in plain English. It writes the SQL (the language databases understand), runs it and shows the answer as a short sentence, a table and a chart. It is in a soft launch at kakaw.nasr.work.

The problem

I had a SQLite database, a single file full of data, and I needed answers from it. Getting them meant writing a new SQL query for every question, then fixing it when a name or a value was spelled differently. I wanted to ask the question and get the answer.

How it works

You sign in with Google or GitHub, connect a PostgreSQL database or upload a SQLite file, and choose the AI model to use: OpenAI, Anthropic, Google, OpenRouter, or one running on your own computer. Then you ask. A follow-up like "what about last year?" is understood from the earlier questions. If a question can mean two things, Kakaw asks which one you mean. When a query finds nothing, it looks up the values really stored in the database and tries again, so "new york" still finds "New York". A last check compares the result with the question before you see it. The answer, the chart and suggested next questions arrive together.

Under the hood

  • It can only read. Every query is checked before it runs and then runs in a read-only mode with a time limit, so a wrong answer can never change or delete your data.
  • A graph of small steps. The agent is built with LangGraph: each step (understand, write, run, check) is small, and a failed step goes back with the reason instead of starting over.
  • Your keys stay locked. API keys and database addresses are stored encrypted, and Kakaw refuses to connect to private network addresses.

Built with

TypeScript, LangGraph and LangChain for the agent; NestJS, Prisma and PostgreSQL for the API; Next.js, React and Tailwind CSS for the web app; Docker.

Website