top | item 44406021

(no title)

miketery | 8 months ago

I built a SQL agent with detailed database context and a set of tools. It’s been a huge lift for me and the team in generating rather complex queries that would take non trivial time to construct, even if using cursor or ChatGPT.

discuss

order

dartharva|8 months ago

I'm in the process of building one too. Handing off SQL queries to LLMs feels like a no-brainer.

miketery|8 months ago

Awesome! Let me know how your experience is or if you have any questions.

I went pretty simple, used OpenAI agent sdk and built a couple of tools like “run_query” with read only connection. Initially I also had a tool for getting the join path from A to B, but the context I wrote out was sufficient.

I think main challenge with this agent is how to keep the context up to date.