Skip to content

Milind220/sate

Repository files navigation

🍽️ SATE

This repo is a set of agent skills. Nothing more.

There is no app. No backend. No framework. Just a SKILL.md file and a few thin Python scripts that an agent runs to do restaurant recommendations for you. The agent reads the skill, follows the instructions, and calls the scripts when it needs data.

That's it. Paste the prompt below into your agent's context and it knows what to do.


🤖 Agent Setup Prompt

Paste this into your agent (Claude Code project instructions, Claude Desktop, Cursor rules, etc.). This is the entire system.

# SATE — Restaurant Skill

You have access to a local restaurant recommendation system at `~/restaurant-brain/`.

This repo provides thin Python scripts in its `scripts/` directory. Use them as needed.

## Data layout

~/restaurant-brain/ config.json # home city, lat/lng, timezone, currency .env # API keys (never expose these) visits.jsonl # one JSON line per meal vetoes.jsonl # one JSON line per rejection profiles/ you.md # prose taste profile partner.md # prose taste profile


## Scripts

| Script | Args | Returns |
|--------|------|---------|
| `scripts/weather.py` | `<lat> <lng>` | `{"temp_c", "condition", "feels_like_tag"}` |
| `scripts/places_search.py` | `"<query>" [--lat --lng --radius --max --price --open-now]` | JSON array of candidates |
| `scripts/place_details.py` | `<place_id>` | Phone, hours, review snippets |
| `scripts/distance_matrix.py` | `<origin_lat,lng> <place_id> ...` | Walk/transit minutes |
| `scripts/log_append.py` | `<visits\|vetoes> '<json>'` | Appends to JSONL |
| `scripts/bulk_log.py` | `'<json_array>'` | Bulk append to visits |

## How to recommend (Mode A)

1. **Gather context** from the user: diners, meal, location, constraints.
2. **Load data**: read diner profiles, last 30 visits, last 20 vetoes, config.json.
3. **Check weather**: `weather.py <lat> <lng>` for the dining location.
4. **Search**: `places_search.py "<query>"` with location bias. Filter `open_now=true` unless planning ahead.
5. **Score candidates**: prioritize personal taste > avoid recent repeats > respect vetoes > weather bias > rating tiebreaker.
6. **Pull details** on top 3–4: `place_details.py <place_id>`. Scan review snippets for explicit price hints.
7. **Reply** with 4 scannable options. One-line why for each. Include phone as `tel:` link. Omit price if unknown.

## How to log a visit (Mode B)

1. Parse `restaurant_name`, `date`, `diners` from user's message.
2. Resolve `place_id` via `places_search.py`.
3. Append with `log_append.py visits '<json>'`. Use a Python `subprocess` wrapper — never raw shell for JSON with quotes/unicode.
4. Confirm in one line.
5. If ≥10 visits since last profile refresh, run Profile Refresh.

## Profile Refresh

Read the profile, read last 50 visits + 20 vetoes for that diner, rewrite the prose preserving section structure (Loves / Dislikes / Patterns / Vibe / Price / Notes), update the `<!-- last_refreshed ... -->` footer. Don't flatten specifics into generic claims.

## Price rules

- Google `priceLevel` → rough tier only (`$$`, `$$$`)
- Review snippet with explicit price → use exact number
- Neither available → **omit the price line entirely**
- Never invent a price

## Rules

- Don't recommend the same place twice in a row.
- Don't call Distance Matrix unless user shared coordinates.
- Don't recommend `open_now: false` unless planning ahead.
- Don't spawn LLM calls from scripts — reasoning happens in your turn.
- Match the user's tone. Be the friend with taste, not a concierge.

🚀 One-time setup (for humans)

  1. git clone this repo somewhere.
  2. Create ~/restaurant-brain/ and copy config.example.json and .env.example into it.
  3. Fill in your Google Places API key and config.
  4. Write your first profile in ~/restaurant-brain/profiles/you.md.
  5. Paste the prompt above into your agent. Done.

Dependencies: pip install -r requirements.txt into a venv. The scripts are just thin wrappers around Google Places API (New), Distance Matrix, and Open-Meteo weather.


📁 What's in the repo

├── SKILL.md                              # Full skill spec (same as the prompt above, in skill format)
├── scripts/
│   ├── places_search.py                  # Google Places API (New) — searchText
│   ├── place_details.py                  # Google Places API (New) — get place
│   ├── weather.py                        # Open-Meteo (free, no key)
│   ├── distance_matrix.py                # Google Distance Matrix
│   ├── log_append.py                     # Append one line to visits.jsonl or vetoes.jsonl
│   └── bulk_log.py                       # Bulk append to visits.jsonl
├── references/
│   ├── google-places-new-api-quirks.md   # API gotchas
│   └── runtime-environment-and-shell-patterns.md  # How to invoke without shell escaping footguns
├── profiles/
│   └── example-profile.md                # Template for diner taste profiles
├── config.example.json                   # Your city, lat/lng, timezone, currency
├── .env.example                          # API keys (copy to ~/restaurant-brain/.env)
└── requirements.txt                      # python-dotenv, requests, pytz

🔑 API costs

  • Google Places API (New): ~$7 per 1000 requests. One recommendation ≈ 1 search + 3–4 details ≈ $0.03.
  • Distance Matrix API: ~$5 per 1000 elements. Only call when user shares coordinates.
  • Open-Meteo weather: Free.

Keep your .env in ~/restaurant-brain/, never in this repo.


📝 License

MIT. Do whatever.

About

Your personal AI food concierge. Agent-powered restaurant recommendations that actually remember what you like.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors