Hi @Alexgaillard!
Here, I share some steps for the Siri AI Developer Preview, which I typically practice to ensure tools are recognized by Siri AI.
Before going into that I'd like to point some findings regarding your questions.
Is anything else required for Siri to consider an app's tool intents on macOS (developer setting, Spotlight indexing of entities, a minimum number of donations, a skills bundle)?
Most likely, Siri AI requires your AppIntent to have the new macro @AppIntent(.tool). This is the baseline to get Siri AI recognize the intent as a tool, regardless if you'll reuse it any where else such as Shortcut or Widget.
Is the preview's tool calling supported on macOS 27.3 beta in French (France) today?
As per of Requirements for Siri AI you are all set for macOS but not iOS in EU.
Is it expected that tool intents do not appear in the Shortcuts app?
Yes, Tool intents marked with @AppIntent(.tool) are designed specifically for Siri AI's reasoning engine. Whereas, AppShortcut is used to expose intents as voice triggers or actions in the Shortcuts app. Tool intents do not necessarily appear in the Shortcuts app. It is possible to be re-used for both Siri AI and Shortcut with same AppIntent.
Is there sample code for the preview that we could run first to check our environment?
I believe there is a new one released this week. Integrating your messaging app with Apple Intelligence
Now, to elobrate more to steps I usually do let's starts with basics. First, validate the path of the loaded intents, execute this in the Terminal:
pluginkit -m -v -i com.example.intents
I encountered a situation where a different path is used than the most recent build. Specifically, this happens when an archived version (release), a DerivedData version (debug), and/or an /Application folder version are present.
Second, after a successful build, the first thing I'd usually do is terminate "the old" intents via:
pkill -f TARGET_NAME
NOTE: If the intents in a different target than your main app, use the target name of the intents, not your main app.
Third, validate the number of entities and tools of your intents via:
xcrun sirimetadataanalyzer <App.app | Metadata.appintents | extract.actionsdata>
Expected output:
X intents (N tools), Z entities
Where N represents the number of tools recognized.
Finally, ask Siri in a new conversation, "What tools do you have for APP_NAME?"
If it responds with "based on last conversation..." ignore it; the tools are not loaded. It should respond with a list of all of your tools and their descriptions.
Hints:
- Donating to Spotlight is easier when triggered by your main app, for instance, donating the identifiers of your objects once the app has launched or been modified.
- Ensure you adopt intent and entity schemas so your app's content contributes to the Spotlight semantic index and enables natural language actions.
- For complex tasks, create app skills by adding a
Skills.skillsbundle with Markdown instructions to provide additional context and guidance on how tool intents fit together, which one to prefer, or what to avoid. - Make sure you list your key shortcuts, along with their respective intents, phrases, and short titles, in your
AppShortcutsProvider to make them discoverable via Siri phrases in Shortcuts app:
struct XYZShortcutsProvider: AppShortcutsProvider {
@AppShortcutsBuilder
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: GameStatusIntent(),
phrases: [
"Game status in \(.applicationName)",
],
shortTitle: "Game Status"
)
AppShortcut(
intent: GameStartIntent(),
phrases: [
"Start xyz in \(.applicationName)",
],
shortTitle: "Start Game"
)
}
}
There is much more to explore and take advantage of, including pre-built schemas, queries, filters, and app skills. I have covered the basics that I found useful for getting started.
Hope this helps!