-
Notifications
You must be signed in to change notification settings - Fork 179
docs: add agent onboarding page #2369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lukas-bekr
wants to merge
1
commit into
apify:master
Choose a base branch
from
lukas-bekr:add-agent-onboarding-page
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+224
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,224 @@ | ||
| --- | ||
| title: Agent onboarding | ||
| sidebar_label: Agent onboarding | ||
| description: Connect your AI agent to Apify. Set up the MCP server, install Agent Skills + CLI, or integrate via the API client. | ||
| sidebar_position: 0 | ||
| slug: platform/integrations/agent-onboarding | ||
| toc_max_heading_level: 3 | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
|
|
||
| Connect your AI agent or application to Apify - the platform for web scraping, data extraction, and browser automation. The typical agent workflow: find an Actor, run it, get structured data back. | ||
|
|
||
| This page explains how to integrate AI agents with the Apify platform, based on your use case. It covers how to connect, run Actors, retrieve data, and access documentation programmatically. | ||
|
|
||
| **Core concepts:** | ||
|
|
||
| - **Actors** - Serverless cloud programs that perform scraping, crawling, or automation tasks. Thousands of ready-made Actors are available in [Apify Store](https://apify.com/store). | ||
|
Check failure on line 19 in sources/platform/integrations/ai/agent-onboarding.md
|
||
| - **Datasets** - Append-only storage for structured results. Every Actor run creates a default dataset. Export as JSON, CSV, Excel, XML, or RSS. | ||
| - **API** - RESTful API at `https://api.apify.com/v2` for all platform operations. Also accessible via [MCP](./mcp.md), [CLI](/cli), and client libraries. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Sign up at [console.apify.com](https://console.apify.com/sign-up) using Google or GitHub. The free plan includes monthly platform usage credits with no credit card required. Get your API token from **[Console > Settings > Integrations](https://console.apify.com/settings/integrations)**. | ||
|
|
||
| :::tip Free exploration | ||
| The MCP server's `search-actors`, `fetch-actor-details`, and docs tools work **without authentication**. You can browse Actors and documentation without an account. | ||
| ::: | ||
|
|
||
| ## Choose your integration method | ||
|
|
||
| | Method | Best for | Auth | | ||
| |--------|----------|------| | ||
| | [MCP server](#mcp-server) | AI agents and coding assistants | OAuth or API token | | ||
| | [Agent Skills](#agent-skills) | Guided scraping workflows and Actor development | API token | | ||
| | [API client](#api-client) | Backend apps (JavaScript/Python) | API token | | ||
| | [CLI](#cli) | Building and deploying custom Actors | API token | | ||
| | [REST API](#rest-api) | Any language, HTTP integrations, no-code tools | API token | | ||
|
|
||
| ### MCP server | ||
|
|
||
| The [Apify MCP server](./mcp.md) connects your agent to the full Apify platform via the [Model Context Protocol](https://modelcontextprotocol.io/). No local installation needed for remote-capable clients. | ||
|
|
||
| **Remote (recommended)** - works with Claude Code, Cursor, VS Code, GitHub Copilot, and other remote-capable clients: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "apify": { | ||
| "url": "https://mcp.apify.com" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| OAuth handles authentication automatically - you'll be prompted to sign in on first use. | ||
|
|
||
| **Local/stdio** - for clients that only support local MCP servers (e.g. Claude Desktop): | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "apify": { | ||
| "command": "npx", | ||
| "args": ["-y", "@apify/actors-mcp-server"], | ||
| "env": { "APIFY_TOKEN": "YOUR_TOKEN" } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| For client-specific setup instructions, use the [MCP Configurator](https://mcp.apify.com) which generates ready-to-paste configs. For advanced options and tool customization, see the full [MCP server documentation](./mcp.md). | ||
|
|
||
| ### Agent Skills | ||
|
|
||
| Pre-built workflows that guide AI agents through data extraction and Actor development tasks. | ||
|
|
||
| ```bash | ||
| npx skills add apify/agent-skills | ||
| ``` | ||
|
|
||
| | Skill | What it does | | ||
| |-------|-------------| | ||
| | `apify-ultimate-scraper` | Routes web scraping requests to the right Actor for multi-step data pipelines | | ||
| | `apify-actor-development` | Guided workflow for building and deploying custom Actors | | ||
| | `apify-actorization` | Converts an existing project into an Apify Actor | | ||
| | `apify-generate-output-schema` | Auto-generates output schemas from Actor source code | | ||
|
|
||
| Skills work with Claude Code, Cursor, Gemini CLI, and OpenAI Codex. See the [skills registry](https://skills.sh/apify/agent-skills) for and details. | ||
|
|
||
| ### API client | ||
|
|
||
| For integrating Apify into your application code. | ||
|
|
||
| :::warning Package naming | ||
| `apify-client` is the API client for **calling** Actors. The `apify` package is the SDK for **building** Actors. For backend integration, install `apify-client`. | ||
| ::: | ||
|
|
||
| <Tabs> | ||
| <TabItem value="javascript" label="JavaScript / TypeScript"> | ||
|
|
||
| ```bash | ||
| npm install apify-client | ||
| ``` | ||
|
|
||
| ```typescript | ||
| import { ApifyClient } from 'apify-client'; | ||
|
|
||
| const client = new ApifyClient({ token: process.env.APIFY_TOKEN }); | ||
| const run = await client.actor('apify/web-scraper').call({ | ||
| startUrls: [{ url: 'https://example.com' }], | ||
| }); | ||
| const { items } = await client.dataset(run.defaultDatasetId).listItems(); | ||
| ``` | ||
|
|
||
| Full reference: [JavaScript API client docs](https://docs.apify.com/api/client/js) | ||
|
|
||
| </TabItem> | ||
| <TabItem value="python" label="Python"> | ||
|
|
||
| ```bash | ||
| pip install apify-client | ||
| ``` | ||
|
|
||
| ```python | ||
| import os | ||
| from apify_client import ApifyClient | ||
|
|
||
| client = ApifyClient(token=os.environ['APIFY_TOKEN']) | ||
| run = client.actor('apify/web-scraper').call( | ||
| run_input={'startUrls': [{'url': 'https://example.com'}]} | ||
| ) | ||
| items = client.dataset(run['defaultDatasetId']).list_items().items | ||
| ``` | ||
|
|
||
| Full reference: [Python API client docs](https://docs.apify.com/api/client/python) | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| ### CLI | ||
|
|
||
| For running Actors and building custom ones from the command line. | ||
|
|
||
| ```bash | ||
| npm install -g apify-cli # or: brew install apify-cli | ||
| apify login # authenticate with your API token | ||
|
|
||
| # Discover Actors | ||
| apify actors info apify/web-scraper --readme # get Actor README | ||
| apify actors info apify/web-scraper --input # get input schema | ||
|
|
||
| # Run an Actor and get output | ||
| apify actors call apify/web-scraper \ | ||
| -i '{"startUrls": [{"url": "https://example.com"}]}' \ | ||
| --output-dataset | ||
|
|
||
| # Build and deploy custom Actors | ||
| apify create my-actor # scaffold (JS/TS/Python) | ||
| apify run # test locally | ||
| apify push # deploy to Apify cloud | ||
| ``` | ||
|
|
||
| Full reference: [Apify CLI documentation](/cli) | ||
|
|
||
| ### REST API | ||
|
|
||
| For HTTP-native integrations or languages without a dedicated client. Base URL: `https://api.apify.com/v2`. Authenticate with `Authorization: Bearer YOUR_TOKEN` header. | ||
|
|
||
| **Quick reference:** | ||
|
|
||
| | Action | Method | Endpoint | | ||
| |--------|--------|----------| | ||
| | Search Actors in Store | `GET` | `/v2/store` | | ||
| | Get Actor details | `GET` | `/v2/acts/{actorId}` | | ||
| | Run an Actor | `POST` | `/v2/acts/{actorId}/runs` | | ||
| | Run Actor (sync, get results) | `POST` | `/v2/acts/{actorId}/run-sync-get-dataset-items` | | ||
| | Get run status | `GET` | `/v2/actor-runs/{runId}` | | ||
| | Get dataset items | `GET` | `/v2/datasets/{datasetId}/items` | | ||
|
|
||
| The sync endpoint (`run-sync-get-dataset-items`) runs an Actor and returns results in a single request (waits up to 5 minutes). Use async endpoints for longer runs. | ||
|
|
||
| Full reference: [Apify API v2](/api/v2) | ||
|
|
||
| ## Documentation access for agents | ||
|
|
||
| | Resource | How to access | | ||
| |----------|---------------| | ||
| | Specific doc page | Append `.md` to any docs URL (e.g. `docs.apify.com/platform/actors.md`) | | ||
| | Specific doc page (alt) | Request with `Accept: text/markdown` header | | ||
| | Docs index | [docs.apify.com/llms.txt](https://docs.apify.com/llms.txt) | | ||
| | Full docs (large) | [docs.apify.com/llms-full.txt](https://docs.apify.com/llms-full.txt) | | ||
| | Actor Store pages | Append `.md` to any Apify Store URL | | ||
| | MCP docs tools | `search-apify-docs`, `fetch-apify-docs` | | ||
|
|
||
| For targeted lookups, prefer `.md` URLs for specific pages or MCP docs tools over the full `llms-full.txt` file, which may be truncated by agents with limited context windows. | ||
|
|
||
| ## Frequently asked questions | ||
|
|
||
| **Which package: `apify` or `apify-client`?** | ||
| `apify-client` is for **calling** Actors from your app. `apify` is the SDK for **building** Actors on the Apify platform. These are different packages. | ||
|
|
||
| **Can I use Apify without an account?** | ||
| Partially. The MCP server lets you search Actors, read details, and browse docs without authentication. Running Actors requires a free account. | ||
|
|
||
| **How do I find the right Actor?** | ||
| Use `search-actors` via MCP, browse [Apify Store](https://apify.com/store), or ask your AI agent. Every Actor has a README with capabilities and input schema. | ||
|
|
||
| **What's the difference between MCP and Agent Skills?** | ||
| MCP connects your agent to Apify as a tool provider (search, run, get results). Agent Skills add guided workflows on top - multi-step scraping across platforms, Actor development lifecycle, and more. | ||
|
|
||
| **Can I build my own Actor?** | ||
| Yes. Install the [CLI](/cli), run `apify create`, and follow the prompts. Use the `apify-actor-development` skill for a guided workflow. Deploy with `apify push`. | ||
|
|
||
| ## Useful resources | ||
|
|
||
| - **[MCP server integration](./mcp.md)** - Tool customization, dynamic Actor discovery, and advanced config | ||
| - **[CLI documentation](/cli)** - Complete command reference | ||
| - **[API reference](/api/v2)** - All REST API endpoints | ||
| - **[API client for JavaScript](https://docs.apify.com/api/client/js)** | **[for Python](https://docs.apify.com/api/client/python)** - Client libraries | ||
| - **[Storage documentation](/platform/storage)** - Datasets, key-value stores, and request queues | ||
| - **[Build with AI](/platform/actors/development)** - Build and deploy your first Actor | ||
| - **[Framework integrations](./crewai.md)** - CrewAI, LangChain, LlamaIndex, and more | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slug format causes incorrect URL path resolution
High Severity
The
slugvalueplatform/integrations/agent-onboardingis missing a leading/and incorrectly includes theplatform/prefix. Every other doc in this directory uses an absolute slug pattern like/integrations/crewai. Since the Docusaurus docs plugin already setsrouteBasePath: 'platform', this relative slug gets resolved against the file's directory, producing a deeply nested and incorrect URL instead of the intended/platform/integrations/agent-onboarding. The correct slug is/integrations/agent-onboarding.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugbot Autofix determined this is a false positive.
The file mentioned in the bug report (agent-onboarding.md with slug 'platform/integrations/agent-onboarding') does not exist; the actual file is ai-agents.md with correct slug '/integrations/ai-agents', and git history shows all versions always had correct slug format with leading slash.
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.