Introduction
I recently got my hands on the Even G2 smart glasses!
Plenty of companies make smart glasses these days, but I'd personally felt it was still a little early to jump in. Then the Even G2 came along with specs that looked good enough for everyday use, and I ended up buying a pair on impulse.
After using them for a while, an idea hit me: "Wouldn't it be incredibly handy if I could work with my Snowflake database by voice, right from these glasses?" Imagine asking "How are sales this month?" in the middle of a meeting, or whenever the thought crosses your mind, and seeing the answer appear right in front of your eyes. Just picturing it is exciting, right? So I went ahead and tried it!
This one is a side story with a slightly different feel from my usual feature introductions. I'll set things up so I can ask Snowflake's Cortex Agents (Coding Agent) for data analysis by voice from the Even G2, by way of AWS Lambda. Think of it as a little break, and I'd be happy if you read it in a relaxed mood.
Note: This article reflects my personal views and does not represent Snowflake's official position.
Note: (October 2026) Some features introduced in this article are in development or Preview. They may change significantly in future updates.
Note: In particular, Cortex AI Gateway is a Preview feature, available to accounts in AWS commercial regions (with some exceptions). Also, the request body format sent by the Even G2's Agent Configuration isn't covered in the official documentation; what I describe here is based on community analysis.
What is Even G2?
Even G2 is a pair of smart glasses with a built-in display from Even Realities. The official site describes them as "everyday," and they're designed to be worn all day long. Green text appears to float inside the lenses, so you can check answers to what you say, notifications, translations, and navigation at the edge of your vision. There are also features such as conversation support (Conversate) and a teleprompter that shows your talk script.
The display is visible only to you, so you can check your notes mid-conversation without the other person really noticing. That's a nice touch (the official Conversate help also describes it as "visible only to the wearer"). On top of that, if you pair the glasses with the R1 ring, you can switch screens with just a tap or a scroll of your fingertip, without touching the glasses at all. It feels more natural than I expected, and it's really handy.
What I like most is that there's deliberately no camera or speaker. The official site says "Camera-free. By design.", and the developer documentation states "No camera, no speaker on the glasses." You won't make people around you worry about being recorded. And at an official 36 g, they weigh about the same as regular glasses, so wearing them in the office doesn't feel odd at all. If anything, I think they look a little stylish.
Overview (Even Hub Documentation)
Another interesting point is how much room there is for customization. The Even G2 comes with a standard AI assistant (Even AI) that you call up with "Hey Even." But once you sign in to Even Hub, the developer platform, a setting called Agent Configuration appears in the Even app. It lets you point Even AI's requests at an endpoint of your own. The official help even includes a tutorial on connecting to an agent running on your own PC.
Tutorial: Bridging G2 to OpenClaw - Bring Your Own Agent
When I found this setting, it clicked right away: "Then couldn't I connect this to Snowflake, too!?"
How It Works
The setup is pretty simple. All it takes is one small Lambda function sitting between the Even app and Snowflake as a relay server.
- Even G2: connects to the phone over Bluetooth
- Even app on the phone: converts speech to text, then sends it to Lambda over HTTPS (with the PAT as a Bearer token)
-
AWS Lambda (function URL): forwards the request to Cortex Agents via
agent:run - Snowflake Cortex Agents (Coding Agent): runs read-only SQL
- Snowflake tables: the data being analyzed
As the list shows, Lambda works as a relay server. The Even app sends requests in the OpenAI Chat Completions format, which doesn't match the request format of Cortex Agents' agent:run. The model name it sends is also fixed (this part comes from community analysis), so the request can't be forwarded as-is. Instead, Lambda reshapes the request into the Cortex Agents format, forwards it, and turns the answer back into a form the glasses can display. Lambda itself never reads any table data.
For authentication, I use a Snowflake programmatic access token (PAT). You enter the PAT in the Even app, and Lambda passes it straight through to Snowflake. Lambda never stores the PAT or writes it to logs.
Warning: For this test, I've exposed the Lambda function URL without authentication (Snowflake still authenticates the PAT). If you connect to a production database, always put Amazon API Gateway in front and add security layers such as authentication, a WAF (Web Application Firewall), and rate limiting.
What is Coding Agent?
The star of this article is Coding Agent in Cortex Agents. Coding Agent became generally available (GA) on August 26, 2026. It brings the same coding capabilities as Snowflake CoCo (formerly Cortex Code) to your own apps through the Cortex Agents REST API.
Coding Agent (Snowflake Documentation)
It's surprisingly easy to use: just specify code_toolset_all as a tool when you call Cortex Agents' agent:run. You don't even need to create an agent object beforehand. With that alone, the agent builds its answer inside a Snowflake-managed sandbox, using tools for running SQL, web search, file operations, and more.
Even better, SQL is limited to operations that read tables (SELECT and SHOW). Here's how the official documentation describes snowflake_sql_execute:
Execute SQL against Snowflake (read-only: SELECT and SHOW commands; can write to stages)
Writing to stages is the one exception. The role I create in this article has no stage privileges, though, so it can read the tables but can't change them.
This "read-only" constraint is exactly why I think it pairs so well with smart glasses. It's hard to carefully review the SQL being run from a pair of glasses. Knowing the data can't be modified lets me talk to it with peace of mind.
On top of that, the SQL the agent runs only works within the privileges of a Snowflake role. If you restrict the PAT to a specific role when you create it, the agent's SQL runs with that role. Even though you can now ask questions casually by voice, Snowflake's governance still applies, so you can keep what's visible tightly scoped by role!
What I actually verified The official documentation says Cortex Agents determines privileges based on the user's default role. So I tested it with a user whose default role is ACCOUNTADMIN, using a PAT restricted to PUBLIC. All of the agent's SQL ran as PUBLIC, and queries against a view that PUBLIC had no privileges on were rejected (confirmed in `QUERY_HISTORY`). When I tried switching to a different role, the request was rejected with the following error: ``` Role '...' specified in the connect string is not granted to this user, or is not permitted for the credentials being used. ```Setup
From here, I'll walk through the steps to get it running, one at a time.
1. Create a Read-Only Role for the G2
First, create a dedicated role for the glasses and allow read access to the schema you want to analyze, and nothing else. I'm using my own sample e-commerce data in GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA, so replace it with the database and schema you want to analyze.
USE ROLE ACCOUNTADMIN;
-- Role used by Even G2 for read-only access
CREATE ROLE IF NOT EXISTS G2_READER COMMENT = 'Read-only role for Even G2';
-- Allow read access to the schema you want to analyze, and nothing more
GRANT USAGE ON DATABASE GLACIERSTYLE_DB TO ROLE G2_READER;
GRANT USAGE ON SCHEMA GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA TO ROLE G2_READER;
GRANT SELECT ON ALL TABLES IN SCHEMA GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA TO ROLE G2_READER;
-- Warehouse for running SQL, and the privilege to use Cortex Agents
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE G2_READER;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_AGENT_USER TO ROLE G2_READER;
-- Grant the role to your user and set a default warehouse
GRANT ROLE G2_READER TO USER <username>;
ALTER USER <username> SET DEFAULT_WAREHOUSE = COMPUTE_WH;
SNOWFLAKE.CORTEX_AGENT_USER is a database role that grants access to Cortex Agents only. You can also use SNOWFLAKE.CORTEX_USER, which covers all the Cortex AI features. Also, Cortex Agents runs SQL with the user's default warehouse, so make sure your user has one set.
2. Create a Role-Restricted PAT
Next, create the PAT you'll enter in the Even app. The key points are to restrict it to the role above with ROLE_RESTRICTION, and to keep the expiration short (7 days here).
ALTER USER <username> ADD PROGRAMMATIC ACCESS TOKEN g2_even_ai
ROLE_RESTRICTION = 'G2_READER'
DAYS_TO_EXPIRY = 7
COMMENT = 'Even G2 -> Cortex Agents relay';
The token is shown only once, so enter it directly into the Even app.
Note: By default, a PAT can only be used for authentication by users who have a network policy. On top of that, Lambda's source IP address isn't fixed, so a network policy that only allows your home or office IP will block calls from Lambda. If you're only trying it out briefly, you can temporarily lift the network policy requirement by specifying
MINS_TO_BYPASS_NETWORK_POLICY_REQUIREMENTwhen you create the PAT (up to 1 day, and not recommended in the official docs). For production, fix Lambda's source IP with something like a NAT gateway, and allow that IP in your network policy.
Using programmatic access tokens (Snowflake Documentation)
3. Create the Lambda Function
Now for the relay Lambda function itself. It fits in about 90 lines using only the Python standard library. The code is a bit long, so expand the section below to see it.
Lambda function code (lambda_function.py) ```python """A minimal relay from Even G2 (Even AI's Agent Configuration) to Snowflake's Coding Agent. Runs behind an AWS Lambda function URL. Standard library only; the PAT is forwarded as-is and never stored.""" import base64 import json import os import urllib.error import urllib.request SNOWFLAKE_HOST = os.environ["SNOWFLAKE_HOST"] # e.g. myorg-myaccount.snowflakecomputing.com PATH_TOKEN = os.environ["PATH_TOKEN"] # Marker appended to the end of the URL (any long string) MODEL = os.environ.get("MODEL", "auto") # With auto, Snowflake picks the model # Telling the agent where the data lives saves it from searching through every database DATA_LOCATION = os.environ.get("DATA_LOCATION", "") # e.g. GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA SYSTEM_PROMPT = ( "You are an assistant whose answers are shown on smart glasses. " "Answer in the same language as the question, lead with the conclusion, and use plain text of about 70 words or fewer. " "Do not use headings, bullet points, tables, or URLs. " "Use read-only SQL when you need Snowflake data, and web search when you need up-to-date information. " ) + (f"The data is in {DATA_LOCATION}." if DATA_LOCATION else "") # Guidance on which tools to use. It isn't enforced, so apply the real restriction through the PAT's role ORCHESTRATION_PROMPT = "Use only the snowflake_sql_execute and web_search tools." def reply(text): """Return an OpenAI-style response the Even app can read. The content is what appears on the glasses.""" body = { "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": text[:350]}, "finish_reason": "stop"}], } return {"statusCode": 200, "headers": {"Content-Type": "application/json"}, "body": json.dumps(body, ensure_ascii=False)} def lambda_handler(event, context): # Reject requests to URLs without the marker if event.get("rawPath", "").strip("/") != PATH_TOKEN: return {"statusCode": 404, "body": "not found"} auth = (event.get("headers") or {}).get("authorization", "") if not auth.startswith("Bearer "): return {"statusCode": 401, "body": "missing token"} raw = event.get("body") or "{}" if event.get("isBase64Encoded"): raw = base64.b64decode(raw).decode("utf-8") try: messages = json.loads(raw).get("messages") or [] question = next(m["content"] for m in reversed(messages) if m.get("role") == "user") except (ValueError, AttributeError, KeyError, StopIteration): return reply("Sorry, I couldn't catch that. Please try asking again.") if not isinstance(question, str) or not question.strip(): return reply("Sorry, I couldn't catch that. Please try asking again.") # Even always sends a fixed model name, so reshape the request into the Coding Agent format here payload = { "stream": False, "models": {"orchestration": MODEL}, "instructions": {"system": SYSTEM_PROMPT, "orchestration": ORCHESTRATION_PROMPT}, "messages": [{"role": "user", "content": [{"type": "text", "text": question}]}], "tools": [{"tool_spec": {"type": "code_toolset_all", "name": "code_toolset_all"}}], # The glasses can't approve tool use, so let the agent use tools without confirmation "tool_resources": {"code_toolset_all": {"permission_policy": {"type": "always_allow"}}}, } req = urllib.request.Request( f"https://{SNOWFLAKE_HOST}/api/v2/cortex/agent:run", data=json.dumps(payload, ensure_ascii=False).encode("utf-8"), headers={"Authorization": auth, "Content-Type": "application/json", "Accept": "application/json"}, method="POST", ) try: with urllib.request.urlopen(req, timeout=25) as resp: data = json.load(resp) except urllib.error.HTTPError as e: return reply(f"An error occurred in Snowflake ({e.code}).") except Exception: # Timeouts, connection failures, etc. return reply("Couldn't get a response from Snowflake. Please try again.") # content is ordered tool_use -> tool_result -> text. The text after the last tool is the answer answer = [] for item in data.get("content") or []: if item.get("type") == "text": answer.append(item.get("text", "")) elif item.get("type") in ("tool_use", "tool_result"): answer = [] return reply("\n".join(answer).strip() or "The answer came back empty. Please try rephrasing your question.") ```All it does is pull out the utterance sent from Even, send it to agent:run with code_toolset_all attached, and wrap the answer in the OpenAI format before returning it. There are three key settings:
-
Set
permission_policytoalways_allow: By default, Coding Agent asks the user for approval before using tools that change state (such as bash or snowflake_sql_execute). You can't approve anything from the glasses, so I've set it to run without confirmation (I'll cover the caveats of this setting later) - Ask for "short plain text for the glasses" in the system prompt: The glasses can only show so much text, so I ask for answers of about 70 words or fewer, with no headings or tables (just in case, the code also cuts the returned string at 350 characters)
-
Tell the agent where the data lives: If you set
DATA_LOCATION, the agent doesn't have to search through every database from scratch, which greatly shortens the time it takes to answer
The system prompt in particular comes down to personal taste, so please customize it and find an answer style that's easy to read on the glasses.
In the AWS Management Console, create the function with the following settings:
- Runtime: Python 3.13
- Environment variables:
SNOWFLAKE_HOST(your account's host name),PATH_TOKEN(a long, hard-to-guess string),DATA_LOCATION(the schema you want to analyze), and optionallyMODEL(defaults toautoif omitted; the examples in this article specifyclaude-sonnet-5-5) - Timeout: 30 seconds (the default of 3 seconds isn't enough)
- Function URL: create it with the auth type
NONE(as mentioned earlier, put API Gateway or something similar in front for production)
4. Configure the Even App
Finally, set the destination in the Even app on your phone.
As I mentioned earlier, though, Agent Configuration only shows up for Even Hub developers. So first, enable the developer features with the steps below. The web version of Even Hub has no sign-up screen, so create your account in the Even app beforehand.
- Sign in to the web version of Even Hub (
hub.evenrealities.com/login) with the same account you use in the Even app - Quit the Even app once (close it from the app switcher instead of just sending it to the background), then reopen it
According to the current Even Hub documentation, your account switches to developer mode as soon as you sign in, and the developer menu appears when you reopen the app. However, the tutorial I mentioned earlier also says the setting appears once you're approved. If it still doesn't show up after reopening the app, check your Even Hub developer registration status, too.
Hardware - Enable Developer Mode (Even Hub Documentation)
Once Agent Configuration appears, set it up as follows:
- In the Even app, open Settings → Even AI → Agent Configuration
- Enter
https://<function URL host>/<PATH_TOKEN>as the Endpoint (unlike the example in the official tutorial, don't add/v1/chat/completionsat the end) - Enter the PAT you created in step 2 as the API Key
- Tap Save & Activate

The Agent Configuration screen in the Even app
And that's it for the setup!
Talking to It
Now, let's ask Snowflake for some analysis. Say "Hey Even" to the glasses and then ask your question, and the Even app converts it to text and sends it to Lambda. And when it's hard to speak out loud, like in a meeting or on a train, you can also type your question in the Even app on your phone. Either way, the answer shows up on the glasses, which really widens the range of situations where you can use it.
For these examples, I'm asking about sample e-commerce data (500 orders covering all of 2024), with the MODEL environment variable set to claude-sonnet-5-5 (I'll explain why I picked this model later).
Note: The smart glasses display was hard to photograph, so in this article I show what appears on the glasses in code blocks. The text is the agent's answer exactly as it came back.
First, let's ask for total sales. When I asked "What were Glacier Style's total sales in 2024?", here's the answer I got:
Total sales for 2024 were about ¥97.97 million,
counting only completed orders (excluding
cancellations and returns). Including cancellations
(about ¥9.53 million) and returns (about ¥3.21
million), all orders totaled about ¥110.70 million.
Amounts are tax-inclusive order totals, and I've
assumed the currency is yen.
Amazingly, without any instructions from me, it checked the order statuses and gave me both totals: one without cancellations and returns, and one with them!
Behind the scenes, it checked the list of tables and columns and then ran the SQL below. To check the answer, I ran the same SQL in Snowsight. It matched exactly: completed orders totaled ¥97,970,139.81 (456 orders). (Note that "tax-inclusive" is the agent's own guess; the column descriptions don't say so.)
SELECT ORDER_STATUS, COUNT(*) n, SUM(TOTAL_AMOUNT) total
FROM GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA.FACT_ORDERS
WHERE YEAR(ORDER_DATETIME)=2024
GROUP BY ORDER_STATUS
| ORDER_STATUS | N | TOTAL |
|---|---|---|
| completed | 456 | 97970139.81 |
| cancelled | 29 | 9525519.80 |
| returned | 15 | 3212132.95 |
Next, I asked for a month-by-month comparison: "What were Glacier Style's best and worst months for sales in 2024?"
Based on completed orders, the best month for sales
in 2024 was September at about ¥16.28 million, and
the worst was April at about ¥3.92 million.
Cancellations and returns are excluded. Even with
all statuses included, the best month is still
September and the worst is still April.
I also asked about the breakdown by membership tier: "How many Glacier Style customers are in each membership tier, counted by customer ID?"
By membership tier, there are 31 Silver customers,
26 each for Gold and Standard, and 17 Platinum.
That's 100 customers in total, counted with
duplicate customer IDs removed.
The customer master in this sample data contains two rows for each customer, but it properly removed the duplicate customer IDs before counting! Both the monthly and the membership tier answers matched the correct values.
Each answer took about 10–15 seconds to come back. That's a bit of a pause for a conversation, but it feels a lot like asking someone to "look that up for me," and I found it plenty practical.
It Can Search the Web, Too
Coding Agent's tools include web search, so you can also ask about information outside Snowflake. The first time I tried, though, it answered "How much does the Even G2 weigh?" from the model's own knowledge without using web search. So I added one sentence to the system prompt: "Use web search when you need up-to-date information." After that, it started using web search properly (the Lambda code above already includes this sentence).
When I asked "How many grams does the Even Realities Even G2 weigh?", here's what came back:
The Even G2's official weight is about 36 g. In
hands-on measurements, MoguLive got 37.7 g, and AI
Watch got 44.4 g with prescription lenses. The
weight varies a little by lens and by unit.
The official 36 g matches the official site. This answer came back in about 7 seconds, a bit faster than the questions that aggregate data. It's great to be able to ask about both your company's data and the wider world from the same "Hey Even"!
Going Further: Combining Semantic Views and Cortex Search
So far, I've had Coding Agent build its SQL from scratch. With Cortex Agents, you can also pick the tools you give the agent to suit your purpose. This will be familiar to anyone already using Cortex Agents, but I'm covering it because it made a real difference in "time to answer" and "answer consistency" on the smart glasses, too.
- Cortex Analyst (semantic views): If you pin down definitions such as sales in a semantic view, the agent builds SQL along those definitions. It no longer needs to hunt through tables, and you can narrow the range of what can be asked
- Cortex Search: Lets the agent answer by searching documents such as FAQs and manuals
In the Lambda code, all you do is swap the tools and tool_resources passed to agent:run as shown below. Since code_toolset_all isn't used, permission_policy is no longer needed. I've also removed the ORCHESTRATION_PROMPT instruction that narrows the tools (orchestration in instructions). Note that you need to create the semantic view and the Cortex Search service in advance (here I'm using the ones that come with my sample data).
tools = [
{"tool_spec": {"type": "cortex_analyst_text_to_sql", "name": "sales",
"description": "Aggregate orders and sales for the e-commerce site"}},
{"tool_spec": {"type": "cortex_search", "name": "faq",
"description": "Search the e-commerce site's frequently asked questions (FAQ) documents"}},
]
tool_resources = {
"sales": {"semantic_view": "GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA.EC_ANALYSIS_SEMANTIC_VIEW",
"execution_environment": {"type": "warehouse", "warehouse": "COMPUTE_WH"}},
"faq": {"search_service": "GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA.SEARCH_FAQ"},
}
Also grant the glasses' role SELECT on the semantic view and USAGE on the Cortex Search service. The role needs SELECT on the tables the semantic view references as well. Step 1 already allowed every table in the schema, though, so these two grants are the only additions.
GRANT SELECT ON SEMANTIC VIEW GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA.EC_ANALYSIS_SEMANTIC_VIEW TO ROLE G2_READER;
GRANT USAGE ON CORTEX SEARCH SERVICE GLACIERSTYLE_DB.EC_ANALYTICS_SCHEMA.SEARCH_FAQ TO ROLE G2_READER;
If a tool is missing privileges, by default you don't get an error. The answer simply comes back without that tool being used (the reason shows up in the response's warnings). If an answer looks off, check the privileges first.
Here are the results with the same model (claude-sonnet-5-5):
| Question | Tool used | Time to answer |
|---|---|---|
| What were total sales in 2024? | Cortex Analyst | 10.7 seconds |
| What were the best and worst months for sales in 2024? | Cortex Analyst | 10.1 seconds |
| How much is gift wrapping? | Cortex Search | 9.5 seconds |
| How many days after delivery can I return an item? | Cortex Search | 7.2 seconds |
Every answer matched the semantic view's definitions and the FAQ content. When I asked Coding Agent the same questions, total sales took 12.2 seconds and the monthly question took 13.9 seconds. So the semantic view cut the wait by about 1.5–4 seconds. Coding Agent checked the list of tables and columns every time, so I think building SQL from the definitions saves that step.
Unlike with Coding Agent, the total sales came back as the total of all orders (¥110,707,792.56), following the semantic view's definition. Being able to decide in the definition which number counts as "sales" is another nice thing about semantic views.
As for Cortex Search, when I asked "How much is gift wrapping at Glacier Style?", it answered from the FAQ documents like this:
Gift wrapping starts at ¥330 per item (tax
included). Standard wrapping is ¥330, large items
are ¥550, and premium wrapping is ¥880. Message
cards, gift labels, and carrier bags are free.
Semantic views for questions with established data definitions, Cortex Search for questions about documents, and Coding Agent for exploratory analysis beyond that: splitting the work this way looks like a good approach.
Cortex Agents Run API (Snowflake Documentation)
Overview of semantic views (Snowflake Documentation)
Cortex Search (Snowflake Documentation)
Things to Watch Out For
This setup is a lot of fun to play with. If you're thinking about using it for work, though, there are a few points to keep in mind.
Pair always_allow with a Least-Privilege Role
always_allow lets the agent run any tool without confirmation. The official documentation cautions that you should make sure every input to the agent is trustworthy, including content pulled in through prompts and web search. It also advises running the agent with a least-privilege role that can access only the data the task needs. Keep in mind that whatever you say to the glasses becomes input to the agent as-is.
Also, the Lambda code tells the agent to use only snowflake_sql_execute and web_search, but that instruction isn't enforced. Depending on the situation, the agent may use other tools. As I mentioned earlier, apply the real restriction through the PAT's role.
Add Business Context with Semantic Views
Coding Agent infers what the data means from the structure of the tables and columns, then aggregates it. So the more business assumptions you share, such as "which orders count as sales" or "how customers are counted," the more accurate the answers get. In the membership tier example earlier, just adding "counted by customer ID" was enough to get an accurate customer count with duplicates removed.
I recommend defining this kind of business context in a semantic view, as in the Going Further section. Once you define metrics such as sales and the relationships between tables, the agent aggregates along those definitions. That gives you more accurate analysis, based on the same criteria no matter how many times you ask.
Latency, Token Usage, and Models
If you don't tell the agent where the data is, it starts by exploring the databases, so answers can take a while. The Lambda in this article gives up after 25 seconds, so I recommend giving the agent hints like DATA_LOCATION (how long the Even app is willing to wait isn't officially documented either).
And the feature that automatically tells the agent "what data lives where" is Cortex Sense, announced at Snowflake Summit 26. It automatically assembles business context from past queries, metadata, semantic views, and more, and hands it to the agent. That way, the agent knows where to look and what to query without inspecting tables and schemas one by one. Cortex Sense is coming very soon. Once it's here, it should answer questions from the glasses faster and more accurately, without you having to spell out where the data lives. I'm really looking forward to it!
Introducing Cortex Sense: Grounded Context for the Data You Never Modeled (Snowflake Blog)
Also, Coding Agent builds its answers with the same rich instructions and tool definitions as CoCo. So when the agent explores a wide range of data, the input token count can grow. That said, caching covers most of the input, and narrowing the exploration scope with DATA_LOCATION or a semantic view cuts down on wasted exploration. You can check usage in SNOWFLAKE.ACCOUNT_USAGE.CORTEX_AGENT_USAGE_HISTORY (it can take up to about an hour for usage to show up), so take a look once you start using it.
Keep in mind that latency also varies a lot by model. The official documentation recommends choosing auto for the model, so the code uses auto as the default. When I compared the same questions, though, auto and claude-sonnet-5 took about 18–25 seconds, and some questions hit the 25-second timeout.
The claude-sonnet-5-5 model I used in the examples (a Public Preview model) isn't on the official Cortex Agents model list yet. Still, it works when you specify it, and it responded faster. For production, choose a model from the official list and check the balance between latency and the Lambda timeout. Also note that Cortex Agents models run on cross-region inference, so you may need to set the account parameter CORTEX_ENABLED_CROSS_REGION.
You Can Also Connect to Cortex AI Gateway
In fact, the same setup also lets you connect to Cortex AI Gateway, which entered Preview on September 15, 2026. Cortex AI Gateway accepts inference requests for a wide range of LLMs (large language models) through a single entry point. It lets you apply access control, tracing, and cost management to those requests.
Cortex AI Gateway (Snowflake Documentation)
You only need to change three things in the Lambda code: the destination URL, the request body format, and how the answer is extracted. Claude models go to /v1/messages in the Anthropic Messages format, and all other models go to /v1/chat/completions in the OpenAI format.
# Claude models go to /v1/messages in the Anthropic Messages format (with the Gateway, you specify the model name)
req = urllib.request.Request(
f"https://{SNOWFLAKE_HOST}/api/v2/aigateways/snowflake/v1/messages",
data=json.dumps({
"model": "claude-sonnet-5-5",
"max_tokens": 600,
"system": SYSTEM_PROMPT,
"messages": [{"role": "user", "content": question}],
}, ensure_ascii=False).encode("utf-8"),
headers={"Authorization": auth, "Content-Type": "application/json", "anthropic-version": "2023-06-01"},
method="POST",
)
with urllib.request.urlopen(req, timeout=25) as resp:
data = json.load(resp)
answer = "".join(b.get("text", "") for b in data.get("content") or [] if b.get("type") == "text")
You can find the Gateway endpoint with SHOW AI GATEWAYS or DESCRIBE AI GATEWAY SNOWFLAKE. Using the Gateway requires the USAGE privilege on it, which is granted to the PUBLIC role by default. Note that the official documentation recommends short-lived tokens such as OAuth over PATs for Gateway authentication.
Comparing the two with the same question makes the difference clear:
| Coding Agent | Cortex AI Gateway | |
|---|---|---|
| What it calls | An agent (uses tools such as SQL and web search) | An LLM on its own |
| Answer to "What were total sales in 2024?" | Aggregates the data and answers with the amount | "I don't have that information, so I can't say" |
| Time to answer (measured) | 10–15 seconds (over 25 seconds with some models) | 3–4 seconds (depends on the model) |
| Best for | Data-driven analysis and checks | Quick responses such as casual chat, brainstorming, and translation |
As of now, the official documentation lists three capabilities for Cortex AI Gateway: inference, observability, and cost management. It doesn't describe any way to run tools the way Coding Agent does. Meanwhile, the July 28, 2026 announcement positions Cortex AI Gateway as a foundation for governing access not just to models, but also to tools and MCP (Model Context Protocol) servers. As those capabilities become available, you'll be able to switch between "fast LLM responses" and "data-driven analysis" from a single entry point. I expect that to open up even more possibilities.
Taking It into the Business
This was just a playful experiment, but while trying it out, I kept picturing situations where it could be useful at work.
One example is workplaces where your hands are full, such as warehouses, stores, and factory maintenance. Imagine asking "How many of this item are left in stock?" or "When was this equipment last inspected?" without stopping what you're doing, and checking the answer at the edge of your vision. You'd no longer need to pull out a device. Store staff could also check a customer's question with Cortex Search while serving them, without flipping through a manual. Salespeople could check "How much has this customer bought this fiscal year?" right before a meeting. Managers could type a question about KPIs (key performance indicators) on their phones during a meeting and quietly glance at the numbers on their glasses. As I mentioned earlier, the display is visible only to the wearer, so not interrupting the flow of the meeting is a big plus.
And these are exactly the situations where Snowflake's governance shines. If you give each person on site their own role, the same setup can "show only the data they're allowed to see." Snowflake also keeps a record of who used it and when.
Conclusion
What did you think? Just by combining the Even G2, a small Lambda function, and Coding Agent, I can now ask Snowflake for analysis by voice! SQL against tables is read-only and runs only within the role's privileges. That makes playful experiments like this one easy to take on, which I really appreciate.
Smart glasses are still a device in the middle of evolving. Even so, this experiment reminded me that the place where we use data isn't just in front of a computer screen. Going forward, I'd like to build on this in various ways: growing an agent that combines semantic views and Cortex Search, as in the Going Further section, and trying out how to split the work as Cortex AI Gateway gets updated. If I build something fun, I'll share it here on the blog again. Stay tuned!
Coding Agent can be called from your own app just by specifying a single tool. Please try challenging yourself with interesting uses of Coding Agent!
Promotion
App Runtime Explained on the Official Snowflake Japan YouTube Channel
The official Snowflake Japan YouTube channel has launched, and it includes a walkthrough of Snowflake App Runtime. If you're interested in building apps right next to your data in Snowflake, this video is for you. It covers what App Runtime is and how to get an app deployed, with a live demo. It's in Japanese, but the demo sections are easy to follow.
Snowflake What's New Updates on X
I share Snowflake What's New updates on X. Follow for the latest insights:
English Version
Snowflake What's New Bot (English Version)
Japanese Version
Snowflake's What's New Bot (Japanese Version)
Change Log
(20261011) Initial post

zenn.dev
Top comments (0)