Skip to content

Add Cortex Agent management methods to SnowflakeCortexAgentHook#70101

Draft
SameerMesiah97 wants to merge 1 commit into
apache:mainfrom
SameerMesiah97:SnowflakeCortexAgentHook-Extension
Draft

Add Cortex Agent management methods to SnowflakeCortexAgentHook#70101
SameerMesiah97 wants to merge 1 commit into
apache:mainfrom
SameerMesiah97:SnowflakeCortexAgentHook-Extension

Conversation

@SameerMesiah97

Copy link
Copy Markdown
Contributor

Description

This change extends SnowflakeCortexAgentHook with support for managing Snowflake Cortex Agent Objects.

The hook now exposes methods to describe, list and delete Cortex Agents using the Snowflake Cortex Agent REST API. To support these endpoints, the internal request helper has been updated to accept optional query parameters while continuing to centralize authentication, request execution and error handling.

Rationale

The existing hook supports executing Cortex Agents through run_agent(), but the Snowflake Cortex Agent REST API also provides endpoints for managing Cortex Agent Objects. Exposing these operations through the hook allows users to inspect and manage agents without needing to invoke the REST API directly.

Adding query parameter support to the shared request helper also provides a reusable foundation for additional Cortex Agent management operations in future enhancements.

Tests

Added unit tests verifying that:

  • describe_agent() sends the expected request and returns the API response.
  • list_agents() correctly forwards optional query parameters and returns the list of agents.
  • delete_agent() issues the expected DELETE request, including both values of the if_exists parameter.
  • Existing run_agent() tests continue to validate the shared request helper after the addition of query parameter support.

This change extends SnowflakeCortexAgentHook with support for
managing Cortex Agent Objects through the Snowflake REST API.

The hook now supports describing, listing and deleting Cortex
Agents in addition to executing them via run_agent().

The internal request helper has also been enhanced to support
query parameters, enabling endpoints such as list_agents() and
delete_agent() to pass optional REST query parameters while
reusing the existing request implementation.
@boring-cyborg boring-cyborg Bot added area:providers provider:snowflake Issues related to Snowflake provider labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:snowflake Issues related to Snowflake provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant