Overview
RCLI provides 43+ macOS actions for system control and automation:- Apps: Open, quit, switch apps
- System: Volume, brightness, clipboard, screenshots
- Calendar: Create events, list upcoming meetings
- Reminders: Create, list, complete tasks
- Notes: Create, search, append notes
- Music: Play, pause, next/previous track
- Contacts: Search, get details
- Files: Open, move, delete files
- Network: Check Wi-Fi, speed test
- Time: Current time, timezone info
- Calculation: Math expressions
Action Execution
rcli_action_execute
Execute a named action with JSON arguments.Engine handle (must be initialized)
Action name (e.g.,
"open_app", "create_reminder", "set_volume")JSON arguments for the action. Format varies per action.Example:
JSON result:Do not free - owned by the engine.
Example: Open an App
Example: Set Volume
Example: Create Reminder
Action Discovery
rcli_action_list
List all available actions (returns JSON array).Engine handle
JSON array of action definitions. Do not free.Example:
Example: Print All Actions
Common Actions
| Action | Description | Arguments |
|---|---|---|
open_app | Open application | {"app": "Safari"} |
quit_app | Quit application | {"app": "Safari"} |
set_volume | Set system volume | {"level": 50} (0-100) |
set_brightness | Set screen brightness | {"level": 75} (0-100) |
create_reminder | Create reminder | {"title": "Task", "list": "Work"} |
create_note | Create note | {"title": "Note", "body": "Content"} |
create_event | Create calendar event | {"title": "Meeting", "date": "2025-03-15", "time": "2:00 PM"} |
take_screenshot | Take screenshot | {"path": "/tmp/shot.png"} |
get_clipboard | Get clipboard text | {} |
set_clipboard | Set clipboard text | {"text": "Hello"} |
play_music | Play music | {} |
pause_music | Pause music | {} |
get_current_time | Get current time | {} |
calculate | Evaluate math | {"expression": "2 + 2"} |
Action Visibility (Enable/Disable)
Control which actions the LLM can see and call.rcli_set_action_enabled
Enable or disable an action for LLM visibility.Engine handle
Action name
1: Enable (LLM can call this action)0: Disable (hide from LLM)
0: Success-1: Action not found
Example: Disable Sensitive Actions
Changing action visibility invalidates the LLM’s KV cache and rebuilds the system prompt with updated tool definitions.
rcli_is_action_enabled
Check if an action is currently enabled.Engine handle
Action name
1: Action is enabled0: Action is disabled or doesn’t exist
Example: Check Status
Action Preferences
rcli_save_action_preferences
Persist action enable/disable state to~/.rcli/actions.json.
Engine handle
0: Saved successfully-1: Failed (disk error, permission denied)
Example: Save User Preferences
Preferences File Format
~/.rcli/actions.json:
Preferences are auto-loaded during
rcli_init(). No manual loading required.LLM Tool Calling
Actions are automatically registered as LLM tools. The LLM decides when to call them based on user input.Example: Voice Command → Action
Tool Call Flow
- User input:
"open Safari" - LLM receives system prompt with tool definitions
- LLM emits tool call:
<tool_call>{"name": "open_app", "arguments": {"app": "Safari"}}</tool_call> - Tool engine parses and executes action
- Action result summarized:
"Opened Safari" - TTS speaks response
Tool Filtering (Optimization)
To avoid overwhelming small LLMs, the engine filters tools by relevance:- Keyword overlap: Score actions by query relevance
- Top-10: Include only the most relevant actions
- Built-in tools: Always include
get_current_time,calculate
"remind me to buy milk"
- Relevant:
create_reminder,list_reminders - Irrelevant:
set_brightness,take_screenshot(filtered out)
Model Hot-Swap
rcli_switch_llm
Switch the active LLM model at runtime without restarting.Engine handle (must be initialized)
Model ID from registry (e.g.,
"qwen3-0.6b", "lfm2-1.2b", "qwen3.5-2b")0: Model switched successfully-1: Failed (model not found, out of memory)
Example: Switch to Larger Model
Complete Example: Action Manager
See Also
- Callbacks - Handle action results
- Voice Pipeline - Voice → action execution
- State Management - Query engine capabilities