You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Set up your environment, choose tools, and build workflows for effective AI development.**
9
+
**Use pre-built prompts, use Apify docs via llms.txt, and follow best practices to build Actors efficiently with AI assistants.**
10
10
11
11
---
12
12
13
13
import { AGENTS_PROMPT } from "@site/src/utils/agents-prompt";
14
14
import PromptButton from "@site/src/components/PromptButton";
15
+
import InstallMCPButton from "@site/src/components/InstallMCPButton";
16
+
import copyForLlm from "./images/copy-for-llm.png";
15
17
16
18
This guide shows you how to build Actors efficiently with AI coding assistants. You'll learn how to use pre-built instructions, integrate Apify documentation into your AI editor, and apply best practices for AI-assisted development.
17
19
18
20
## AI coding assistant instructions
19
21
20
-
Use the following prompt in your favorite AI coding assistant:
22
+
Use the following prompt in your AI coding assistant ([Cursor](https://www.cursor.com/), [Claude Code](https://www.claude.com/product/claude-code), [GitHub Copilot](https://github.com/features/copilot), etc.):
21
23
22
24
<PromptButtonprompt={AGENTS_PROMPT}title="Use pre-built prompt for your AI coding assistant" />
23
25
24
26
### Quick Start
25
27
26
28
-_Step 1_: Create directory: `mkdir my-new-actor`
27
-
-_Step 2_: Open the directory in _Cursor_, _VS Code_, etc.
29
+
-_Step 2_: Open the directory in _Cursor_, _Claude Code_, _VS Code with GitHub Copilot_, etc.
28
30
-_Step 3_: Copy the prompt above and paste it into your AI coding assistant (Agent or Chat)
29
31
-_Step 4_: Run it, and develop your first actor with the help of AI 🎉
30
32
@@ -34,9 +36,51 @@ To maximize efficiency, copy the prompt to Cursor, VS Code with GitHub Copilot,
34
36
35
37
:::
36
38
37
-
## `llms.txt` and `llms-full.txt`
39
+
## Use Actor templates with AGENTS.md
38
40
39
-
Search engines weren't built for Large Language Models (LLMs), but they needs context. That's why we've created [`llms.txt`](https://docs.apify.com/llms.txt) and [`llms-full.txt`](https://docs.apify.com/llms-full.txt) for our documentation. These files follow the [growing standard](https://llmstxt.org/) for LLMs consumption.
41
+
All [Actor Templates](https://apify.com/templates) have AGENTS.md that will help you with AI coding. If you prefer a more traditional approach, run the following command:
42
+
43
+
:::info Install Apify CLI
44
+
45
+
If you don't have Apify CLI installed, install it first. Check the [installation guide](/cli/docs/installation).
46
+
47
+
:::
48
+
49
+
```bash
50
+
apify create
51
+
```
52
+
53
+
The command above will guide you through Apify Actor initialization, where you select an Actor Template that works for you. The result is an initialized Actor (with AGENTS.md) ready for development.
54
+
55
+
## Use Apify MCP Server
56
+
57
+
The Apify MCP Server has tools to search and fetch documentation. If you set it up in your AI editor, it will help you improve the generated code by providing additional context to the AI.
58
+
59
+
Install it by clicking one of the following buttons for your AI editor.
60
+
61
+
### Cursor
62
+
63
+
<InstallMCPButtonlink="https://cursor.com/en-US/install-mcp?name=apify&config=eyJ1cmwiOiJodHRwczovL21jcC5hcGlmeS5jb20vP3Rvb2xzPWRvY3MifQ%3D%3D"label="Install in Cursor" />
64
+
65
+
### VS Code
66
+
67
+
<InstallMCPButtonlink="vscode:mcp/install?%7B%22name%22%3A%22apify%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.apify.com%2F%3Ftools%3Ddocs%22%7D"label="Install in VS Code" />
68
+
69
+
### Claude Code
70
+
71
+
```bash
72
+
claude mcp add apify https://mcp.apify.com/?tools=docs -t http
73
+
```
74
+
75
+
## Provide context to assistants
76
+
77
+
Every page in the Apify documentation has a _Copy for LLM_ button. You can use it to add additional context to your AI assistant, or even open the page in ChatGPT, Claude, or Perplexity and ask additional questions.
78
+
79
+
<imgsrc={copyForLlm}alt="Copy for LLM"width="250" />
80
+
81
+
## Use `llms.txt` and `llms-full.txt`
82
+
83
+
Search engines weren't built for Large Language Models (LLMs), but LLMs need context. That's why we've created [`llms.txt`](https://docs.apify.com/llms.txt) and [`llms-full.txt`](https://docs.apify.com/llms-full.txt) for our documentation. These files can provide additional context if you link them.
40
84
41
85
<table>
42
86
<thead>
@@ -59,66 +103,12 @@ Search engines weren't built for Large Language Models (LLMs), but they needs co
59
103
</tbody>
60
104
</table>
61
105
62
-
<!-- TODO: Consider to remove it to keep it simple... -->
63
-
64
-
### Use llms.txt and llms-full.txt
65
-
66
-
LLMs don't automatically discover `llms.txt` files, you need to add the link manually. Some tools like [Cursor](https://www.cursor.com/) provide settings for this.
67
-
68
-
#### Cursor
106
+
:::note Provide link to AI assistants
69
107
70
-
Go to: **Settings -> Cursor Settings -> Indexing & Docs -> Add Doc**.
71
-
72
-
Now, you can just provide the link to Apify `llms-full.txt`:
73
-
74
-
```markdown
75
-
https://docs.apify.com/llms-full.txt
76
-
```
77
-
78
-

79
-
80
-
#### Windsurf
81
-
82
-
Open Windsurf Cascade, and add context via `@web`:
83
-
84
-

85
-
86
-
:::note Windsurf @docs
87
-
88
-
Windsurf provides the `@docs` command, but you cannot customize it. It means that you cannot add your own documentation.
89
-
90
-
:::
91
-
92
-
#### GitHub Copilot
93
-
94
-
Open Copilot Chat mode, and add context via `#fetch`:
95
-
96
-

97
-
98
-
:::note GitHub Copilot and documentation
99
-
100
-
Similar to Windsurf, GitHub Copilot does not provide an option for adding your own documentation.
108
+
LLMs don't automatically discover `llms.txt` files, you need to add the link manually to improve the quality of answers.
101
109
102
110
:::
103
111
104
-
#### Ask AI
105
-
106
-
New to Apify? Ask questions and provide the `llms.txt` link. Popular AI models can search the web. With the right context, you get better answers:
107
-
108
-

109
-
110
-
## Use Actor Templates with instructions
111
-
112
-
TODO:
113
-
114
-
- Just mention that you can init actor using `apify create` and use it in IDE with AGENTS.md
115
-
116
-
## Provide context to assistants
117
-
118
-
TBD:
119
-
120
-
- Mention "Copy for LLM" buttons
121
-
122
112
## Best practices
123
113
124
114
-_Small tasks_: Don't ask AI for many tasks at once. Break complex problems into smaller pieces. Solve them step by step.
0 commit comments