Talk to Your Tables: Agentic Graph Analytics Inside Snowflake

featured-image
Cortex Agents · FalkorDB · Snowflake Native App

Your Snowflake tables, now a graph you can talk to

Graph questions, who’s connected to whom, through what, how many hops away, are miserable to answer in SQL. Here’s how the FalkorDB Native App plus a Snowflake Cortex Agent turns tables into a knowledge graph you question in plain English, without a single byte leaving your account.

01

The two walls between your tables and graph answers

Your most interesting questions are graph questions. Which suppliers share a subcontractor? Which accounts route money through the same intermediaries? Which airports would strand the most passengers if they closed? The data to answer them is sitting in Snowflake, as rows.

Teams that try to answer these hit two walls in sequence. The first is infrastructure: graph databases traditionally live outside the data warehouse, so the “quick experiment” becomes an ETL pipeline, a network path, a security review, and a data-residency conversation with your compliance team. The second wall is language: even once the graph exists, someone has to write Cypher, and the analysts with the questions usually aren’t the engineers with the syntax.

The FalkorDB Native App knocks down the first wall. The Cortex Agent knocks down the second.

FalkorDB ships as a Snowflake Native App running on Snowpark Container Services, so the graph engine executes inside your Snowflake account, next to your tables. And on top of it, the app can create a Snowflake Cortex Agent: an AI agent you meet in AI & ML → Agents or Snowflake Intelligence that explores your graphs, writes and runs Cypher for you, and shows its work on every answer.

02

Architecture: everything inside the perimeter

The whole system assembles inside your Snowflake account. Watch the pieces land:

Tables, graph engine, and agent · all inside one Snowflake accountfig. 01
Piece What it is Why it matters
Your tables Consumer data, bound to the app through Snowflake’s reference system The app reads only what you explicitly bind, no blanket access
FalkorDB app The graph database in an SPCS container, with a browser UI and SQL procedures Sub-millisecond graph traversals without leaving Snowflake governance
Cortex Agent A Snowflake-managed agent wired to the app’s custom tools Plain-English access to the graph for anyone with the role

One SQL call creates the agent, its configuration, and every tool it needs:

create the agent: one procedure
USE WAREHOUSE FALKORDB_WH;

CALL <app_instance_name>.graph.create_agent(
  'FALKORDB_GRAPH_AGENT',
  'SOURCE_DB.SOURCE_SCHEMA',   -- where your data lives
  'WORKING_DB.WORKING_SCHEMA'  -- where the agent may write
);

Then a few grants make it usable: one so your role can talk to agents, and two so the app can call Cortex models for Cypher generation:

grants: run as ACCOUNTADMIN
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_AGENT_USER TO ROLE <consumer_role>;

-- lets text_to_cypher resolve SNOWFLAKE.CORTEX.COMPLETE
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO APPLICATION <app_instance_name>;
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO APPLICATION <app_instance_name>;
The governance win: there is no external endpoint, no API key to a third-party LLM service, and no data export. The agent, the model calls (via Snowflake Cortex), and the graph engine all execute under your account’s existing roles, auditing, and residency guarantees.
03

What makes it agentic: the toolbox

A chatbot answers from what it already knows. An agent decides what to find out. The difference is tools, and create_agent provisions a whole schema of them, agent_tools, as plain Snowflake functions and procedures the Cortex Agent calls like any custom tool:

The agent_tools schema: discovery, generation, execution, loadingfig. 02

The tools split into three natural groups:

  • Discovery: list_graphs, inspect_graph, graph_stats. Before writing a single line of Cypher, the agent looks at what actually exists: labels, relationship types, property keys, node and edge counts.
  • Generation & execution: text_to_cypher turns a question into a query; run_cypher executes it and returns both the query and the result.
  • Loading: load_csv plus load_csv_guidance move bound Snowflake tables into the graph (more on this in section 05).

A subtle but important design choice: get_context gives the agent its operating guidance as data: which tool to reach for, when to stay read-only, when to ask before mutating. The behavioral contract lives in a config table the app owns, not buried in a prompt you can’t inspect.

