Skip to main content
The gateway bridges a Snowflake Cortex Agent to the A2A protocol. You register the agent once, and ForceAI signs each call (PAT or key-pair JWT), invokes the Cortex agents/{name}:run REST API, and returns the reply. This guide covers the Snowflake-side setup, the two auth modes, and the registration payload

Prerequisites (Snowflake side)

1

A deployed Cortex Agent

Create the agent in Snowsight or with CREATE AGENT. Find its fully-qualified name with SHOW AGENTS IN ACCOUNT; you need the database, schema, and agent name
2

The account URL

Run SELECT SYSTEM$ALLOWLIST(); and take the host of type SNOWFLAKE_DEPLOYMENT_REGIONLESS (or SNOWFLAKE_DEPLOYMENT), then prefix https://. Do not use the bare account-locator host; it returns an HTML “File not found” and the call will fail
3

Grant the calling role access

Grant the role behind your PAT or key-pair user: USAGE on the database, schema, and agent; USAGE and READ on the semantic-model stage; USAGE on the warehouse; and SELECT on the tables the agent queries
4

Put the warehouse in the agent spec

The Analyst tool runs SQL using the warehouse named in the agent spec’s tool_resources.<analyst_tool>.execution_environment, not the user’s default warehouse. Set it there or Analyst queries fail
PAT auth also requires a network policy on the user or account that allows the gateway’s egress IP, or Snowflake rejects the token with error 390432. Key-pair JWT auth does not need a network policy, which is why it is the better choice for a hosted gateway

Auth modes

Create a Programmatic Access Token for the calling user. The gateway sends it as Authorization: Bearer <pat> with X-Snowflake-Authorization-Token-Type: PROGRAMMATIC_ACCESS_TOKEN. Requires a network policy covering the gateway IP

Register the agent

Or use the dashboard: Agentic -> Agents -> Add New Agent, pick Snowflake Cortex Agents, and fill the same fields

Fields

string
required
The regionless deployment host from SYSTEM$ALLOWLIST(), with https://
string
required
The fully-qualified Cortex agent. snowflake_agent_name also fills the model template snowflake_cortex_agents/{name}
string
default:"pat"
pat or keypair_jwt
string
Required in PAT mode
string
Required in key-pair mode. Private key is an unencrypted PKCS8 PEM

Approve and invoke

Troubleshooting