Open Source · Cortex AI Agents

Employee experience,
answered instantly

AI-powered HR & IT assistant built entirely on Snowflake Cortex. The native Cortex AI Agents API autonomously orchestrates Search and Analyst — leave balances, policy lookups, performance reviews, IT tickets, and multi-agent travel automation, all inside your governed data perimeter.

localhost:3000
Ask EX
Connected · Cortex AI Agents API
Governed
How many leave days do I have left this year?
Your FY2026 leave balance:

• Annual: 20 entitled · 8 taken · 9 available
• Sick: 10 entitled · 2 taken · 8 available
• Bereavement: 3 · 0 taken · 3 available

3 days pre-approved (May 19–21). Carry-forward deadline Dec 31.
✦ Cortex AI Agent · hr_data_analyst
Cortex Analyst → SQL · 3 rows
What's the parental leave policy?
Per Parental Leave Policy §2.1: primary caregivers receive 16 weeks fully paid; secondary caregivers 4 weeks. Phased return (50% for 4 weeks) available.
✦ Cortex AI Agent · policy_search
Cortex Search → Policy · 4 results
Ask anything about work…
100%
Inside Snowflake perimeter
5
Cortex AI components
7
Demo scenarios included
MIT
Open source license

Native Cortex AI Agents
orchestrate everything

A single REST call to /api/v2/cortex/agent:run gives the LLM two tools and lets it decide what to use — no hand-rolled routing needed.

01

Cortex AI Agents API

The LLM receives Cortex Search and Cortex Analyst as registered tools and autonomously decides which to invoke — or both — based on the employee's question. No intent classification code.

All Q&A questions
02

Cortex Search

Hybrid semantic + keyword retrieval over 12 HR policy documents. The agent calls this tool when it identifies a policy, procedure, or benefits question.

Policy questions
03

Cortex Analyst

Translates natural language to governed SQL via a YAML semantic model — leave balances, ticket counts, attrition rates, L&D budgets, and performance ratings.

Data questions
04

Action Handlers

For write operations (raise IT ticket, submit leave, log expense), the backend extracts parameters via Cortex COMPLETE and executes governed INSERTs into Snowflake — returning confirmed IDs.

Action requests

Built for enterprise
employee experience

From policy lookups to process automation — governed at the data layer, with a full audit trail on every interaction.

Leave & Time Off

Check leave balances, entitlements, carry-forward status, and pre-approved days — filtered by the requesting employee's ID. Submit leave requests directly from chat (writes to Snowflake).

Cortex Analyst + Row Policy + Action

Policy & Compliance

Searches across 12 HR policies — parental leave, RSU vesting, expense limits, mental health EAP, referral bonuses, and more — with hybrid semantic + keyword retrieval and section-level citations.

Cortex Search · 12 policy docs

IT Support

Raise IT tickets from natural language descriptions — the LLM extracts category, subcategory, and priority, then INSERTs directly into IT_TICKETS. Check open tickets and resolution status.

Cortex Search + Action → IT_TICKETS

Performance & L&D

Query H1 and Annual review status, self-ratings, manager ratings, and goal completion. Check L&D budget utilisation — annual budget, used, committed (e.g., AWS re:Invent), and remaining.

Cortex Analyst → PERFORMANCE_REVIEWS · LEARNING_BUDGET

Manager Analytics

Quarterly attrition rates, headcount trends, exit reason breakdowns, and comparison against org-wide averages — all automatically filtered to the manager's team via MANAGER_ID.

Cortex Analyst + RBAC
🌍

Multi-Agent Travel Automation ⭐

One travel request triggers five parallel agents via asyncio.gather(). Each agent works independently and reports back as it finishes — calendar conflict check, budget validation, flight booking, hotel booking, and manager approval routing — all in ~6 seconds.

📅 Calendar — 1.8s 💰 Budget — 2.8s ✈️ Flight — 3.5s 🏨 Hotel — 4.5s ✅ Approval — 5.5s
WebSocket · asyncio.gather() · TRAVEL_REQUESTS · TRAVEL_BOOKINGS · APPROVAL_REQUESTS

Everything stays
inside Snowflake

No data movement to external AI services. The Cortex AI Agents API, Cortex Search, and Cortex Analyst all run on Snowflake-managed infrastructure in your region.

SNOWFLAKE PERIMETER 👤 Employee Natural language question FastAPI Backend Action detection → Cortex Agents API Python · httpx SSE stream Cortex AI Agents /api/v2/cortex/agent:run Autonomously selects tools No manual routing needed policy_search hr_analyst JWT · Bearer token model: claude-sonnet-4 Cortex Search Hybrid retrieval 12 policy docs SEARCH_PREVIEW() Cortex Analyst NL → SQL Semantic model YAML REST API · JWT Action Handlers IT_TICKETS · LEAVE_REQUESTS · EXPENSE_REPORTS grounded answer

Seven scenarios,
real governed answers

Walk through these for a leadership demo. The app runs in demo mode (no backend needed) — or connect the backend for live Snowflake queries.

🏖
"How many leave days do I have left this year?"
Personalised leave balance filtered by EMP_ID — Annual, Sick, Bereavement, with carry-forward status. Shows generated SQL and row count.
Cortex Analyst → EMPLOYEE_LEAVE
📝
"What's the status of my H1 FY26 performance review?"
Returns current review stage (Manager Review), self-rating submitted, and last Annual FY25 result — all in one query from PERFORMANCE_REVIEWS.
Cortex Analyst → PERFORMANCE_REVIEWS
🔧
"My VPN keeps disconnecting. Please raise a ticket."
LLM extracts category (Network/VPN), priority (P3), and summary — then INSERTs into IT_TICKETS live. Returns confirmed ticket ID.
Action → IT_TICKETS (INSERT)
🎓
"How much of my L&D budget have I used?"
Joins LEARNING_BUDGET and LEARNING_DEVELOPMENT — shows $3,000 annual, $974 used, $1,799 committed (AWS re:Invent), $227 remaining with a warning.
Cortex Analyst → LEARNING_BUDGET
💼
"What benefits am I currently enrolled in?"
Queries BENEFITS_ENROLLMENT for health plan, dental, 401k, and vision — supplemented by Benefits Guide policy via Cortex Search.
Cortex Search + Analyst
📊
"Show me attrition trends for my team this year."
Manager-filtered query across ATTRITION_FACT returning quarterly rates vs org average, with voluntary vs involuntary breakdown.
Cortex Analyst → ATTRITION_FACT
Ask EX
Connected · Cortex AI Agents API
Book travel to New York May 14–17 for Q2 Engineering Summit
🌍
Travel Automation — New York, NY
5 agents · asyncio.gather() · parallel
📅
No conflicts · Blocked May 14–17
💰
Budget OK · $847 YTD of $2,500
✈️
Delta DL 412 · SFO→JFK · $342 · Confirmed
🏨
Marriott Times Sq · $189/nt · 3 nights · $567
Sent to Alex Chen · Est. ~2 hrs
Booking Summary
✈️
Flight
$342
🏨
Hotel
$567
💳
Total
$909
Ask anything about work…

Governance that your
CISO will love

Built on Snowflake Horizon — the same access controls that protect your data automatically protect every AI query.

1
Network isolation
PrivateLink / VPC · TLS 1.3 · IP allow-lists
2
Identity & access
RSA key-pair auth · SSO (SAML/OIDC) · MFA enforced
3
RBAC role hierarchy
ADMIN → APP → USER · Object-level grants per role
4
Data protection
Column masking (salary, email) · Row-access policies on every table
5
AI governance
Cortex respects RBAC · No training on your data · Horizon Catalog lineage
6
Full audit trail
Every prompt, tool call, SQL, and retrieved row logged to AUDIT.INTERACTION_LOG
What "data stays in-perimeter" means
No external model API calls. Cortex AI Agents, Search, and Analyst all run on Snowflake-managed GPUs in your region — your prompt never leaves.
No model training on your data. Snowflake contractually prohibits using customer data to train models.
Masking applies to AI queries. If salary is masked for a role, the LLM never sees the real value — it processes the masked result.
Row policies filter AI context. The Cortex Agents API cannot bypass row-level restrictions — employees only retrieve data they're authorised to see.
Every agent write is auditable. Bookings, calendar blocks, and approval requests created by agents are governed Snowflake INSERTs — traceable in INTERACTION_LOG.

Up and running
in under 30 minutes

Requires a Snowflake account (trial works), Python 3.10+, and Node.js 18+. The frontend runs in demo mode without a backend.

1
Run all nine Snowflake setup scripts in order
-- In Snowsight SQL Worksheet, run as ACCOUNTADMIN -- 01_setup_database.sql → database, roles, warehouses, RBAC -- 02_create_tables_and_data.sql → core employee tables + masking -- 03_cortex_search.sql → Cortex Search service (wait 2–3 min) -- Upload 04_semantic_model.yaml to @EX_CHATBOT.PUBLIC.SEMANTIC_MODELS -- 05_cortex_agent.sql → audit log table -- 06_new_tables.sql → reviews, L&D, benefits, expenses -- 07_extended_data.sql → 20+ employees, realistic scenario data -- 08_extended_policies.sql → 8 additional HR policy documents -- 09_travel_agents.sql → tables for multi-agent travel demo
2
Generate key pair and configure the backend
# Generate RSA key pair (required for Cortex AI Agents REST API) openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out snowflake_private_key.pem openssl rsa -in snowflake_private_key.pem -pubout -out snowflake_public_key.pem # Register public key in Snowsight (as ACCOUNTADMIN) -- ALTER USER YOU SET RSA_PUBLIC_KEY='<public-key-body>'; # Set up environment cp .env.example .env # edit with your account, user, key path python -m venv .venv && .venv/Scripts/activate python -m pip install -r backend/requirements.txt
3
Start the backend and frontend
# Terminal 1 — Backend (Cortex AI Agents + WebSocket travel endpoint) cd backend && python main.py # → http://localhost:8000/health {"status":"healthy"} # Terminal 2 — Frontend cd frontend echo "REACT_APP_API_URL=http://localhost:8000" > .env.local npm install && npm start # → http://localhost:3000 # Without .env.local → runs in demo mode (no backend required)

Ready to build your
employee experience AI?

Clone the repo, run nine SQL scripts, and you have a working Snowflake-native HR chatbot with Cortex AI Agents, multi-agent travel automation, and full governance in under 30 minutes.