generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
This feature request proposes the addition of a new tool named query_postgres to the strands-tools suite. The tool allows agents to securely connect to a PostgreSQL database and run parameterized SQL queries, returning structured results for further use in workflows.
Proposed Solution
Proposed Functionality
The query_postgres tool supports:
- Connecting to a PostgreSQL database using provided credentials.
- Executing user-defined, parameterized SQL queries (e.g., SELECT, INSERT, UPDATE).
- Returning structured query results to the agent in JSON format.
- Optional support for environment-variable-based configuration for secure handling of credentials.
Have taken the liberty to create the PR: #135
Use Case
Agents often require access to relational data for decision-making or automation tasks. Currently, there is no built-in tool in strands-tools that enables querying a PostgreSQL database. Adding query_postgres fills this gap and aligns with the modular design of the toolkit
Alternatives Solutions
No response
Additional Context
Open to code review and any suggestions on improving the PR.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request