This repository was archived by the owner on Apr 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
Non first class integrations #1662
Merged
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
162b680
python libraries
addfc3b
apis and files
af3cf33
images
6f726c2
Remove print statement (#241)
ElijahAhianyo d70be24
Do not require redis in rxconfig.py (#395)
masenf d7d9e5a
use rx.color instead of var in icon docs page (#1019)
carlosabadia 9018bae
Revert the last two deploy workflow commits (#1308)
devin-ai-integration[bot] 6e97d46
figma and webhooks
b8c1466
webhooks
22cb6bd
webhooks
b7f01f9
webhook
6280ce0
urls
47a072d
rephrase the header
27c9613
ruff fix
cceee4f
small fix
13e6d67
trailing space
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # API Integration | ||
|
|
||
| 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. | ||
|
|
||
| This gives you full flexibility to work with modern REST, GraphQL, or other web APIs. | ||
|
|
||
| ## What You Can Do | ||
|
|
||
| With custom API calls, your app can: | ||
| - Connect to **any REST or GraphQL API** on the web. | ||
| - **Send and receive data** from external services. | ||
| - Trigger actions like creating records, sending messages, or fetching analytics. | ||
| - Build **custom automations** and workflows around APIs. | ||
| - Chain API calls with other integrations or AI actions for powerful flows. | ||
|
|
||
| ## Step 1: Get API Access | ||
|
|
||
| 1. Identify the service you want to connect to. | ||
| 2. Check its developer documentation for API access requirements. | ||
| 3. Obtain the necessary credentials (e.g., **API key**, **token**, or **OAuth**). | ||
| 4. Store credentials securely using environment variables — **never** hardcode secrets. | ||
|
|
||
| *Example:* | ||
| - **API Key:** `sk-xxxxxxxxxxxxxxxx` | ||
| - **Base URL:** `https://api.example.com/v1/` | ||
|
|
||
| ## Step 2: Hook up with your App | ||
|
|
||
| 1. In the AI Builder navigate to the `secrets` tab and add your API credentials as secrets. | ||
| 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. | ||
|
|
||
| ## Step 3: Notes | ||
|
|
||
| * **Keep secrets safe:** Use environment variables or secret storage for API keys. | ||
| * **Check rate limits:** Many APIs have request limits — build accordingly. | ||
| * **Combine with AI or other integrations:** For example, fetch data via API and summarize it using an LLM. | ||
|
|
||
|
|
||
| With API integrations, you can connect your app to **almost any modern platform or service**, giving you unlimited extensibility beyond native integrations. | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Files | ||
|
|
||
| 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. | ||
|
|
||
| This section does not cover uploading images. Check out ..... to learn more about uploading images. | ||
|
|
||
| ```md alert | ||
| ## Supported File Types | ||
| The AI Builder currently supports the following file types for upload and processing: | ||
| 1. `.pdf` | ||
| 2. `.doc` | ||
| 3. `.docx` | ||
| 4. `.xls` | ||
| 5. `.xlsx` | ||
| 6. `.ppt` | ||
| 7. `.pptx` | ||
| 8. `.odt` | ||
| 9. `.ods` | ||
| 10. `.odp` | ||
| 11. `.rtf` | ||
| 12. `.csv` | ||
| 13. `.txt` | ||
| 14. `.md` | ||
| 15. `.markdown` | ||
| 16. `.json` | ||
| 17. `.xml` | ||
| 18. `.yaml` | ||
| 19. `.yml` | ||
| 20. `.tsv` | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Images | ||
|
|
||
| ## Upload an image as context for AI Builder | ||
|
|
||
| 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. | ||
|
|
||
| ```md alert | ||
| ## Supported Image Types | ||
| The AI Builder currently supports the following image types for upload and processing: | ||
| 1. `.png` | ||
| 2. `.jpg` | ||
| 3. `.jpeg` | ||
| 4. `.webp` | ||
| 5. `.gif` | ||
| 6. `.svg` | ||
| 7. `.bmp` | ||
| 8. `.tiff` | ||
| 9. `.tif` | ||
| 10. `.ico` | ||
| ``` | ||
|
|
||
|
|
||
| ## Upload an image to be used within the app | ||
|
|
||
| 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. | ||
|
|
||
| ```python exec | ||
| import reflex as rx | ||
| from reflex_image_zoom import image_zoom | ||
| ``` | ||
|
|
||
| ```python eval | ||
| rx.el.div( | ||
| image_zoom( | ||
| rx.image( | ||
| src="/ai_builder/add_images_to_assets.webp", | ||
| class_name="p-2 rounded-md h-auto", | ||
| border=f"0.81px solid {rx.color('slate', 5)}", | ||
| ), | ||
| class_name="rounded-md overflow-hidden", | ||
| ), | ||
| class_name="w-full flex flex-col rounded-md cursor-pointer", | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| Video uploads are not currently supported but are coming soon! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Python Libraries | ||
|
|
||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
| ## Example Use Cases | ||
|
|
||
| ### Slack | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
| ### Scikit-learn | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ## Adding Custom Knowledge | ||
|
|
||
| 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. | ||
|
|
||
| ```md alert warning | ||
| # Where to find the Knowledge Section | ||
|
|
||
|  | ||
| ``` | ||
|
|
||
|
|
||
| ## What is Not Supported | ||
|
|
||
| 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: incomplete cross-reference link placeholder
Prompt To Fix With AI