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
description: Learn how to leverage Artificial Intelligence within the Bitbybit platform for enhanced coding and design workflows.
5
+
description: Supercharge your Bitbybit workflow with AI coding assistants like Claude, ChatGPT, and GitHub Copilot.
6
6
tags: [ai]
7
7
---
8
8
9
-
# Leveraging AI with Bitbybit: Enhancing Your Design and Coding Workflow
9
+
# AI-Powered 3D Development
10
10
11
-
Bitbybit is an extensive web platform for parametric coding and design, offering a wide array of tools and functionalities. Given its breadth, Artificial Intelligence (AI) can serve as a powerful co-pilot, helping you navigate its features, accelerate your development process, and unlock new creative possibilities. It's important to note that Bitbybit itself **does not provide proprietary Large Language Models (LLMs)**. Instead, we focus on seamless integration with leading third-party AI services and models, allowing you to leverage the best available technologies.
11
+
Bitbybit has 1300+ API functions across three CAD kernels. That's a lot to remember. AI coding assistants can help you write Bitbybit code faster and more accurately - if you give them the right context.
12
12
13
-
The landscape of AI technology is in a state of constant and rapid evolution. At Bitbybit, we are committed to integrating the latest and most impactful advancements. This includes exploring and incorporating:
13
+
## The Challenge
14
14
15
-
***Cutting-Edge Models:** Primarily LLMs from various providers that can understand and generate human-like text and code. These assist with tasks ranging from script generation and autocompletion to documentation and conceptual brainstorming. The open-source nature of many Bitbybit components and its extensive documentation also plays a crucial role here, as it provides a rich dataset for these foundation models to learn about Bitbybit's core APIs and functionalities, leading to more accurate and relevant AI assistance. Read more about [Our Approach to Open Source](/learn/open-source-approach).
16
-
***Model Context Protocol (MCPs):** an open standard that standardizes how AI applications, like large language models (LLMs), interact with external data sources and tools. It essentially acts as a "universal translator" allowing AI models to communicate with various systems and services. MCP facilitates seamless integration and context sharing, enabling AI models to access information and take actions beyond simple text generation. [Learn More](https://modelcontextprotocol.io/introduction)
17
-
***Specialized Coding Agents:** AI agents fine-tuned for specific programming languages or tasks, such as generating boilerplate code, debugging, or even suggesting more efficient algorithms for your Bitbybit scripts.
15
+
AI models like Claude, ChatGPT, and GitHub Copilot are trained on public code, but Bitbybit's specialized 3D/CAD APIs aren't as widely documented as mainstream libraries. This means AI assistants often:
18
16
19
-
While our "Getting Started" guides and detailed coding documentation provide the foundational knowledge for using Bitbybit, this section focuses specifically on the practical application of AI within the platform. We will explore various ways AI models can be utilized, from simple code completion and generation to more advanced collaborative design processes. We'll also provide guidance on setting up and configuring these AI tools to work with your Bitbybit environment.
17
+
- Hallucinate function names that don't exist
18
+
- Use incorrect parameter types
19
+
- Miss important patterns specific to CAD workflows
20
20
21
-
**Key Concepts You'll Encounter:**
21
+
## The Solution
22
22
23
-
***Prompt Engineering:** The art and science of crafting effective inputs (prompts) to guide AI models to produce the desired outputs. This involves being clear, concise, and providing sufficient context.
24
-
***Contextual Awareness:** How AI can leverage the context of your current project, active code files, or design intent within Bitbybit to provide more relevant and useful assistance.
25
-
***Iterative Refinement:** Using AI as a partner in an iterative process. You might generate initial ideas or code snippets with AI and then progressively refine them based on your expertise and specific project requirements.
26
-
***Vibe Coding:** An emerging concept where developers communicate their intent to an AI coding assistant in a more natural, high-level, or even abstract way—expressing the "vibe" or desired outcome rather than precise algorithmic steps. The AI then attempts to translate this "vibe" into functional code. This can speed up prototyping and exploration of ideas.
27
-
***Ethical Considerations:** Understanding the limitations, potential biases, and responsible use of AI models in your creative and technical work. This includes data privacy, intellectual property, and the reliability of AI-generated content.
23
+
We provide two ways to give AI assistants deep knowledge of our APIs:
28
24
29
-
It is crucial to remember that AI is a field characterized by its incredibly fast pace of innovation. Information, tools, and best practices can become outdated quickly. Therefore, we encourage you to approach these guides with an understanding of this dynamic environment and to check back regularly for updates and new insights. Think of this section as a living document, evolving alongside the AI technologies it describes.
25
+
1.**[Context Files](./prompt-contexts)** - Download a markdown file containing our complete API reference. Attach it to your AI conversation and get accurate code generation.
26
+
27
+
2.**[Context7 MCP](./mcp/context-7)** - Use the Model Context Protocol to give AI agents like Claude live access to our documentation.
28
+
29
+
## What You Can Do
30
+
31
+
With proper context, AI assistants can:
32
+
33
+
- Generate complete parametric models from natural language descriptions
34
+
- Scaffold new projects with correct initialization patterns
35
+
- Debug and optimize existing Bitbybit code
36
+
- Explain unfamiliar API functions
37
+
- Convert between different geometry representations
38
+
39
+
## Getting Started
40
+
41
+
**Beginners:** Download the [Full Context File](./prompt-contexts) for your engine and attach it to ChatGPT, Claude, or your preferred AI assistant.
42
+
43
+
**Developers:** Combine a [Lite Context](./prompt-contexts) with [Context7 MCP](./mcp/context-7) for the best balance of token efficiency and comprehensive documentation access.
44
+
45
+
:::tip Vibe Coding
46
+
Describe what you want in plain English - "Create a rounded box with four legs" - and let the AI figure out which Bitbybit functions to use. The context files include decision trees that help AI choose the right approach.
Modern AI assistants like Claude, Gemini, Grok, or ChatGPT are remarkably capable at writing code. However, they can struggle with specialized libraries and APIs they weren't extensively trained on. That's where **AI Prompt Contexts** come in - specially crafted documentation files that give your AI assistant deep knowledge of the Bitbybit API.
13
17
14
18
---
15
19
20
+
## Download Context Files
21
+
22
+
Choose the context file that matches your 3D rendering engine. **Right-click and "Save As"** to download, or open and copy the content.
-**Full Context** - Best for beginners. Includes explanations, setup guides, and complete API reference.
68
+
-**Lite Context** - Best for experienced developers. Minimal size, just API definitions with abbreviated notation.
69
+
:::
70
+
71
+
---
72
+
16
73
## What Are AI Prompt Contexts?
17
74
18
75
An AI Prompt Context is a markdown file designed to be attached to conversations with AI coding assistants. When you provide this context file, the AI gains comprehensive knowledge about:
@@ -27,54 +84,30 @@ Think of it as giving your AI assistant a complete reference manual it can consu
27
84
28
85
---
29
86
30
-
## Choosing the Right Context
31
-
32
-
We offer several context variants tailored to different needs and 3D rendering engines.
33
-
34
-
### Engine-Specific Contexts
35
-
36
-
Each context file is tailored to a specific 3D rendering engine:
37
-
38
-
| Engine | Use Case |
39
-
|--------|----------|
40
-
|**BabylonJS**| Full-featured 3D engine with powerful rendering capabilities |
41
-
|**ThreeJS**| Popular, lightweight 3D library for web applications |
42
-
|**PlayCanvas**| Game engine with visual editor and runtime |
43
-
44
-
The engine-specific details matter because initialization patterns, scene management, and rendering APIs differ between engines.
45
-
46
-
### Full vs Lite Versions
47
-
48
-
For each engine, we provide two versions:
49
-
50
-
#### Full Contexts
51
-
52
-
Full contexts contain everything an AI needs to help you from scratch:
53
-
54
-
- Extensive explanations of what Bitbybit is
55
-
- Project setup guides
56
-
- Integration guides for NPM packages and browser-based runners
57
-
- Best practices for performance
58
-
- Scene setup recommendations
59
-
- Complete API reference with detailed descriptions
87
+
## How to Use Context Files
60
88
61
-
**Best for:** Beginners or developers who want comprehensive guidance.
89
+
### Step 1: Download or Copy
62
90
63
-
#### Lite Contexts
91
+
Click the download button above for your engine, then either:
92
+
-**Right-click → Save As** to download the file
93
+
- Or open the file and copy its entire content
64
94
65
-
Lite contexts strip away explanations and focus purely on API definitions. They use a compressed notation to minimize token usage.
95
+
### Step 2: Attach to Your AI Conversation
66
96
67
-
**Best for:** Experienced developers who want to set up their own custom coding rules, project preferences, or coding style guides alongside the API definitions.
97
+
Most modern AI interfaces support file attachments:
98
+
- Drag and drop the file into the chat
99
+
- Use the attachment button
100
+
- Or paste the content directly
68
101
69
-
### Monaco Editor Context (Beginner-Friendly)
102
+
### Step 3: Start Coding with AI
70
103
71
-
We provide a special context for users of our online Monaco TypeScript editor at [bitbybit.dev/app](https://bitbybit.dev/app?editor=typescript). This context:
104
+
Once attached, ask questions like:
72
105
73
-
-Focuses only on what you need when coding in the browser-based editor
74
-
-Explains pre-initialized global variables available in that environment
75
-
-Covers specific patterns required for that context
106
+
-*"Create a parametric table with adjustable legs"*
107
+
-*"Show me how to create a filleted box and export it as STEP"*
108
+
-*"Build a gear with 24 teeth and a 5mm module"*
76
109
77
-
**Perfect for:** Getting started with Bitbybit and experimenting in the online editor.
110
+
The AI will reference the context to generate accurate, working code that follows Bitbybit's recommended patterns.
78
111
79
112
---
80
113
@@ -113,60 +146,6 @@ If your AI agent cannot translate these abbreviated values, the code will not wo
113
146
114
147
---
115
148
116
-
## How to Use Prompt Context Files
117
-
118
-
### Step 1: Download the Context File
119
-
120
-
Download the appropriate markdown file from the links below or from our homepage at [bitbybit.dev](https://bitbybit.dev).
121
-
122
-
### Step 2: Attach to Your AI Conversation
123
-
124
-
Most modern AI interfaces support file attachments:
125
-
- Drag and drop the file into the chat
126
-
- Use the attachment button
127
-
- Or paste the content directly
128
-
129
-
### Step 3: Start Coding with AI
130
-
131
-
Once attached, ask questions like:
132
-
133
-
-*"Create a parametric table with adjustable legs"*
134
-
-*"Show me how to create a filleted box and export it as STEP"*
135
-
-*"Build a gear with 24 teeth and a 5mm module"*
136
-
137
-
The AI will reference the context to generate accurate, working code that follows Bitbybit's recommended patterns.
| Full | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-babylon-ai-context-v{version}.md">Download Full Context</VersionLink> |~116k tokens |
152
-
| Lite | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-babylon-no-comment-min-ai-v{version}.md">Download Lite Context</VersionLink> |~114k tokens |
153
-
154
-
### ThreeJS
155
-
156
-
| Version | Link | Size |
157
-
|---------|------|------|
158
-
| Full | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-three-ai-context-v{version}.md">Download Full Context</VersionLink> |~95k tokens |
159
-
| Lite | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-three-no-comment-min-ai-v{version}.md">Download Lite Context</VersionLink> |~82k tokens |
160
-
161
-
### PlayCanvas
162
-
163
-
| Version | Link | Size |
164
-
|---------|------|------|
165
-
| Full | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-playcanvas-ai-context-v{version}.md">Download Full Context</VersionLink> |~94k tokens |
166
-
| Lite | <VersionLinkhref="https://app.bitbybit.dev/assets/ai-prompt-context/v{version}/bitbybit-playcanvas-no-comment-min-ai-v{version}.md">Download Lite Context</VersionLink> |~82k tokens |
167
-
168
-
---
169
-
170
149
## Combining with Context7 MCP
171
150
172
151
For the best experience, we recommend combining a **Lite context** with our **[Context7 MCP Server](./mcp/context-7.md)**:
0 commit comments