What You’ll Need
- An OpenHome account at app.openhome.com
- A text editor
- Basic Python knowledge
Clone the repository and pick a template
Clone the abilities repository and copy the basic template:You now have one file to edit:
main.py — your entire Ability logic lives here.Understand the basic structure
Open
main.py. Every Ability follows this pattern:The
#{{register capability}} comment is required boilerplate — copy it exactly. The platform uses this tag to automatically register your Ability. You never need to create or edit config.json manually.Edit the run() method
The
run() method contains your Ability’s logic. Here’s the complete basic template:The Three Core Parts
Every Ability follows this pattern:Zip and upload to OpenHome
-
Zip your folder:
- Go to app.openhome.com
- Navigate to Abilities → Add Custom Ability
-
Upload your
.zipfile - Fill in the name and description
- Set your trigger words — the phrases that will activate your Ability (e.g., “help me”, “give advice”)
Trigger words are configured in the OpenHome dashboard when you upload an Ability, not in the code itself.
Test in the Live Editor
After uploading, click Live Editor on your Ability. Here you can:
- Edit files directly in the browser
- Click Start Live Test to test your Ability
- Check trigger words
- View logs in real time
- Commit changes when satisfied
Available SDK Methods
TheCapabilityWorker class provides all I/O methods for your Ability:
| Method | Type | Description |
|---|---|---|
speak(text) | async | Text-to-speech using the Agent’s default voice |
user_response() | async | Wait for user input, returns string |
run_io_loop(text) | async | Speak + listen in one call |
run_confirmation_loop(text) | async | Ask yes/no question, returns bool |
text_to_text_response(prompt, history, system_prompt) | sync | Generate LLM response (no await!) |
play_audio(file_content) | async | Play audio from bytes |
play_from_audio_file(filename) | async | Play audio file from Ability folder |
resume_normal_flow() | sync | Required - return control to Agent |
Type Signatures
Common Patterns
Next Steps
Explore Templates
Start with pre-built patterns for API calls, loops, audio, and more
API Reference
Complete SDK documentation with all methods and examples
Pattern Examples
Copy-paste examples for common use cases
Contributing Guide
Share your Ability with the OpenHome community
Important Notes
Pro Tips:
- Always log before and after API calls for easier debugging
- Use the Live Editor to test changes without re-uploading
- Check conversation history with
get_full_message_history()for context-aware responses - Use persistent file storage to remember user preferences across sessions
