This guide walks you through building, testing, and uploading a custom Ability to OpenHome.
- An OpenHome account at app.openhome.com
- A text editor
- Basic Python knowledge
Clone this repo (or download just the template folder):
git clone https://github.com/openhome-dev/abilities.git
cp -r abilities/templates/basic-template my-ability
cd my-abilityYou now have one file to edit: main.py.
Edit main.py. The template gives you a working starting point. Here's what you can customize:
async def run(self):
# Greet the user
await self.capability_worker.speak("Hello! What can I do for you?")
# Listen for input
user_input = await self.capability_worker.user_response()
# Do something with it (call an API, use the LLM, etc.)
response = self.capability_worker.text_to_text_response(
f"Help the user with: {user_input}"
)
# Speak the result
await self.capability_worker.speak(response)
# IMPORTANT: Always call this when done
self.capability_worker.resume_normal_flow()Note: The
register_capabilitymethod in the template is required boilerplate — copy it exactly. The platform handlesconfig.jsonautomatically at runtime; you never need to create or edit it.
See patterns.md for more examples — API calls, loops, audio playback, etc.
- Zip your
main.py(or the whole 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
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
Start a conversation with any Agent. Say one of your trigger phrases, and your Ability will activate.
- Want to share it? See Contributing to submit it to this repo
- Want to publish it? See Publishing to Marketplace
- Need more SDK functions? See CapabilityWorker Reference
- Full SDK reference? See OpenHome Ability SDK — Complete Reference
- Looking for patterns? See Patterns Cookbook