Skip to content

Commit de07f04

Browse files
Alek99carlosabadia
andauthored
Generate docs llms index (#6401)
* Generate docs llms index * Add MCP docs to llms index * Order MCP docs in llms index * Move AI docs to ai route prefix * Add Reflex agent skills docs * Combine MCP and Skills sidebar tab * Fix docs warning sources * Improve AI skills docs layout * Add AI onboarding docs page * Generate full llms docs file * some fixes --------- Co-authored-by: Carlos <cutillascarlos@gmail.com>
1 parent 284a978 commit de07f04

28 files changed

Lines changed: 1107 additions & 477 deletions

File tree

docs/ai_builder/features/ide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import reflex as rx
99
```python eval
1010
rx.el.div(
1111
rx.video(
12-
url="https://www.youtube.com/embed/UAj9vUweQ5g",
12+
src="https://www.youtube.com/embed/UAj9vUweQ5g",
1313
width="100%",
1414
height="400px",
1515
),

docs/ai_builder/files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To upload a file to the AI Builder click the `📎 Attach` button and select the file you want to upload from your computer. You can also drag and drop files directly into the chat window.
44

5-
This section does not cover uploading images. Check out [Images](/docs/ai-builder/images/) to learn more about uploading images.
5+
This section does not cover uploading images. Check out [Images](/docs/ai/images/) to learn more about uploading images.
66

77
```md alert
88
## Supported File Types
@@ -31,4 +31,4 @@ The AI Builder currently supports the following file types for upload and proces
3131

3232
The files you upload will automatically be added to the `assets/` folder of your app, and the AI Builder will be able to read and process their contents as part of your prompts.
3333

34-
The maximum number of files you can upload at a time is `5`. The maximum file size for uploads is `5MB`. If you need to work with larger files, consider breaking them into smaller chunks or using external storage solutions and linking to them via APIs.
34+
The maximum number of files you can upload at a time is `5`. The maximum file size for uploads is `5MB`. If you need to work with larger files, consider breaking them into smaller chunks or using external storage solutions and linking to them via APIs.
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# AI Onboarding
2+
3+
```python exec
4+
import reflex as rx
5+
6+
7+
def _resource_card(
8+
title: str, body: str, href: str, action: str, target: str = "_self"
9+
) -> rx.Component:
10+
return rx.el.a(
11+
rx.el.div(
12+
rx.el.h3(title, class_name="text-base font-semibold text-secondary-12"),
13+
rx.el.p(body, class_name="text-sm leading-6 text-secondary-11"),
14+
rx.el.div(action, class_name="text-sm font-semibold text-primary-10"),
15+
class_name="flex h-full flex-col gap-2 rounded-lg border border-secondary-a4 bg-white-1 p-4 transition-colors hover:bg-secondary-2 shadow-xs",
16+
),
17+
href=href,
18+
target=target,
19+
class_name="no-underline",
20+
)
21+
22+
23+
def onboarding_resources() -> rx.Component:
24+
return rx.el.div(
25+
_resource_card(
26+
"Docs for Agents",
27+
"Give your agent current Reflex documentation as Markdown, llms.txt, or structured MCP context.",
28+
"/llms.txt",
29+
"Open llms.txt",
30+
target="_blank",
31+
),
32+
_resource_card(
33+
"MCP",
34+
"Connect supported AI tools to Reflex documentation and component information through MCP.",
35+
"/ai/integrations/mcp-overview/",
36+
"View MCP overview",
37+
),
38+
_resource_card(
39+
"Skills",
40+
"Install Reflex Agent Skills so assistants follow Reflex-specific workflows for docs, setup, and process management.",
41+
"/ai/integrations/skills/",
42+
"Install skills",
43+
),
44+
_resource_card(
45+
"Reflex Build",
46+
"Use Reflex Build when you want an AI-native environment for creating, editing, previewing, and shipping apps.",
47+
"/ai/overview/best-practices/",
48+
"Read best practices",
49+
),
50+
class_name="grid grid-cols-1 gap-3 md:grid-cols-2 my-6",
51+
)
52+
```
53+
54+
Everything you need to onboard your AI coding assistant to Reflex.
55+
56+
If you are building Reflex apps with AI, combine current docs, structured MCP context, and local skills so the assistant can plan, code, run, and debug with the same assumptions as the Reflex docs.
57+
58+
```python eval
59+
onboarding_resources()
60+
```
61+
62+
## Prerequisite: Choose Your Workflow
63+
64+
You do not need an API key to read Reflex documentation. Start by deciding how your assistant will work with Reflex:
65+
66+
- For local app development, use Python 3.10 or newer and a project virtual environment.
67+
- For current documentation context, give the assistant Markdown docs or `llms.txt`.
68+
- For structured tool access, use the Reflex MCP integration.
69+
- For repeatable agent behavior, install Reflex Agent Skills.
70+
- For a browser-based AI builder, use Reflex Build.
71+
72+
## Reflex Docs for Agents
73+
74+
You can give your assistant current Reflex documentation in a few ways.
75+
76+
`````md tabs
77+
78+
## Markdown Pages
79+
80+
Every docs page has a Markdown version that agents can read directly. Add `.md` to the docs path:
81+
82+
```text
83+
https://reflex.dev/docs/ai/integrations/ai-onboarding.md
84+
```
85+
86+
Use this when an agent needs one focused page.
87+
88+
89+
## llms.txt
90+
91+
Use the generated docs index when an agent needs a broad map of Reflex docs:
92+
93+
```text
94+
https://reflex.dev/docs/llms.txt
95+
```
96+
97+
The index groups docs by section and links to agent-friendly Markdown assets.
98+
99+
100+
## MCP
101+
102+
Use MCP when your editor or agent can call tools for structured documentation and component lookup:
103+
104+
```text
105+
https://mcp.reflex.dev/mcp
106+
```
107+
108+
See the [MCP overview](/docs/ai/integrations/mcp-overview/) and [MCP installation](/docs/ai/integrations/mcp-installation/) guides for details.
109+
110+
`````
111+
112+
## Reflex MCP
113+
114+
The Reflex MCP integration gives supported AI tools structured access to Reflex framework docs and component information. Use it when your assistant can connect to an MCP server and benefit from tool-assisted lookup while editing code.
115+
116+
```md alert warning
117+
# The Reflex MCP integration is currently only available for enterprise customers. Please [book a demo](https://reflex.dev/pricing/) to discuss access.
118+
```
119+
120+
## Reflex Agent Skills
121+
122+
Reflex Agent Skills are local instruction packs that teach AI assistants how to work with Reflex projects. They cover:
123+
124+
- Current Reflex docs and concept lookup.
125+
- Python environment setup for Reflex projects.
126+
- Reflex compile, run, restart, and debugging workflows.
127+
128+
Install the skill pack from the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository, or follow the [Skills installation guide](/docs/ai/integrations/skills/).
129+
130+
```bash
131+
npx skills add reflex-dev/agent-skills
132+
```
133+
134+
## Quick Start Prompts
135+
136+
Use these prompts to give your agent a strong starting point.
137+
138+
`````md tabs
139+
140+
## New App
141+
142+
```text
143+
Create a new Reflex app. Use current Reflex documentation, set up a Python 3.10+ virtual environment, initialize the project, and validate it with reflex compile --dry before handing it back.
144+
```
145+
146+
147+
## Existing App
148+
149+
```text
150+
Work on this existing Reflex app. First inspect the project structure and current dependencies. Use Reflex docs for current APIs, make the requested change, then run reflex compile --dry or the project's existing test command.
151+
```
152+
153+
154+
## Debugging
155+
156+
```text
157+
Debug this Reflex app. Read the error and relevant logs, identify whether the failure is in imports, state, event handlers, routing, components, or runtime setup, then apply the smallest fix and re-run validation.
158+
```
159+
160+
`````
161+
162+
## Reflex Build
163+
164+
Reflex Build is the AI-native way to create Reflex apps in the browser. Use it when you want to generate, edit, preview, and share apps without setting up a local environment first.
165+
166+
Start with the [Reflex Build best practices](/docs/ai/overview/best-practices/) guide, then use MCP and Skills when you want your local assistant to keep working with the same Reflex concepts.
167+
168+
## Recommended Validation
169+
170+
Ask your assistant to validate Reflex changes before it hands work back:
171+
172+
```bash
173+
reflex compile --dry
174+
```
175+
176+
For running apps, pair that with the process-management workflow from Reflex Agent Skills so the assistant restarts only the server process it owns.

0 commit comments

Comments
 (0)