Skip to content

Commit 0bcde27

Browse files
authored
docs: add build with AI & LLMs doc (medusajs#12848)
1 parent e58eb5e commit 0bcde27

File tree

7 files changed

+894
-26
lines changed

7 files changed

+894
-26
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { InlineIcon } from "docs-ui"
2+
import { AiAssistent, AiAssistentLuminosity } from "@medusajs/icons"
3+
4+
export const metadata = {
5+
title: `${pageNumber} Build with AI Assistants and LLMs`,
6+
}
7+
8+
# {metadata.title}
9+
10+
In this chapter, you'll learn how you can use AI assistants and LLMs effectively in your Medusa development.
11+
12+
## AI Assistant in Documentation
13+
14+
The Medusa documentation is equipped with an AI Assistant that can answer your questions and help you build customizations with Medusa.
15+
16+
### Open the AI Assistant
17+
18+
To open the AI Assistant, either:
19+
20+
- Use the keyboard shortcut `Ctrl + I` for Windows/Linux, or `Cmd + I` for macOS.
21+
- Click the <InlineIcon Icon={AiAssistent} alt="AI Assistant" /> icon in the top right corner of the documentation.
22+
23+
You can then ask the AI Assistant any questions about Medusa, such as:
24+
25+
- What is a workflow?
26+
- How to create a product review module?
27+
- How to update Medusa?
28+
- How to fix this error?
29+
30+
The AI Assistant will provide you with relevant documentation links, code snippets, and explanations to help you with your development.
31+
32+
### Ask About Code Snippets
33+
34+
While browsing the documentation, you'll find a <InlineIcon Icon={AiAssistentLuminosity} alt="AI Assistant" /> icon in the header of code snippets. You can click this icon to ask the AI Assistant about the code snippet.
35+
36+
The AI Assistant will analyze the code and provide explanations, usage examples, and any additional information you need to understand how the code works.
37+
38+
### Ask About Documentation Pages
39+
40+
If you need more help understanding a specific documentation page, you can click the "Explain with AI Assistant" link in the page's right sidebar. This will open the AI Assistant and provide context about the current page, allowing you to ask questions related to the content.
41+
42+
### Formatting and Code Blocks
43+
44+
In your questions to the AI Assistant, you can format code blocks by wrapping them in triple backticks (```). For example:
45+
46+
~~~markdown
47+
```
48+
console.log("Hello, World!")
49+
```
50+
~~~
51+
52+
You can add new lines using the `Shift + Enter` shortcut.
53+
54+
---
55+
56+
## Plain Text Documentation
57+
58+
The Medusa documentation is available in plain text format, which allows LLMs and AI tools to easily parse and understand the content.
59+
60+
You can access the following plain text documentation files:
61+
62+
- [llms.txt](https://docs.medusajs.com/llms.txt) - Contains a short structure of links to important documentation pages.
63+
- [llms-full.txt](https://docs.medusajs.com/llms-full.txt) - Contains the full documentation content, including all pages and sections.
64+
- **Markdown version of any page** - You can access the Markdown version of any documentation page by appending `/index.html.md` to the page URL. For example, the plain text content of the current page is available at [https://docs.medusajs.com/learn/introduction/build-with-llms-ai/index.html.md](https://docs.medusajs.com/learn/introduction/build-with-llms-ai/index.html.md).
65+
66+
You can provide these files to your AI tools or LLM editors like [Cursor](https://docs.cursor.com/context/@-symbols/@-docs). This will help them understand the Medusa documentation and provide better assistance when building customizations or answering questions.

www/apps/book/app/learn/page.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ This documentation is split into the following sections:
156156

157157
To get started, check out the [Installation chapter](./installation/page.mdx).
158158

159-
### Using with LLM Editors
160-
161-
This documentation provides an [llms-full.txt](https://docs.medusajs.com/llms-full.txt) file to support LLM editors. To access the documentation directly from your editor and benefit from code generation, add [https://docs.medusajs.com/llms-full.txt](https://docs.medusajs.com/llms-full.txt) as a custom documentation source in your LLM editor, such as [Cursor](https://docs.cursor.com/context/@-symbols/@-docs).
162-
163159
---
164160

165161
## Useful Links

www/apps/book/generated/edit-dates.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const generatedEditDates = {
22
"app/learn/fundamentals/scheduled-jobs/page.mdx": "2024-12-09T10:51:40.570Z",
33
"app/learn/fundamentals/workflows/page.mdx": "2024-12-09T14:45:17.837Z",
44
"app/learn/deployment/page.mdx": "2025-06-20T08:36:29.097Z",
5-
"app/learn/page.mdx": "2025-05-01T15:30:08.238Z",
5+
"app/learn/page.mdx": "2025-06-27T11:39:15.941Z",
66
"app/learn/fundamentals/modules/commerce-modules/page.mdx": "2025-04-17T08:51:32.723Z",
77
"app/learn/fundamentals/workflows/retry-failed-steps/page.mdx": "2025-03-28T07:15:19.388Z",
88
"app/learn/fundamentals/workflows/workflow-hooks/page.mdx": "2024-12-09T10:44:33.781Z",
@@ -122,5 +122,6 @@ export const generatedEditDates = {
122122
"app/learn/fundamentals/workflows/errors/page.mdx": "2025-04-25T14:26:25.000Z",
123123
"app/learn/fundamentals/api-routes/override/page.mdx": "2025-05-09T08:01:24.493Z",
124124
"app/learn/fundamentals/module-links/index/page.mdx": "2025-05-23T07:57:58.958Z",
125-
"app/learn/fundamentals/module-links/index-module/page.mdx": "2025-06-19T16:02:05.665Z"
125+
"app/learn/fundamentals/module-links/index-module/page.mdx": "2025-06-19T16:02:05.665Z",
126+
"app/learn/introduction/build-with-llms-ai/page.mdx": "2025-06-27T12:07:08.147Z"
126127
}

www/apps/book/generated/sidebar.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ export const generatedSidebars = [
3838
"children": [],
3939
"chapterTitle": "1.3. Architecture",
4040
"number": "1.3."
41+
},
42+
{
43+
"loaded": true,
44+
"isPathHref": true,
45+
"type": "link",
46+
"title": "AI Assistants and LLMs",
47+
"path": "/learn/introduction/build-with-llms-ai",
48+
"children": [],
49+
"chapterTitle": "1.4. AI Assistants and LLMs",
50+
"number": "1.4."
4151
}
4252
],
4353
"chapterTitle": "1. Getting Started",

0 commit comments

Comments
 (0)