Skip to main content
use-apify.com

Agents: guides & tutorials

Build autonomous AI agents that browse, extract, and act on web data. Tools, frameworks, and Apify integrations for reliable agent-based automation.

6 articles

View all tags

AI agents browse, extract, and act on web data without brittle, hand-coded selectors. These guides cover the frameworks, tools, and Apify integrations that make agent-based automation reliable rather than flaky.

Dependable agents need guardrails, retries, and well-defined tools, not just a clever prompt. Apify actors give agents a stable scraping capability to call. Below you will find tutorials on orchestrating agents for real extraction tasks.

Related topics

AI7 min read

AI Agent Infrastructure: Hosting, Sandboxes and GPU Costs

· 7 min read
Yassine El Haddad
Software Developer & Automation Specialist

Start with the workload your agent runs. A model API generates responses; an execution environment runs code; a browser service manages browser sessions. Your application also needs somewhere to receive requests and keep durable state.

You may need several of these services, but a browser agent calling a hosted model does not automatically need a rented GPU. This guide helps you separate those purchases and compare cost per successful task.

Proxies10 min read

Proxies for AI Agents (2026): Web Access at Machine Speed

· 10 min read
Yassine El Haddad
Software Developer & Automation Specialist

An AI agent that browses the web hits every limit a human browser does, but faster: one IP making thousands of requests looks like an attack, not a user. Proxies give each agent request a different, better-class IP address, which is what keeps agent web access alive after the first hundred fetches. For agent builders, the proxy is not an optimization. It is the difference between a demo and something that runs all week.

Agents changed the shape of web traffic. A single agent session can fan out across dozens of domains in a minute, retry aggressively on failure (a behavior LLMs are prone to), and re-fetch pages it has already seen because nobody wired up a cache. Sites answer that pattern with rate limits, datacenter-IP blocks and bot challenges. The fixes are boring and known: pool classes, rotation, sessions, caching, backoff. This page maps those onto agent architectures, names the providers that fit, and ends with a setup prompt you can hand to your own agent.

Why agents get blocked faster than scripts​

A traditional scraper is engineered restraint: polite delays, configured retries, one target at a time. An agent is improvising. Four behaviors in practice:

  • Burst fan-out. Research tasks hit many domains concurrently, all from your server's single IP.
  • Retry storms. A 403 reads as "try again" to an agent, not "back off". Ten retries in ten seconds is a self-inflicted rate limit.
  • No memory of fetches. Without caching, the same URL is fetched fresh in every context window.
  • Datacenter origin. Most agents run on cloud hosts, whose IP ranges are pre-flagged by every serious anti-bot vendor.

The result: agents meet blocks that a carefully written crawler would never trigger. The mitigation stack is the crawler's stack, adapted.

Where the proxy sits in an agent stack​

Agents reach the web through tools: HTTP fetch tools, browser automation, and increasingly MCP servers that wrap both. The proxy can enter at three layers:

  1. Environment-level. HTTP_PROXY/HTTPS_PROXY environment variables, picked up by most HTTP clients automatically. Cheapest to set up, applies to everything, including SDK calls you forgot about.
  2. Tool-level. Pass the proxy URL into each browser or fetch tool's config (Playwright proxy option, requests proxies dict). Precise control: one tool proxied, others direct.
  3. Service-level. The agent calls a scraping API or MCP server that applies its own proxy pool server-side. No proxy management in your process at all.

For agent platforms, layer 3 is increasingly the default: Apify runs Actors through its own proxy groups, and scraping APIs like ScraperAPI apply their pools before your request ever leaves. Layer 1 and 2 matter when you control the runtime and want the cost control of your own pool.

Choosing the proxy class for agent workloads​

WorkloadClassWhy
Fetching public APIs, docs, feedsdatacentercheap ($0.30-$0.60/GB), fast, no ASN checks to beat
Research across many websitesresidential rotationfresh IP per request, survives soft blocks
Logged-in flows, cart states, watchlistsresidential sticky or ISPone identity across the task's steps
Social and mobile-first targetsmobilecarrier IPs behind CGNAT, hardest to block
Geo-specific checksresidential with country/city targetingthe agent sees what a local user sees

