Skip to main content

What It Does

A simple daily life advisor that listens to your problem, generates helpful advice using the LLM, and collects your feedback. Perfect for quick guidance on everyday challenges.

Suggested Trigger Words

  • “give me advice”
  • “help me out”
  • “I need advice”
  • “daily advisor”

Key Features

Simple Flow

Straightforward interaction: problem → advice → feedback

LLM-Powered

Generates contextual advice using AI reasoning

No Setup

Works immediately with no configuration or API keys

Quick Solutions

Returns concise 1-2 sentence actionable advice

How It Works

1

User Activation

User triggers the ability with a hotword like “give me advice”
2

Problem Collection

Advisor introduces itself and asks for the user’s problem
3

LLM Processing

Problem is sent to the LLM with instructions to generate helpful, concise advice
4

Solution Delivery

Advisor speaks the solution and asks for feedback
5

Graceful Exit

Thanks the user and returns control to the main agent

API Requirements

No external APIs required. Uses only the built-in LLM.

Code Walkthrough

Capability Registration

The ability follows the standard OpenHome pattern:
class BasicAdvisorCapability(MatchingCapability):
    worker: AgentWorker = None
    capability_worker: CapabilityWorker = None

    @classmethod
    def register_capability(cls) -> "MatchingCapability":
        with open(
            os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.json")
        ) as file:
            data = json.load(file)
        return cls(
            unique_name=data["unique_name"],
            matching_hotwords=data["matching_hotwords"],
        )

Main Advice Flow

The core logic is cleanly structured in a single async method:
async def give_advice(self):
    # Introduce the advisor and ask for the user's problem
    await self.capability_worker.speak(INTRO_PROMPT)

    # Wait for the user to describe their problem
    user_problem = await self.capability_worker.user_response()

    # Generate a solution using the LLM
    solution_prompt = (
        f"The user has the following problem: {user_problem}. "
        "Provide a helpful solution in just 1 or 2 sentences."
    )
    solution = self.capability_worker.text_to_text_response(solution_prompt)

    # Speak the solution and ask for feedback
    user_feedback = await self.capability_worker.run_io_loop(
        solution + FEEDBACK_PROMPT
    )

    # Thank the user and exit
    await self.capability_worker.speak(FINAL_PROMPT)
    self.capability_worker.resume_normal_flow()

Prompts

The ability uses clear, conversational prompts:
INTRO_PROMPT = "Hi! I'm your daily life advisor. Tell me about a problem you're facing."
FEEDBACK_PROMPT = " Are you satisfied with the advice?"
FINAL_PROMPT = "Thank you for using the daily life advisor. Goodbye!"

Key SDK Functions Used

await self.capability_worker.speak("Hi! I'm your daily life advisor.")
Converts text to speech and plays it to the user.
user_problem = await self.capability_worker.user_response()
Listens for user voice input and returns transcribed text.
solution = self.capability_worker.text_to_text_response(solution_prompt)
Sends a prompt to the LLM and returns generated text.
user_feedback = await self.capability_worker.run_io_loop(
    solution + FEEDBACK_PROMPT
)
Speaks text and waits for user response in one call.
self.capability_worker.resume_normal_flow()
Returns control to the main agent personality.

Example Conversation

User: "Give me advice"

AI: "Hi! I'm your daily life advisor. Tell me about a problem you're facing."

User: "I can't sleep at night"

AI: "Try establishing a consistent bedtime routine and avoid screens an hour 
     before sleep. Are you satisfied with the advice?"

User: "Yes, thanks"

AI: "Thank you for using the daily life advisor. Goodbye!"
This is an excellent starting point for building your own custom abilities. The code is simple, well-structured, and demonstrates core SDK patterns.

Extending This Ability

Add Context Memory

Store previous advice sessions to provide more personalized recommendations

Category Routing

Detect problem type (work, relationships, health) and route to specialized prompts

Follow-up Questions

Ask clarifying questions if the problem description is vague

Resource Links

Provide relevant articles or resources along with advice

Build docs developers (and LLMs) love