Repository navigation
docs(skills): add library consumer skills #1601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
72878d3
docs: add consumer agent skill and version-aware documentation
barhanc 9ef34cc
docs: highlight consumer skill installation and clarify compatibility
barhanc b5fde45
docs: link custom model exports to ExecuTorch Export Recipes
barhanc e8868eb
docs: simplify agent setup and highlight model exporter
barhanc 874df4c
docs: keep agent guidance without site infrastructure changes
barhanc 704a482
docs: generalize consumer skills and expand setup guidance
barhanc 9b45d22
docs: leave documentation maintainer README unchanged
barhanc 95aae83
docs: use verified Markdown links in consumer skill
barhanc c56cca4
docs: distribute consumer skill from shared skills repository
barhanc 8784679
docs: clarify AI Tools links
barhanc 652aa57
docs: show agent setup in a README tip
barhanc 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
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
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
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,51 @@ | ||
| --- | ||
| title: AI Tools | ||
| slug: /fundamentals/ai-tools | ||
| description: 'Use React Native ExecuTorch with a coding agent: choose ready-to-use models and hooks, bring your own .pte, and retrieve documentation for the installed version.' | ||
| --- | ||
|
|
||
| # AI Tools | ||
|
|
||
| React Native ExecuTorch gives your coding agent two starting points: | ||
|
|
||
| - **Use a ready-made task.** Choose a [pre-exported model](./04-supported-models.md) and a task hook | ||
| for chat, vision, speech or embeddings. The task handles model loading, preprocessing, inference | ||
| and postprocessing; the hook manages downloads and React lifecycle. | ||
| - **Bring your own model.** [Export a compatible `.pte`](../03-core-and-advanced/07-exporting-custom-models.md), | ||
| inspect its schema, and reuse a built-in task if its contract fits. Otherwise build a custom | ||
| TypeScript pipeline using [models and tensors](../03-core-and-advanced/02-models-and-tensors.md), | ||
| [schema validation](../03-core-and-advanced/03-schema-validation.md) and | ||
| [worklets](../03-core-and-advanced/06-worklets-and-threading.md). | ||
|
|
||
| These paths use the same runtime. You can start with a shipped model and replace it with your own | ||
| without rewriting the application when the input/output contract stays compatible. | ||
|
|
||
| ## Consumer skill | ||
|
|
||
| The consumer skill teaches an agent how to choose between these paths, prepare a React Native app, | ||
| handle native resources, and verify model behavior. Install it from the | ||
| [Software Mansion skills repository](https://github.com/software-mansion-labs/skills). | ||
|
|
||
| ```bash | ||
| npx skills add software-mansion-labs/skills -s react-native-executorch | ||
| ``` | ||
|
|
||
| The skill is optional; the library and its documentation work independently of skill installation. | ||
|
|
||
| For existing apps, use documentation matching the installed react-native-executorch version. | ||
|
|
||
| ## A prompt to start with | ||
|
|
||
| > Create a new React Native app using the latest stable react-native-executorch release and its | ||
| > matching documentation. Help me build [describe the feature]. Choose a pre-exported model and task | ||
| > hook if one fits; otherwise use | ||
| > [ExecuTorch Export Recipes](https://github.com/software-mansion-labs/executorch-export-recipes) | ||
| > to export my custom model and build the mobile pipeline. Configure the required native dependencies | ||
| > and verify inference on the target device. | ||
|
|
||
| For a custom model, provide its PyTorch definition or exported `.pte`, sample inputs and expected | ||
| outputs, preprocessing/tokenizer assets, and target devices. Use | ||
| [ExecuTorch Export Recipes](https://github.com/software-mansion-labs/executorch-export-recipes) and its | ||
| agent skills for the export step, then follow | ||
| [Exporting Custom Models](../03-core-and-advanced/07-exporting-custom-models.md) to integrate and verify | ||
| the result in your app. |
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
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.
Android 8.0, are we sure about that?
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.
minSdk >= 26corresponds to Android 8.0+ (https://apilevels.com/) so currently the requirements stated are inconsistent. Other option would be to raise the minSdkVersion.Uh oh!
There was an error while loading. Please reload this page.
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.
We should check the min working version. For now, we can keep 8.0 and check the exact the actual version later on. It definitely worked on my s10+ which was Android 12, so 13 is incorrect.