Two rules of thumb. First, match the session to the agent's identity, not the request: a research agent that browses like one user should hold one sticky IP for a task; a monitoring agent that fans out should rotate per request. Second, cache: an agent that refetches because the context window forgot is paying twice for the same bytes. A content-addressed cache with a TTL (an hour for research, a day for monitoring) cuts proxy spend more than any provider switch.

Providers that fit agent workloads​

Verified November 2026; all of these appear in our other guides with full pricing:

  • DataImpulse: $1/GB residential, $0.50/GB datacenter, pay-as-you-go, traffic never expires. Fits agents precisely because agent traffic is bursty and unpredictable: no subscription to waste. A threads parameter caps concurrency so a runaway agent loop cannot eat the balance.
  • Floppydata: one balance for residential, mobile and datacenter at $1/GB (30-day validity), plus a free Cloud Browser aimed at AI agents: a managed Chromium over CDP, billing only proxy traffic. Good when the agent needs a real browser, not just an HTTP client.
  • Evomi: residential from $0.49/GB, and an MCP server that lets Claude scrape, crawl and manage proxy credentials directly. The closest to proxies-as-an-agent-tool.
  • Bright Data: the enterprise option, with its own MCP server and web data APIs for AI pipelines; our Bright Data for AI walkthrough covers the product set.
  • Apify: if the agent's jobs can run as Actors, the platform's proxy groups (residential, datacenter, SERP) come with scheduling, storage and retries included.

For the MCP angle specifically, see Bright Data's MCP server and the best MCP servers roundup. For driving scraping APIs from Claude specifically, our Claude API with Bright Data proxies guide has working code.

The cost problem agents create​

Agents burn proxy traffic in ways scripts do not: refetching without caches, fetching pages when an API endpoint would do, rendering pages headlessly for data that sits in the HTML. Three controls, in order of impact:

  1. Fetch budget. Hard cap on requests or GB per task. DataImpulse's traffic-limit setting and Evomi's PAYG balance (no expiry) both work as natural circuit breakers.
  2. Cache layer. Even a naive disk cache keyed on URL saves 30-50% of agent traffic in practice, because agents revisit the same sources.
  3. Class routing. Route doc and API fetches through datacenter at $0.50/GB, and reserve residential for the protected targets. Routing everything through residential is the most common waste.

Setup prompt: give your agent a proxy layer​

The prompt below sets up a proxy-aware fetch layer with an interview first. It works in Claude Code, Cowork, or Claude Desktop with a shell tool.

What proxies do not solve​

A proxy changes the IP. It does not change the client. Anti-bot systems score the TLS fingerprint, the HTTP/2 settings, the mouse-less interaction pattern, and the request cadence, none of which a proxy touches. Agents that get blocked through clean residential pools are usually being fingerprinted, not IP-blocked, and the fix is browser-grade tooling and human pacing, covered in our anti-detection reference. For the engineering analysis of how the WAF inspection stack is ordered, see bypass architecture for deep-packet WAFs.

Agents6 min read

browser-use: Architecting AI-Powered Web Agents (2026)

· 6 min read
Yassine El Haddad
Software Developer & Automation Specialist
Quick Answer

browser-use is an open-source Python library that gives an LLM control of a real browser (via Playwright). It runs a perceive–act loop: the page DOM is pruned and tagged, the model chooses actions like click or type, and the loop repeats until the task finishes. It shines when layouts change often and fixed selectors break; it costs more in tokens and time than traditional scrapers, and it is a poor fit for hard WAFs or huge deterministic crawls. For production, run it in containers on Apify with proxy rotation.

Traditional automation (Playwright or Puppeteer) depends on stable selectors. If a team hardcodes .submit-btn and the site renames classes, the job fails.

browser-use inverts that: you describe the goal in natural language, the library feeds a sanitized view of the page to an LLM, and the model plans clicks, typing, and extractions through Playwright.

This guide covers the architecture, where it breaks in production, and how to pair it with Apify Actors when you need cloud browsers and proxies.

Agents5 min read

Scrapling + OpenClaw: Connect Adaptive Scraping to an AI Agent

· 5 min read
Yassine El Haddad
Software Developer & Automation Specialist
Quick Answer

