Core principles
- One job per turn — ask one question or request one action at a time
- Tool-aware instructions — tell the agent when to call each tool and what to say while waiting
- Speakable output — write responses meant to be heard, not read
- Feature context — reference what the user sees on screen when features are active
Structure your system prompt
Tool call narration
Users hear silence during tool execution unless the agent speaks. Instruct the agent to:- Announce what it’s doing: “I’m searching for red wines under 30 euros”
- Summarize results concisely: “I found 5 options, the first is…”
- Handle empty results gracefully: “I didn’t find an exact match — want me to broaden the search?”
Feature-aware prompts
When features render UI panels, tell the agent to reference them:Language and locale
Set the scenario language in Cockpit and pass the same BCP-47 tag from the frontend:State restoration
If your experience usesstate:update checkpoints, include restoration instructions:
Testing prompts
- Test in Cockpit live page with real feature registry
- Verify tool calls trigger the correct frontend RPC
- Check behavior on timeout (slow network, empty results)
- Test interruption — user speaks while agent is talking
Anti-patterns
| Avoid | Why |
|---|---|
| Long lists read aloud | Users can’t scan audio — use UI features |
| Calling tools without narration | Creates awkward silence |
| Assuming tool success | Always handle ERROR and empty results |
| Mixing languages | Mismatched STT/TTS/prompt languages degrade quality |