Skip to main content
This example shows how to build a restaurant discovery agent using Upsonic’s Agent with the built-in ApifyTools. Ask it anything like “cheap falafel in Kadıköy” or “vegan brunch in Cihangir” and it searches Google Maps via Apify, interprets the results, and saves a curated list to Markdown.

Overview

The agent has three components:
  1. Agent — LLM-driven agent that orchestrates the search and formats results
  2. ApifyTools — Built-in Upsonic toolkit wrapping the Apify API; registers the compass/crawler-google-places Actor as a callable tool and automatically exposes its full input schema to the agent
  3. Task — Natural language query describing what and where to find

Project Structure

Environment Variables

Get your free Apify API keySign up at console.apify.com, navigate to Settings → Integrations, and copy your Personal API token. No credit card required to get started.

Installation

Complete Implementation

main.py

requirements.txt

How It Works

Sample Output

Apify Actor Used

ApifyTools fetches the Actor’s input schema automatically so the agent always knows which parameters to pass. See the Upsonic Apify integration docs for full configuration options.

Customization

Change the query

Edit the Task in main.py:

Swap the Actor

The Google Maps Actor is one of thousands available on the Apify Store. Change the actors field to use any other Actor:

Adjust result count

Use a different model

Key Features

Notes

Each run typically takes 60–90 seconds as the Google Maps Actor needs time to crawl. Keep maxCrawledPlacesPerSearch at 10 or below — more results can exceed the model’s context limit.
  • Apify’s free tier is sufficient for several searches
  • Output is saved as results.md in the current directory
  • Store API keys in .env — never hardcode them in source files

Repository

View the full example: Apify Restaurant Scout