Scrapling gives you adaptive DOM parsing (auto-healing selectors, stealth fetchers). OpenClaw is a local gateway that routes chat channels (e.g. Slack, Discord) to an LLM. Apify runs your Scrapling code in a container with proxies and scaling, so your agent calls a stable HTTP API instead of scraping from your home IP. The usual pattern: Scrapling in an Actor → OpenClaw skill calls run-sync-get-dataset-items → you reply with trimmed markdown to the user.

Scrapling is a Python framework that uses structural similarity to keep selectors working when markup changes. OpenClaw is a local daemon that connects messaging channels to autonomous LLM workflows. Used together, you can say “check competitor prices” in chat and have the agent trigger a cloud scraper that handles WAFs and headless rendering.

This tutorial wires those pieces: Scrapling extraction inside an Apify Actor, triggered from an OpenClaw Node skill via the Apify REST API.

Agents6 min read

OpenClaw: Build a Local, Multi-Channel AI Agent in 2026

· 6 min read
Yassine El Haddad
Software Developer & Automation Specialist
Quick Answer

OpenClaw is an open-source personal AI assistant you run yourself: a Gateway on your machine routes WhatsApp, Telegram, Discord, and other channels to an LLM (e.g. Ollama locally or OpenAI / Anthropic in the cloud). It is not the model—it is the plumbing (sessions, pairing, tools, optional browser automation). NemoClaw (NVIDIA, 2026) is an enterprise-oriented secure runtime layer for running OpenClaw-class agents inside a hardened, policy-controlled environment—think governance and sandboxing on top of the same assistant idea.

Most people use hosted assistants (ChatGPT, Claude, Gemini). That is convenient, but sensitive threads, internal repos, and private DMs pass through someone else’s servers. For engineers and privacy-conscious teams, OpenClaw (successor lineage to projects sometimes referred to as Moltbot / Clawdbot) flips the model: you host the Gateway, you pick the model, and you decide which tools (files, shell, HTTP, browser, custom skills) the agent may use.

As of March 2026, OpenClaw is among the largest open-source AI assistant projects on GitHub (on the order of hundreds of thousands of stars—exact counts move quickly; check the repo for the live number). This guide explains what it is, how to run it, where it breaks down operationally, and how to pair it with Apify when local scraping is too fragile for production sites.

Agents5 min read

What Google's WebMCP Means for the Future of Web Scraping

· 5 min read
Yassine El Haddad
Software Developer & Automation Specialist

In February 2026, Google unveiled an early technical preview of WebMCP (Web Model Context Protocol), a proposed web standard incubated by the W3C Web Machine Learning Community Group in collaboration with Microsoft. Introduced in Chrome 146 Canary, its architecture proposes a radical shift: rather than forcing AI agents to parse opaque DOM structures via CSS selectors, websites explicitly declare deterministic API endpoints that local agents can execute.

If adopted, WebMCP fundamentally alters the economics of web data extraction. This technical analysis explores how the protocol operates, its architectural failure modes, and what data engineers must build to maintain extraction pipelines through to 2030.

Guides on this site

Frequently asked questions

Frequently Asked Questions

An AI agent can autonomously research companies, compile competitor intelligence, find and qualify leads from public directories, monitor news and surface relevant stories, or navigate multi-step websites that require login or pagination — all without step-by-step instructions. You describe the goal; the agent plans and executes. Results arrive as structured data, not as tabs left open in a browser.

Expose a web scraping tool to the agent — either the Apify MCP server (which lets Claude and other assistants call actors directly) or a custom tool that wraps the Apify REST API. Define allowed domains, output schema, and maximum iterations to keep costs and scope predictable. Start with a narrow task before letting the agent plan freely.

LangGraph for stateful multi-step workflows, CrewAI for multi-agent collaboration, and LangChain for simpler pipelines are the most adopted in 2025. Apify integrates with all three. For non-developers, Claude with the Apify MCP server gives agent-like capabilities in a chat interface without writing framework code.

Cost scales with tokens used per task step, number of iterations, and browser time for headless scraping. Agents that loop autonomously can spend 5–20x more than a single deterministic scraper on the same data. Cap iteration limits, cache HTML between steps, and batch LLM calls where possible. Many production teams use agents only for the ambiguous long-tail and keep bulk extraction deterministic.