Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
24.34k stars 2.44k forks source link

[FEAT]: Ability to Specify Schema Name Alongside Database Credentials in the SQLAgent custom skill #2412

Closed avinashkurup closed 6 days ago

avinashkurup commented 6 days ago

What would you like to see?

I would like to propose a feature enhancement for the AnythingLLM project. Currently, when configuring database connections, users can specify database credentials, but there is no option to define the schema name directly.

Suggested Enhancement It would be beneficial to have the ability to specify the schema name in addition to the existing database credentials. This enhancement would provide greater flexibility and usability for users working with databases that contain multiple schemas.

Use Case For projects that require access to specific schemas within a database, being able to specify the schema name directly in the configuration would streamline the process and reduce the need for additional queries to select the desired schema.

Additional Information Please let me know if further details are required or if there are existing discussions related to this feature.

Thank you for considering this enhancement!

timothycarambat commented 6 days ago

This can be done with prompt (system or input) guiding again for specify conditions or unique schema fields for a given database! This will perform better than just relying on the SQL:list-schema skill since most times column names are not super descriptive and on a sufficiently large DB - would be very helpful for an agent.

Likewise, if your SQL use case is very unique or just you have a desired way that SQL calls should be done (referring to your DLL upload request) you should consider building out a custom agent skill!.

There are no limits to what you can do with custom skills and as long as it works in the framework for an agent you can run any code you want. This would ensure SQL agent calls work exactly the way you want without relying on us to build out enhancements or features that complicate this built-in skill beyond a typical use case