Decorators
Priority-aware skill helpers.
- pymirokai.decorators.accept_priority.accepts_priority(func)
Decorator that enables priority-level arguments for skill methods.
Allows methods to accept an optional
priority=argument without changing their signature. Internally, it temporarily overrides_missionto include the priority in skill calls.Example
>>> @accepts_priority >>> def move_forward(self, distance: float): ... >>> robot.navigate.move_forward(1.0, priority="HIGH")
- Parameters:
func (
TypeVar(_F, bound=Callable[...,Any])) – The skill method to decorate.- Return type:
TypeVar(_F, bound=Callable[...,Any])- Returns:
The wrapped function supporting
priority=.
Decorator utilities for defining robot skills.
Contains the @skill decorator that marks asynchronous functions as executable skills with associated metadata such as access level and description.
- class pymirokai.decorators.skill.ParameterDescription(name, description, questions=<factory>)
Bases:
objectDescribe parameters in natural language for LLM-assisted calling.
- Parameters:
name (str)
description (str)
questions (list)
- name
Parameter name.
- description
Human-readable explanation of what the parameter does.
- questions
Optional list of example user questions associated with this parameter.
-
description:
str
-
name:
str
-
questions:
list
- pymirokai.decorators.skill.skill(can_be_triggered_by_llm=False, verbal_descriptions=None, parameters=None, access_level=AccessLevel.USER, auto_start=False)
Decorator that marks a function as a robot skill and attaches metadata.
- Parameters:
can_be_triggered_by_llm (
bool) – Whether the skill can be invoked by a language model.verbal_descriptions (
Optional[dict[str,str]]) – Optional localized verbal descriptions for speech or LLM integration.parameters (
Optional[list[ParameterDescription]]) – Optional list ofParameterDescriptioninstances.access_level (
AccessLevel) – Minimum access level required to execute the skill.auto_start (
bool) – Whether the skill should start automatically when loaded.
- Returns:
The wrapped function with
skill_infoandauto_startmetadata attached.