| 
1 | 1 | ---  | 
2 | 2 | title: Build with AI  | 
3 | 3 | sidebar_position: 3  | 
4 |  | -description: Learn how to set up your environment, choose the right tools, and establish workflows for effective vibe coding  | 
 | 4 | +description: Use pre-built prompts, refer to Apify docs via llms.txt, and follow best practices for effective vibe coding.  | 
5 | 5 | slug: /actors/development/quick-start/build-with-ai  | 
6 | 6 | toc_max_heading_level: 4  | 
7 | 7 | ---  | 
8 | 8 | 
 
  | 
9 |  | -**Set up your environment, choose tools, and build workflows for effective AI development.**  | 
 | 9 | +**Use pre-built prompts, reference Apify docs via llms.txt, and follow best practices to build Actors efficiently with AI coding assistants.**  | 
10 | 10 | 
 
  | 
11 | 11 | ---  | 
12 | 12 | 
 
  | 
13 |  | -import { RULES_AND_INSTRUCTIONS_PROMPT } from "@site/src/utils/ai-prompts";  | 
 | 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 copyForAI from "./images/copy-for-ai.png";  | 
15 | 17 | 
 
  | 
16 |  | -This guide explains how to enhance your development workflow by leveraging `llms.txt` and `llms-full.txt` with an AI assistant. You will learn how to provide foundational context and further refine AI's behavior with specific rules and instruction files.  | 
 | 18 | +You will learn several approaches to building Apify Actors with the help of AI coding assistants. This guide includes independent instructions, tools, and best practices that you can use individually or combine together. Each section focuses on a specific part of the process such as prompt usage, Actor templates, Apify MCP server tools, or documentation integration, so you can follow only the parts that fit your development style.  | 
17 | 19 | 
 
  | 
18 |  | -## `llms.txt` and `llms-full.txt`  | 
 | 20 | +## AI coding assistant instructions  | 
19 | 21 | 
 
  | 
20 |  | -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.  | 
 | 22 | +Use the following prompt in your AI coding assistant such as [Cursor](https://www.cursor.com/), [Claude Code](https://www.claude.com/product/claude-code) or [GitHub Copilot](https://github.com/features/copilot):  | 
21 | 23 | 
 
  | 
22 |  | -<table>  | 
23 |  | -  <thead>  | 
24 |  | -    <tr>  | 
25 |  | -      <th>File</th>  | 
26 |  | -      <th>Purpose</th>  | 
27 |  | -    </tr>  | 
28 |  | -  </thead>  | 
29 |  | -  <tbody>  | 
30 |  | -    <tr>  | 
31 |  | -      <td><code>llms.txt</code></td>  | 
32 |  | -      <td>Contains index of the docs page in Markdown, with links to all subpages in Markdown.</td>  | 
33 |  | -    </tr>  | 
34 |  | -    <tr>  | 
35 |  | -      <td>  | 
36 |  | -        <code style={{ whiteSpace: 'nowrap' }}>llms-full.txt</code>  | 
37 |  | -      </td>  | 
38 |  | -      <td>Contains a full dump of documentation in Markdown.</td>  | 
39 |  | -    </tr>  | 
40 |  | -  </tbody>  | 
41 |  | -</table>  | 
42 |  | - | 
43 |  | -### Use llms.txt and llms-full.txt  | 
44 |  | - | 
45 |  | -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.  | 
 | 24 | +<PromptButton prompt={AGENTS_PROMPT} title="Use pre-built prompt for your AI coding assistant" />  | 
46 | 25 | 
 
  | 
47 |  | -#### Cursor  | 
 | 26 | +The prompt guides AI coding assistants such as Cursor, Claude Code or GitHub Copilot to help users create and deploy an Apify Actor step by step. It walks through setting up the Actor structure, configuring all required files, installing dependencies, running it locally, logging in, and pushing it to the Apify platform and following Apify’s best practices.  | 
48 | 27 | 
 
  | 
49 |  | -Go to: **Settings -> Cursor Settings -> Indexing & Docs -> Add Doc**.  | 
 | 28 | +### Quick Start  | 
50 | 29 | 
 
  | 
51 |  | -Now, you can just provide the link to Apify `llms-full.txt`:  | 
 | 30 | +1. Create directory: `mkdir my-new-actor`  | 
 | 31 | +1. Open the directory in _Cursor_, _Claude Code_, _VS Code with GitHub Copilot_, etc.  | 
 | 32 | +1. Copy the prompt above and paste it into your AI coding assistant (Agent or Chat)  | 
 | 33 | +1. Run it, and develop your first actor with the help of AI  | 
52 | 34 | 
 
  | 
53 |  | -```markdown  | 
54 |  | -https://docs.apify.com/llms-full.txt  | 
55 |  | -```  | 
56 |  | - | 
57 |  | -  | 
58 |  | - | 
59 |  | -#### Windsurf  | 
60 |  | - | 
61 |  | -Open Windsurf Cascade, and add context via `@web`:  | 
 | 35 | +:::info Avoid copy-pasting  | 
62 | 36 | 
 
  | 
63 |  | -  | 
64 |  | - | 
65 |  | -:::note Windsurf @docs  | 
66 |  | - | 
67 |  | -Windsurf provides the `@docs` command, but you cannot customize it. It means that you cannot add your own documentation.  | 
 | 37 | +The AI will follow the guide step-by-step, and you'll avoid copy-pasting from tools like ChatGPT or Claude.  | 
68 | 38 | 
 
  | 
69 | 39 | :::  | 
70 | 40 | 
 
  | 
71 |  | -#### GitHub Copilot  | 
72 |  | - | 
73 |  | -Open Copilot Chat mode, and add context via `#fetch`:  | 
 | 41 | +## Use Actor templates with AGENTS.md  | 
74 | 42 | 
 
  | 
75 |  | -  | 
 | 43 | +All [Actor Templates](https://apify.com/templates) have AGENTS.md that will help you with AI coding. You can use the [Apify CLI](/cli/docs) to create Actors from Actor Templates.  | 
76 | 44 | 
 
  | 
77 |  | -:::note GitHub Copilot and documentation  | 
78 |  | - | 
79 |  | -Similar to Windsurf, GitHub Copilot does not provide an option for adding your own documentation.  | 
80 |  | - | 
81 |  | -:::  | 
82 |  | - | 
83 |  | -#### Ask AI  | 
84 |  | - | 
85 |  | -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:  | 
86 |  | - | 
87 |  | -  | 
 | 45 | +```bash  | 
 | 46 | +apify create  | 
 | 47 | +```  | 
88 | 48 | 
 
  | 
89 |  | -## View pages as markdown  | 
 | 49 | +If you do not have Apify CLI installed, see the [installation guide](/cli/docs/installation).  | 
90 | 50 | 
 
  | 
91 |  | -Every page in Apify documentation is available in markdown format. Simply add `.md` to any documentation URL to access the raw markdown content.  | 
 | 51 | +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.  | 
92 | 52 | 
 
  | 
93 |  | -For example:  | 
 | 53 | +## Use Apify MCP Server  | 
94 | 54 | 
 
  | 
95 |  | -- [https://docs.apify.com/platform](https://docs.apify.com/platform) → [https://docs.apify.com/platform.md](https://docs.apify.com/platform.md)  | 
96 |  | -- [https://docs.apify.com/api](https://docs.apify.com/api) → [https://docs.apify.com/api.md](https://docs.apify.com/api.md)  | 
 | 55 | +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.  | 
97 | 56 | 
 
  | 
98 |  | -This is useful when you want to:  | 
 | 57 | +:::info Use Apify MCP server configuration  | 
99 | 58 | 
 
  | 
100 |  | -- Copy documentation content for AI prompts  | 
101 |  | -- Reference exact markdown syntax  | 
102 |  | -- Access content programmatically  | 
 | 59 | +We have prepared the [Apify MCP server configuration](https://mcp.apify.com/), which you can configure for your needs.  | 
103 | 60 | 
 
  | 
104 |  | -## Add rules  | 
 | 61 | +:::  | 
105 | 62 | 
 
  | 
106 |  | -To get the most from AI Code Editors, add rules or instructions.  | 
 | 63 | +## Provide context to assistants  | 
107 | 64 | 
 
  | 
108 |  | -See how to set up rules for your AI Code Editors:  | 
 | 65 | +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.  | 
109 | 66 | 
 
  | 
110 |  | -- [Cursor Rules](https://docs.cursor.com/en/context/rules)  | 
111 |  | -- [Windsurf Rules](https://docs.windsurf.com/windsurf/cascade/memories#rules)  | 
112 |  | -- [GitHub Copilot instructions](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)  | 
 | 67 | +<img src={copyForAI} alt="Copy for LLM" width="250" />  | 
113 | 68 | 
 
  | 
114 |  | -### Apify rules and instructions  | 
 | 69 | +## Use `llms.txt` and `llms-full.txt`  | 
115 | 70 | 
 
  | 
116 |  | -The best rules and instructions are specific for individual use cases, but we provide a prompt to help you get start with creating rules and instructions:  | 
 | 71 | +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.  | 
117 | 72 | 
 
  | 
118 |  | -<PromptButton prompt={RULES_AND_INSTRUCTIONS_PROMPT}/>  | 
 | 73 | +<table>  | 
 | 74 | +  <thead>  | 
 | 75 | +    <tr>  | 
 | 76 | +      <th>File</th>  | 
 | 77 | +      <th>Purpose</th>  | 
 | 78 | +    </tr>  | 
 | 79 | +  </thead>  | 
 | 80 | +  <tbody>  | 
 | 81 | +    <tr>  | 
 | 82 | +      <td><code>llms.txt</code></td>  | 
 | 83 | +      <td>Contains index of the docs page in Markdown, with links to all subpages in Markdown.</td>  | 
 | 84 | +    </tr>  | 
 | 85 | +    <tr>  | 
 | 86 | +      <td>  | 
 | 87 | +        <code style={{ whiteSpace: 'nowrap' }}>llms-full.txt</code>  | 
 | 88 | +      </td>  | 
 | 89 | +      <td>Contains a full dump of documentation in Markdown.</td>  | 
 | 90 | +    </tr>  | 
 | 91 | +  </tbody>  | 
 | 92 | +</table>  | 
119 | 93 | 
 
  | 
120 |  | -:::info Keep your rules and instructions up to date  | 
 | 94 | +:::note Provide link to AI assistants  | 
121 | 95 | 
 
  | 
122 |  | -As the project evolves, you might introduce new things. Always make sure that your rules and instructions are up to date.  | 
 | 96 | +LLMs don't automatically discover `llms.txt` files, you need to add the link manually to improve the quality of answers.  | 
123 | 97 | 
 
  | 
124 | 98 | :::  | 
125 | 99 | 
 
  | 
 | 
0 commit comments