OpenHome Ability Templates
Five templates. Four ability categories. Unlimited possibilities.OpenHome ability templates are starter blueprints. They are intentionally minimal and focused on runtime architecture, not polished UX.
What OpenHome Actually Is
OpenHome runs AI agents that can trigger Python abilities. Those abilities can:- control local tools through bridge methods
- call APIs and external services
- process ambient audio in loops
- store and share state over time
- run continuously as background daemons
Ability Categories
| Category | Trigger | Lifecycle | Entry File |
|---|---|---|---|
| Skill | User hotword | Runs once, exits | main.py |
| Brain Skills | Agent brain routing | Runs on demand when brain delegates work | main.py |
| Background Daemon | Automatic on session start | Runs continuously until session end | background.py |
| Local | User or system | Runs on-device hardware | DevKit SDK |
- Brain Skills templates are still being finalized.
- Local category is under development.
Background Daemon Entry Contract
For daemon templates,background.py must be named exactly background.py.
How To Use Templates In Dashboard
- Click Create on
https://app.openhome.com/dashboard/home. - Select Agent Ability.
- Fill the Create Ability form and choose any category for your ability.
- Fill Ability Behavior, then choose the template you want.
- Click Save Ability.


Template Directory
Template README Sources
- Alarm README
- Local README
- ReadWriteFile README
- SendEmail README
- Background README
- api-template README
- basic-template README
- loop-template README
- OpenClaw README
Start Here Templates
basic-template (Skill, minimal)
Purpose: absolute minimum lifecycle implementation.
api-template (Skill, external API)
Purpose: ask user input, call API, summarize result, exit cleanly.
loop-template (Skill, long-running loop)
Purpose: interactive multi-turn skill with explicit exit words.
The Five Core Templates
1. SendEmail (Skill · Fire-and-forget)
What it demonstrates:
- one trigger, one action, one status response
- synchronous SDK call in async flow
- required handoff to
resume_normal_flow()
- collect recipient/body from user, do not hardcode
- add confirmation step before send
- secure credential handling
2. OpenHome-local (Skill · LLM-as-translator)
What it demonstrates:
- user speech to terminal command generation
- local execution bridge with
exec_local_command() - second LLM pass to explain execution result
- command allowlist / denylist
- confirmation before high-risk commands
- timeout and error boundaries
3. openclaw-template (Skill · Sandbox escape)
What it demonstrates:
- pass-through request routing to OpenClaw
- no terminal generation layer, direct local AI routing
- robust response validation
- fallback for unmatched tools
- timeout + retry strategy
4. Background + Alarm (Background daemon pattern)
What it demonstrates:
- continuous background loop with
session_tasks.sleep() - reading session history / file state periodically
- skill + daemon coordination through shared storage
- use
session_tasks.sleep(), notasyncio.sleep() - do not call
resume_normal_flow()in daemon loops - interrupt before daemon speech/audio when needed
- persist JSON safely (see
ReadWriteFilerules) - background file name must be exactly
background.py
5. loop-template a.k.a. Log-My-Life pattern (Skill · Ambient observer)
What it demonstrates:
- long-running session loop
- periodic capture/process/respond
- explicit phrase-based exit
get_audio_recording()may return cumulative recording data.- If chunking externally, track prior byte offset and slice new data before transcription/analysis.
Utility Pattern: ReadWriteFile
Purpose: safe shared-state and IPC pattern across Skill and Daemon.
- always use delete-then-write when replacing full file content
- append mode is still good for
.txtand.logactivity streams
Utility Pattern: .md Context Injection
Purpose: feed ambient context into the Agent prompt through persistent markdown files.
- only persistent
.mdfiles are injected into Agent context - reserve
user_profile.mdanduser_summary.mdfor platform memory background ownership - keep each injected
.mdfile short and current-state focused - expect ~60-90 seconds before a newly written
.mdfile is reflected in responses
Utility Pattern: Key-Value Context Storage
Purpose: structured state for preferences, conversation workflows, feature flags, and cache metadata. Notes:- Key-value methods are synchronous (do not
await). - Store JSON dictionaries (
dict) as values.
create_key(key, value)update_key(key, value)delete_key(key)get_all_keys()get_single_key(key)- missing-key-safe pattern: read with
get_single_key()beforeupdate_key(), create when absent
How Templates Map To Ability Types
| Template | Type | Key SDK Methods |
|---|---|---|
SendEmail | Skill | send_email(), speak(), resume_normal_flow() |
OpenHome-local | Skill | wait_for_complete_transcription(), text_to_text_response(), exec_local_command() |
openclaw-template | Skill | wait_for_complete_transcription(), exec_local_command(), speak() |
Background | Background Daemon | get_full_message_history(), session_tasks.sleep() |
Alarm | Skill + Daemon | read_file(), write_file(), send_interrupt_signal(), play_from_audio_file(), session_tasks.sleep() |
loop-template | Skill (long-running) | start_audio_recording(), stop_audio_recording(), get_audio_recording(), text_to_text_response() |
ReadWriteFile | Utility / IPC | check_if_file_exists(), read_file(), write_file(), delete_file() |
Context Storage | Utility / State | create_key(), update_key(), get_single_key(), get_all_keys(), delete_key() |
basic-template | Skill | speak(), user_response(), run_io_loop(), resume_normal_flow() |
api-template | Skill | user_response(), text_to_text_response(), resume_normal_flow() |
Critical Technical Rules
| Rule | Why |
|---|---|
Call resume_normal_flow() on every Skill exit path | Returns control to the main agent flow |
Do not use resume_normal_flow() inside daemon loops | Daemons are independent long-running tasks |
Use call(self, worker, background_daemon_mode) in background.py | Ensures daemon startup contract is correct |
Prefer session_tasks.sleep() over asyncio.sleep() | Ensures proper cleanup on session end |
| Treat JSON writes carefully | Default write_file mode appends and can corrupt JSON |
Use persistent .md files for ambient prompt context | Memory background injects user-level markdown into Agent prompt |
| Use key-value context storage for structured state | create_key/update_key/get_single_key reduce JSON file bookkeeping |
| Validate local command execution | Prevent unsafe/destructive operations |
What You Can Build From These
- voice-composed email flows
- local machine operator abilities
- OpenClaw orchestration flows
- background profilers, summarizers, and schedulers
- ambient capture and extraction assistants