Read-only by default. Mutations only when you ask for them. Loads only after you confirm.
04

One question, end to end

Here’s what actually happens between typing a question in Snowflake Intelligence and getting an answer back:

Question → plan → text_to_cypher → run_cypher → answer with the query shownfig. 03

The interesting step is text_to_cypher. It doesn’t guess at your schema: it reads it. Before calling the model, the procedure pulls the live graph’s labels, relationship types, property keys, and stats, and hands them to SNOWFLAKE.CORTEX.COMPLETE as context. Generated Cypher matches the graph that exists today, not the one an LLM imagines.

The default model is claude-4-sonnet, running through Cortex inside Snowflake. Want a different one for a single generation? Pass it as the optional fourth argument:

swap the model per call
CALL <app_instance_name>.agent_tools.text_to_cypher(
  'FALKORDB_GRAPH_AGENT',
  'airroutes',
  'Find the top 10 airports by outgoing routes',
  'claude-sonnet-4-5'   -- change to any Snowflake Cortex model
);

No black-box answers

Every response that involves Cypher shows the Cypher. text_to_cypher returns the generated query; run_cypher returns the executed query alongside its result. If an answer looks off, you don’t debate the agent: you read three lines of Cypher, spot the wrong relationship type, and rephrase. That single property is what separates an analytics tool you trust from a demo you screenshot.

Some prompts to start with, verbatim from the integration guide:

AI & ML → Agents → FALKORDB_GRAPH_AGENT
 What graphs are available?
 Inspect my graph schema and suggest useful Cypher queries.
 Find the top connected nodes in my graph.
 Generate a Cypher query for this question and run it.
 How do I load my bound Snowflake table into FalkorDB?
05

Getting tables into the graph, with guardrails

The agent helps you load data too, but deliberately doesn’t hold all the keys. Binding a table to the app is a human decision made through Snowflake’s reference flow; the agent works only with what an admin has already bound:

Bind reference → agent writes the LOAD CSV mapping → confirm → graph growsfig. 04

The division of labor is explicit:

  • You (or your admin) bind consumer_data_table to the app. The agent cannot create this binding, by design.
  • The agent generates the LOAD CSV FROM 'file://consumer_data.csv' AS row ... mapping Cypher, asks which graph to load into if you didn’t say, and waits for your confirmation before calling its load tool.
  • The guidance tool nudges toward production habits: MERGE for retry-safe loads, and an index on the matched property before large loads: CREATE INDEX ON :Airport(id).
Why the friction is a feature: an agent that can silently bind and ingest any table it can see is a data-exfiltration story waiting to happen. Keeping the binding step human means the blast radius of any prompt, bug, or jailbreak is limited to data someone already chose to share with the app.

Cleanup is one call too

inspect grants · tear down
-- print optional caller grants for the configured schemas
CALL <app_instance_name>.graph.get_agent_caller_grants('FALKORDB_GRAPH_AGENT');

-- remove the agent and its app-owned artifacts
CALL <app_instance_name>.graph.drop_agent('FALKORDB_GRAPH_AGENT');
06

What this changes

1 CALL
graph.create_agent: agent, config & tools
8 tools
discover · generate · execute · load
0 bytes
of your data leave the Snowflake account
100%
of answers show the Cypher they ran

The pattern here is bigger than one integration. Bring the agent to the data, give it narrow tools instead of broad access, make it show its work, and keep the irreversible steps human. That’s what turns “we have an AI agent” from a risk-register entry into something your analysts actually open on a Tuesday morning to ask which suppliers share a subcontractor.

If you’re already running the FalkorDB Native App, the agent is one procedure call away. If you’re not, the integration guide takes you from marketplace install to a running graph, and there’s a Cortex Code skill ($falkordb-snowflake-native-app-skill) to assist with installation SQL, sizing, loading, and agent setup along the way.

Ask your graph something today

Install the FalkorDB Native App from the Snowflake Marketplace, call graph.create_agent, and open AI & ML → Agents.