Skip to content

Commit 3ca89e8

Browse files
tgberkeleyTom GotsmanElijahAhianyomasenfcarlosabadia
authored
Non first class integrations (#1662)
* python libraries * apis and files * images * Remove print statement (#241) * Do not require redis in rxconfig.py (#395) * use rx.color instead of var in icon docs page (#1019) * Revert the last two deploy workflow commits (#1308) * Revert "Fix: Remove interactive flag from deploy workflows (#1307)" This reverts commit 08d1ce0bc34058c489ac580ffde194cfcc45b4ac. * Revert "Fix: Replace --no-interactive with --interactive=false in deploy workflows (#1306)" This reverts commit 55aed9660525cdd3b477a26141ab176640590a7b. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * figma and webhooks * webhooks * webhooks * webhook * urls * rephrase the header * ruff fix * small fix * trailing space --------- Co-authored-by: Tom Gotsman <[email protected]> Co-authored-by: Elijah Ahianyo <[email protected]> Co-authored-by: Masen Furer <[email protected]> Co-authored-by: Carlos <[email protected]> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 341382c commit 3ca89e8

File tree

13 files changed

+327
-23
lines changed

13 files changed

+327
-23
lines changed
159 KB
Loading
98.3 KB
Loading

docs/ai_builder/apis.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# API Integration
2+
3+
Not every service has a first-class integration — but your app can connect to **any external API** directly. By using standard HTTP requests, you can integrate with virtually any platform, fetch or send data, and trigger workflows without needing a prebuilt connector.
4+
5+
This gives you full flexibility to work with modern REST, GraphQL, or other web APIs.
6+
7+
## What You Can Do
8+
9+
With custom API calls, your app can:
10+
- Connect to **any REST or GraphQL API** on the web.
11+
- **Send and receive data** from external services.
12+
- Trigger actions like creating records, sending messages, or fetching analytics.
13+
- Build **custom automations** and workflows around APIs.
14+
- Chain API calls with other integrations or AI actions for powerful flows.
15+
16+
## Step 1: Get API Access
17+
18+
1. Identify the service you want to connect to.
19+
2. Check its developer documentation for API access requirements.
20+
3. Obtain the necessary credentials (e.g., **API key**, **token**, or **OAuth**).
21+
4. Store credentials securely using environment variables — **never** hardcode secrets.
22+
23+
*Example:*
24+
- **API Key:** `sk-xxxxxxxxxxxxxxxx`
25+
- **Base URL:** `https://api.example.com/v1/`
26+
27+
## Step 2: Hook up with your App
28+
29+
1. In the AI Builder navigate to the `secrets` tab and add your API credentials as secrets.
30+
2. Then prompt the AI to use these secrets to do what you want and it will install the necessary libraries and set up the API calls for you.
31+
32+
## Step 3: Notes
33+
34+
* **Keep secrets safe:** Use environment variables or secret storage for API keys.
35+
* **Check rate limits:** Many APIs have request limits — build accordingly.
36+
* **Combine with AI or other integrations:** For example, fetch data via API and summarize it using an LLM.
37+
38+
39+
With API integrations, you can connect your app to **almost any modern platform or service**, giving you unlimited extensibility beyond native integrations.
40+
41+

docs/ai_builder/figma.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Integration Coming Soon!

docs/ai_builder/files.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Files
2+
3+
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.
4+
5+
This section does not cover uploading images. Check out ..... to learn more about uploading images.
6+
7+
```md alert
8+
## Supported File Types
9+
The AI Builder currently supports the following file types for upload and processing:
10+
1. `.pdf`
11+
2. `.doc`
12+
3. `.docx`
13+
4. `.xls`
14+
5. `.xlsx`
15+
6. `.ppt`
16+
7. `.pptx`
17+
8. `.odt`
18+
9. `.ods`
19+
10. `.odp`
20+
11. `.rtf`
21+
12. `.csv`
22+
13. `.txt`
23+
14. `.md`
24+
15. `.markdown`
25+
16. `.json`
26+
17. `.xml`
27+
18. `.yaml`
28+
19. `.yml`
29+
20. `.tsv`
30+
```
31+
32+
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.
33+
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.

docs/ai_builder/images.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Images
2+
3+
## Upload an image as context for AI Builder
4+
5+
To upload an image to the AI Builder that will be used as context for the AI builder to build an app that is similar to the image 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.
6+
7+
```md alert
8+
## Supported Image Types
9+
The AI Builder currently supports the following image types for upload and processing:
10+
1. `.png`
11+
2. `.jpg`
12+
3. `.jpeg`
13+
4. `.webp`
14+
5. `.gif`
15+
6. `.svg`
16+
7. `.bmp`
17+
8. `.tiff`
18+
9. `.tif`
19+
10. `.ico`
20+
```
21+
22+
23+
## Upload an image to be used within the app
24+
25+
If you want to upload an image to be used within the app, such as a company logo, then you can manually upload it to the `assets/` folder within the `code` tab, as shown below.
26+
27+
```python exec
28+
import reflex as rx
29+
from reflex_image_zoom import image_zoom
30+
```
31+
32+
```python eval
33+
rx.el.div(
34+
image_zoom(
35+
rx.image(
36+
src="/ai_builder/add_images_to_assets.webp",
37+
class_name="p-2 rounded-md h-auto",
38+
border=f"0.81px solid {rx.color('slate', 5)}",
39+
),
40+
class_name="rounded-md overflow-hidden",
41+
),
42+
class_name="w-full flex flex-col rounded-md cursor-pointer",
43+
)
44+
```
45+
46+
47+
Video uploads are not currently supported but are coming soon!

docs/ai_builder/integrations/database.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,10 @@ Database (mydatabase) - Target database name
102102
- Analyzes the database structure
103103
- Generates SQLAlchemy models
104104
- Makes schema available to the AI for queries
105+
106+
107+
```md alert
108+
# NoSQL Databases
109+
110+
NoSQL databases (e.g., MongoDB, DynamoDB) can be accessed via Python SDKs which the AI Builder can install if you prompt for it. The first class Database integration currently supports only SQL databases.
111+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Python Libraries
2+
3+
4+
Not every service or tool has a first-class integration — but your app can still connect to **any Python library** directly. By leveraging the built-in Python runtime, the AI Builder can install packages, import libraries, and call their functions from workflows or components. This gives you maximum flexibility to extend your app with the broader Python ecosystem.
5+
6+
When you ask for a certain functionality the AI Builder will first check if there is a `first-class integration` available. If not, it will `search the web` to try and find a relevant Python library to fulfill your request. If it finds one, it will install the package and ask you to set any `API keys` that are required.
7+
8+
9+
## Example Use Cases
10+
11+
### Slack
12+
13+
There is no built-in integration for Slack. But if you ask the AI Builder to send a message to a Slack channel, it will research itself the best implementation and then use the `slack_sdk` Python package to send the message.
14+
15+
16+
### Scikit-learn
17+
18+
There is no built-in integration for Scikit-learn. But if you ask the AI Builder to classify some text using scikit-learn, it will research itself the best implementation and then use the `scikit-learn` Python package to load a pre-trained model and classify the text.
19+
20+
21+
22+
23+
## Adding Custom Knowledge
24+
25+
If you are working with a specialized / less well-known library, you can add custom knowledge to help the AI Builder understand how to use it. Simply provide a brief description of the library, its purpose, and example usage in the **Knowledge** section of your app settings. This will guide the AI Builder when it attempts to call functions from that library.
26+
27+
```md alert warning
28+
# Where to find the Knowledge Section
29+
30+
![Where to find the Knowledge Section](/ai_builder/find_knowledge_tab.webp)
31+
```
32+
33+
34+
## What is Not Supported
35+
36+
There are a very small number of libraries that are not supported due to their size. For example, large machine learning frameworks like `torch` or `tensorflow` are not supported directly. In these cases, we recommend using a first-class integration that can emulate similar functionality (e.g., the Replicate integration for running ML models in the cloud).

docs/ai_builder/urls.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# URLs
2+
3+
When you **paste a URL directly into the AI Builder chat**, the AI will automatically decide how to handle it depending on your prompt.
4+
5+
You can use URLs to **copy a page’s design** or **extract its content**, without needing to set up any integration.
6+
7+
## How It Works
8+
9+
* If you say something like **“copy the design”** or **“use this layout”**, the AI will:
10+
11+
* Take a **screenshot** of the page.
12+
* Use it as a **visual reference** to recreate the UI in your app.
13+
* Allow you to **customize** the generated design afterward.
14+
15+
* 🪄 If you say something like **“get the content”**, **“scrape this page”**, or just paste the URL without mentioning design, the AI will:
16+
17+
* **Scrape the content** of the page (text, links, images, metadata).
18+
* Return it as structured data that can be used in components, workflows, or AI actions.
19+
20+
## Example Prompts
21+
22+
* “Copy the design of this page.”
23+
* “Scrape the content from this blog post.”
24+
* “Get all the product details from this URL.”
25+
* (Paste the URL alone) → AI will assume content scraping by default.
26+
27+
## Notes
28+
29+
* **Public pages only:** The AI can only process URLs that are publicly accessible.
30+
* **Editable:** Both the generated design and scraped content can be modified after processing.
31+

docs/ai_builder/webhooks.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Webhooks
2+
3+
Webhooks allow your app to **send data to external services** in real time. You provide the AI Builder with a **webhook URL** created in another platform, and it can **automatically send payloads** to that URL when workflows are triggered.
4+
5+
This is a simple and powerful way to integrate with services that support incoming webhooks, even if there’s no first-class integration.
6+
7+
## What You Can Do
8+
9+
With outgoing webhooks, your app can:
10+
11+
* **Send structured payloads** to any service that supports incoming webhooks (e.g., Slack, Zapier, Make, Discord).
12+
* **Trigger external workflows** when events happen in your app.
13+
* **Push real-time updates** to third-party systems without writing custom backend code.
14+
* Chain webhook calls with other integrations or AI actions.
15+
16+
## Step 1: Create a Webhook in the External Service
17+
18+
1. Go to the external service you want to connect (e.g., Slack, Zapier, Discord, Make).
19+
2. Create a new **incoming webhook** in that service.
20+
3. Copy the **webhook URL** it provides.
21+
22+
23+
## Step 2: Add the Webhook URL to AI Builder
24+
25+
1. In the AI Builder chat paste the **webhook URL** you created in the external service.
26+
2. You can then instruct the AI to **send data to this URL** whenever a workflow is triggered.
27+
3. Optionally define the **payload structure** (e.g., JSON body) and when it should be sent.
28+
29+
> 💡 Example: “Send user signup data to this webhook whenever a user signs up.”
30+
31+
## Step 3: Sending Payloads
32+
33+
* The AI Builder will write the code to send a `POST` request to the webhook URL with the payload you define.
34+
* The payload can include **dynamic data** from your app — such as user info, state variables, or model outputs.
35+
* You can trigger these webhook calls from buttons, events, workflows, or automations.
36+
37+
38+
## Step 4: Notes
39+
40+
* **Security:** Only use webhook URLs from trusted services — they will receive your data as-is.
41+
* **Formatting:** Make sure the payload matches the expected format of the external service.
42+
* **Chaining:** You can use multiple webhooks or combine them with other integrations.
43+
* **Use cases:** Slack alerts, CRM updates, triggering automations in Zapier or Make, notifying custom systems.
44+

0 commit comments

Comments
 (0)