repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | # Local Places |
| #2 | |
| #3 | This repo is a fusion of two pieces: |
| #4 | |
| #5 | - A FastAPI server that exposes endpoints for searching and resolving places via the Google Maps Places API. |
| #6 | - A companion agent skill that explains how to use the API and can call it to find places efficiently. |
| #7 | |
| #8 | Together, the skill and server let an agent turn natural-language place queries into structured results quickly. |
| #9 | |
| #10 | ## Run locally |
| #11 | |
| #12 | ```bash |
| #13 | # copy skill definition into the relevant folder (where the agent looks for it) |
| #14 | # then run the server |
| #15 | |
| #16 | uv venv |
| #17 | uv pip install -e ".[dev]" |
| #18 | uv run --env-file .env uvicorn local_places.main:app --host 0.0.0.0 --reload |
| #19 | ``` |
| #20 | |
| #21 | Open the API docs at http://127.0.0.1:8000/docs. |
| #22 | |
| #23 | ## Places API |
| #24 | |
| #25 | Set the Google Places API key before running: |
| #26 | |
| #27 | ```bash |
| #28 | export GOOGLE_PLACES_API_KEY="your-key" |
| #29 | ``` |
| #30 | |
| #31 | Endpoints: |
| #32 | |
| #33 | - `POST /places/search` (free-text query + filters) |
| #34 | - `GET /places/{place_id}` (place details) |
| #35 | - `POST /locations/resolve` (resolve a user-provided location string) |
| #36 | |
| #37 | Example search request: |
| #38 | |
| #39 | ```json |
| #40 | { |
| #41 | "query": "italian restaurant", |
| #42 | "filters": { |
| #43 | "types": ["restaurant"], |
| #44 | "open_now": true, |
| #45 | "min_rating": 4.0, |
| #46 | "price_levels": [1, 2] |
| #47 | }, |
| #48 | "limit": 10 |
| #49 | } |
| #50 | ``` |
| #51 | |
| #52 | Notes: |
| #53 | |
| #54 | - `filters.types` supports a single type (mapped to Google `includedType`). |
| #55 | |
| #56 | Example search request (curl): |
| #57 | |
| #58 | ```bash |
| #59 | curl -X POST http://127.0.0.1:8000/places/search \ |
| #60 | -H "Content-Type: application/json" \ |
| #61 | -d '{ |
| #62 | "query": "italian restaurant", |
| #63 | "location_bias": { |
| #64 | "lat": 40.8065, |
| #65 | "lng": -73.9719, |
| #66 | "radius_m": 3000 |
| #67 | }, |
| #68 | "filters": { |
| #69 | "types": ["restaurant"], |
| #70 | "open_now": true, |
| #71 | "min_rating": 4.0, |
| #72 | "price_levels": [1, 2, 3] |
| #73 | }, |
| #74 | "limit": 10 |
| #75 | }' |
| #76 | ``` |
| #77 | |
| #78 | Example resolve request (curl): |
| #79 | |
| #80 | ```bash |
| #81 | curl -X POST http://127.0.0.1:8000/locations/resolve \ |
| #82 | -H "Content-Type: application/json" \ |
| #83 | -d '{ |
| #84 | "location_text": "Riverside Park, New York", |
| #85 | "limit": 5 |
| #86 | }' |
| #87 | ``` |
| #88 | |
| #89 | ## Test |
| #90 | |
| #91 | ```bash |
| #92 | uv run pytest |
| #93 | ``` |
| #94 | |
| #95 | ## OpenAPI |
| #96 | |
| #97 | Generate the OpenAPI schema: |
| #98 | |
| #99 | ```bash |
| #100 | uv run python scripts/generate_openapi.py |
| #101 | ``` |
| #102 |