|
| 1 | +--- |
| 2 | +title: Build with AI |
| 3 | +sidebar_position: 3 |
| 4 | +description: Learn how to set up your environment, choose the right tools, and establish workflows for effective vibe coding |
| 5 | +slug: /actors/development/quick-start/build-with-ai |
| 6 | +toc_max_heading_level: 4 |
| 7 | +--- |
| 8 | + |
| 9 | +**Set up your environment, choose tools, and build workflows for effective AI development.** |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +import { RULES_AND_INSTRUCTIONS_PROMPT } from "@site/src/utils/ai-prompts"; |
| 14 | +import PromptButton from "@site/src/components/PromptButton"; |
| 15 | + |
| 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. |
| 17 | + |
| 18 | +## `llms.txt` and `llms-full.txt` |
| 19 | + |
| 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. |
| 21 | + |
| 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. |
| 46 | + |
| 47 | +#### Cursor |
| 48 | + |
| 49 | +Go to: **Settings -> Cursor Settings -> Indexing & Docs -> Add Doc**. |
| 50 | + |
| 51 | +Now, you can just provide the link to Apify `llms-full.txt`: |
| 52 | + |
| 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`: |
| 62 | + |
| 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. |
| 68 | + |
| 69 | +::: |
| 70 | + |
| 71 | +#### GitHub Copilot |
| 72 | + |
| 73 | +Open Copilot Chat mode, and add context via `#fetch`: |
| 74 | + |
| 75 | + |
| 76 | + |
| 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 | + |
| 88 | + |
| 89 | +## View pages as markdown |
| 90 | + |
| 91 | +Every page in Apify documentation is available in markdown format. Simply add `.md` to any documentation URL to access the raw markdown content. |
| 92 | + |
| 93 | +For example: |
| 94 | + |
| 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) |
| 97 | + |
| 98 | +This is useful when you want to: |
| 99 | + |
| 100 | +- Copy documentation content for AI prompts |
| 101 | +- Reference exact markdown syntax |
| 102 | +- Access content programmatically |
| 103 | + |
| 104 | +## Add rules |
| 105 | + |
| 106 | +To get the most from AI Code Editors, add rules or instructions. |
| 107 | + |
| 108 | +See how to set up rules for your AI Code Editors: |
| 109 | + |
| 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) |
| 113 | + |
| 114 | +### Apify rules and instructions |
| 115 | + |
| 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: |
| 117 | + |
| 118 | +<PromptButton prompt={RULES_AND_INSTRUCTIONS_PROMPT}/> |
| 119 | + |
| 120 | +:::info Keep your rules and instructions up to date |
| 121 | + |
| 122 | +As the project evolves, you might introduce new things. Always make sure that your rules and instructions are up to date. |
| 123 | + |
| 124 | +::: |
| 125 | + |
| 126 | +## Best practices |
| 127 | + |
| 128 | +- _Small tasks_: Don't ask AI for many tasks at once. Break complex problems into smaller pieces. Solve them step by step. |
| 129 | + |
| 130 | +- _Iterative approach_: Work iteratively with clear steps. Start with a basic implementation and gradually add complexity. |
| 131 | + |
| 132 | +- _Versioning_: Version your changes often using git. This lets you track changes, roll back if needed, and maintain a clear history. |
| 133 | + |
| 134 | +- _Security_: Don't expose API keys, secrets, or sensitive information in your code or conversations with LLM assistants. |
0 commit comments