Skip to content

Make the output size of the sql based tools configurable #2261

@shobsi

Description

@shobsi

Prerequisites

What are you trying to do that currently feels hard or impossible?

Right now BigQuery tools based on SQL query, such as bigqueryexecutesql, bigquerysql, don't have protection against large number of results returned by a SQL query. This could result in:

  1. The tool taking really long time to fetch the entire result which may not be useful (think conversational user journeys), or even timing out
  2. A large size output consuming a lot of LLM tokens

Ideally it should be made configurable for the agent developer so that they can protect their agent from such scenarios.

For a comparison, ADK BQ tools have this configurable: https://github.com/google/adk-python/blob/30d3411d603f12ca5bcdd2d71773d087f3191dba/src/google/adk/tools/bigquery/config.py#L73C3-L73C24

Suggested Solution(s)

No response

Alternatives Considered

No response

Additional Details

No response

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions