# Lorelai Agent

Semantic view definitions and agent spec for the Lorelai Cortex Agent, uploaded to Snowflake stages:
- `lorelai_Agent.dev.SEMANTIC_VIEWS_STAGE` (semantic views)
- `LORELAI_AGENT.DEV.AGENT_SPECS_STAGE` (agent spec)

## Contents

- `semantic_views/` - YAML semantic view definitions:
  - `artist_performance_semantic_view.yaml`
  - `charts_semantic_view.yaml`
  - `playlists_semantic_view.yaml`
  - `social_stats_semantic_view.yaml`
  - `tadas_semantic_view.yaml`
  - `tiktok_semantic_view.yaml`
  - `track_sos_metrics_semantic_view.yaml`
- `agent_spec/` - Agent specification:
  - `my_agent_spec.json`

## Prerequisites

- [Snowflake CLI](https://docs.snowflake.com/en/developer-guide/snowflake-cli/index) (`snow`) installed
- `fansifter_engineering` connection configured in your `~/.snowflake/config.toml`
- The role used should have the same privileges as `DEV_ENGINEERING`

## Usage

Upload all semantic views and agent spec to the stage:

```bash
./upload_semantic_views.sh
```

This uploads all YAML files from `semantic_views/` to `@lorelai_Agent.dev.SEMANTIC_VIEWS_STAGE` and `my_agent_spec.json` from `agent_spec/` to `@LORELAI_AGENT.DEV.AGENT_SPECS_STAGE` using `snow stage copy` with `--overwrite` enabled.
