Upsonic
Build autonomous AI agents that scrape, analyze, and act on real-world data from any Apify Actor.
Upsonic is a Python framework for building autonomous agents like OpenClaw and Claude CoWork, as well as more traditional agent systems. With built-in Apify support, your agents can use any of the thousands of Actors in Apify Store to pull live web data and act on it autonomously.
What makes this different from calling the Apify API directly:
- Automatic input schema extraction. ApifyTools fetches the full input schema of every Actor you register and exposes it directly to the LLM. The agent knows which parameters are available and how to use them, without you writing any mapping code.
- Reasoning over raw data. The agent does not just return what Apify gives it. It reads through the results, ranks them, filters based on your criteria, and explains its recommendations.
- Autonomous execution environment. Upsonic agents run in a sandboxed workspace with filesystem and shell access. They read files, write outputs, run scripts, and call Apify Actors, all within a single task.
- Personalization through context files. Drop an
AGENTS.mdinto your workspace with your preferences, constraints, or goals. The agent reads it and uses it to filter and personalize results from Apify automatically.
Building agents that need web data usually means writing custom tool functions for each source. A Google Maps tool, an Instagram tool, a job board tool. Each one needs its own API client, parameter handling, and response parsing. On top of that, scraping directly from many websites means dealing with rate limits, CAPTCHAs, and IP blocks that can break your agent's workflow mid-task.
Apify solves both problems. It provides thousands of production-ready Actors that handle anti-blocking, proxy rotation, and reliable data extraction out of the box. Upsonic's ApifyTools connects your agents to all of them through a single integration. Each Actor's input schema is automatically fetched and exposed to the LLM, so the agent fills in the right parameters based on your natural-language request.
Your agent can then process the results using the rest of the Upsonic framework: apply safety policies, store findings in memory, query a knowledge base for additional context, or write reports to its sandboxed workspace.
from upsonic import Agent, Taskfrom upsonic.tools.custom_tools.apify import ApifyToolsfrom dotenv import load_dotenvimport osload_dotenv()# ApifyTools registers the Google Maps crawler as a tool.# The agent automatically receives the Actor's full input schema,# so it knows exactly which parameters to pass based on the user's query.## actor_defaults pre-sets config that never needs to change:# - maxCrawledPlacesPerSearch: limit results to avoid token overflow# - maxImages: skip images (not needed for text output)# - outputFormats: return compact markdown instead of verbose JSON## timeout=180.0 overrides the 30s default — the Actor takes ~60-90s to run.# max_retries=0 prevents parallel duplicate runs on timeout.agent = Agent("anthropic/claude-sonnet-4-5",tools=[ApifyTools(actors=["compass/crawler-google-places"],apify_api_token=os.getenv("APIFY_API_KEY"),actor_defaults={"compass/crawler-google-places": {"maxCrawledPlacesPerSearch": 10,"maxImages": 0,"outputFormats": ["markdown"],}},timeout=180.0,max_retries=0,)],)task = Task("Tell me cheap and tasty falafel places in Kadıköy, Istanbul")agent.print_do(task)with open("results.md", "w") as f:f.write(task.response)print("\nResults saved to results.md")
The agent reads your task, infers the right parameters, runs the scrape, and returns structured results. Here is what it sends to the Actor under the hood:
searchStringsArray: ['falafel']city: KadıköycountryCode: trlanguage: enmaxReviews: 10scrapePlaceDetailPage: True
None of those were defined by you. The agent inferred them from your request and the Actor's input schema. Swap in any other Actor by changing a single line.
Project link: Apify Restaurant Scout Example
#### Best Cheap & Tasty Falafel Places in Kadıköy:### 1. Falfool Vegan House (Falafel & Hummus) 4.8/5- Price: ₺200-400- Address: Caferağa, Cemal Süreya Sok. 43a, 34710 Kadıköy- Phone: +90 537 575 58 83- Category: Falafel restaurant, Mediterranean, Middle Eastern- Why this pick: Highest rated in the area. Fully vegan menuwith strong reviews on hummus and fresh ingredients.### 2. Falafella 4.3/5- Price: ₺1-200- Address: Caferağa, Moda Cd. No:53A, Kadıköy- Hours: 11 AM - 2 AM (late night on weekends)- Why this pick: Most affordable option. Popular for falafelwraps. Open late.### 3. Nohut Falafel & Humus 4.8/5- Price: ₺200-400- Address: Osmanağa, Sakız Sk. No:22C, Kadıköy- Hours: 12 PM - 10 PM- Why this pick: Tied for highest rating. Gluten-free and veganoptions. Known for housemade hummus.
| Capability | Detail |
|---|---|
| Autonomous agents | Agents with sandboxed filesystem and shell access. They read files, write outputs, execute scripts, and call tools independently. |
| Traditional agents | Standard task-driven agents with function tools, class tools, and MCP support for structured workflows. |
| Memory | Conversation history, auto-generated session summaries, and user profile extraction across sessions. Supports SQLite, Redis, PostgreSQL, MongoDB, and more. |
| Knowledge base | RAG system with automatic document processing, embedding, and vector search. Supports Chroma, Milvus, Qdrant, Pinecone, Weaviate, FAISS, PGVector, and more. |
| Sandbox integrations | Run agent code in isolated cloud environments via E2B and Daytona, with more providers coming. |
| OCR | Built-in support for local and cloud OCR providers through a unified interface. |
| Human in the loop | Approval and review controls for agent actions before execution. |
| Built-in safety engine | Create policies, attach them to agents, and track enforcement. LLM-agnostic, works across any model provider. |
- Google Maps Scraper - Extract business data from Google Maps locations
- Google Search Scraper - Scrape Google Search results for any query
- Website Content Crawler - Crawl entire websites and extract clean text
- RAG Web Browser - Search and fetch web content optimized for LLM use
- Instagram Scraper - Scrape Instagram profiles, posts, and hashtags
- Web Scraper - General-purpose scraper with configurable page functions
