The SQL Agent bot is not working and I’m not sure what I’m doing wrong.
This is a very simple workflow. I tried to replicate again with a new database and it still doesn’t work.
Thought: I should look at the tables in the database to see what I can query.
Action: [[“list-tables-sql”]]
Action Input: “”
Observation: [[“list-tables-sql”]] is not a valid tool, try another one.
Thought:
I’m having the same issue, so it’s probably some bug.
What I did to solve this was attaching a tool to a Tools Agent instead.
And using the $fromAI function.
Works pretty much the same way. You can let the AI decide the entire SQL query or set a certain template for it to follow.
You could also attach another tool that provides sample data from the tables. Or instruct the AI to get some sample data beforehand.
If my reply solves your problem, please remember to mark it as a solution.
So the solution is gonna be the one I gave you above. It does the same job as you were trying to do with the SQL Agent. I use this method a lot and it’s great.