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.
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.
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.
Architecture: everything inside the perimeter
The whole system assembles inside your Snowflake account. Watch the pieces land:
| 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:
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:
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>;
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 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_cypherturns a question into a query;run_cypherexecutes it and returns both the query and the result. -
Loading:
load_csvplusload_csv_guidancemove 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.
One question, end to end
Here’s what actually happens between typing a question in Snowflake Intelligence and getting an answer back:
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:
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:
› 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?
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:
The division of labor is explicit:
-
You (or your admin) bind
consumer_data_tableto 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:
MERGEfor retry-safe loads, and an index on the matched property before large loads:CREATE INDEX ON :Airport(id).
Cleanup is one call too
-- 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');
What this changes
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.