LLM Built-in Tools
During reasoning, the AI can call a set of built-in tools to extend its capabilities. These tools are registered by the backend and require no additional configuration from the host application. The tools fall into two categories: sub-agent management (create, query, stop sub-agents) and user interaction (ask the user questions to gather decisions).
Tool Overview
Section titled “Tool Overview”| Tool | Purpose | Interrupts Turn |
|---|---|---|
subAgent | Create a sub-agent session for complex, multi-step tasks | Depends on mode |
listSubAgent | List all active sub-agents in the current session tree | No |
getSubAgentMessage | Get the latest message from a specific sub-agent | No |
stopSubAgent | Stop a specific sub-agent and all its descendant sessions | No |
sendMessageToSubAgent | Send an additional message to an async sub-agent | No |
askUser | Ask the user 1-4 multiple-choice questions and wait for answers | Yes |
todoWrite | Manage task lists (create, update todo items) | No |
createGoal | Create an autonomous goal, automatically driving subsequent turns until completion | No |
completeGoal | Mark the goal as completed | No |
cancelGoal | Cancel the goal | No |
createLoop | Create a scheduled loop task that runs automatically at fixed intervals | No |
cancelLoop | Cancel a loop task | No |
completeLoop | Mark a loop task as completed | No |
listLoops | List all loop tasks in the current session | No |
pauseLoop | Pause a loop task | No |
resumeLoop | Resume a paused loop task | No |
webSearch | Search the web for up-to-date information (when configured) | No |
webFetch | Fetch a URL and extract content using AI (when configured) | No |
💡 Additionally, the memory system provides tools
saveMemory,updateMemory,deleteMemory,listMemories, andsearchMemory. See Memory System for details.
Sub-Agent Tools
Section titled “Sub-Agent Tools”Sub-agents are RTC Agent’s task decomposition mechanism. The main agent can break complex tasks into sub-tasks, each running in its own session with an independent context.
Session Hierarchy
Section titled “Session Hierarchy”Sub-agents form a tree hierarchy through parent/root session IDs:
| Field | Description |
|---|---|
parent_server_session_id | The server-side UUID of the direct parent session |
root_server_session_id | The server-side UUID of the root session (inherited from the parent if the current session is already a sub-session) |
subAgent — Create a Sub-Agent
Section titled “subAgent — Create a Sub-Agent”Create a new sub-agent session to handle a complex, multi-step task. The sub-agent starts with a blank context, so you need to provide complete background information — like briefing a smart colleague who just walked into the room.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Short task description (3-5 words), e.g. "OAuth authentication setup", "Login button fix" |
instruction | string | Yes | Task instruction for the sub-agent. Must include all necessary context since the sub-agent starts with a blank context |
mode | string | No | Execution mode: "async" (default) or "sync" |
Execution Modes
Section titled “Execution Modes”| Mode | Behavior | Use Case |
|---|---|---|
| async (default) | Returns the sub-session ID immediately. The parent session continues running. When the sub-agent completes, a notification message is pushed to the parent session | The parent can continue working without waiting for the result |
| sync | The parent session pauses (via StatefulInterrupt) and waits for the sub-agent to complete, then returns the result | The parent needs the sub-agent’s result before continuing |
Usage Tips
Section titled “Usage Tips”- Be specific — include file paths, relevant context, and approaches already ruled out
- Don’t write vague instructions like “handle this task” — the sub-agent doesn’t have the current conversation context
- Keep titles short but descriptive for easy identification in lists
listSubAgent — List Sub-Agents
Section titled “listSubAgent — List Sub-Agents”List all active sub-agent sessions in the current session tree. Use this to check the status of spawned sub-agents.
Parameters
Section titled “Parameters”None.
Return Value
Section titled “Return Value”Returns a JSON array, each element containing:
| Field | Type | Description |
|---|---|---|
sub_session_id | string | Server-side UUID of the sub-session |
title | string | Sub-agent title |
status | string | Session status (only active sessions are returned) |
created_at | string | Creation time (RFC 3339 format) |
updated_at | string | Update time (RFC 3339 format) |
getSubAgentMessage — Get Sub-Agent Message
Section titled “getSubAgentMessage — Get Sub-Agent Message”Get the latest message from a specific sub-agent session. Use this to check a sub-agent’s latest output or progress.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
sub_session_id | string | Yes | Server-side UUID of the target sub-session. Use listSubAgent to get available session IDs |
Return Value
Section titled “Return Value”Returns a JSON object:
| Field | Type | Description |
|---|---|---|
sub_session_id | string | Sub-session UUID |
sub_session_title | string | Sub-session title |
sub_session_status | string | Sub-session status |
message_id | string / null | Latest message ID (null if no messages) |
role | string / null | Message role (null if no messages) |
content | string | Message text content |
created_at | string / null | Message creation time (null if no messages) |
Permission Check
Section titled “Permission Check”- The target session must be a descendant of the current session tree (
root_server_session_idmust match) - Cannot query the current session itself
stopSubAgent — Stop a Sub-Agent
Section titled “stopSubAgent — Stop a Sub-Agent”Stop a specific sub-agent session and all its descendant sessions. Uses a bottom-up stopping order (leaf nodes first, then parents).
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
sub_session_id | string | Yes | Server-side UUID of the target sub-session. Use listSubAgent to get available session IDs |
Return Value
Section titled “Return Value”Returns a JSON object:
| Field | Type | Description |
|---|---|---|
stopped_sessions | array | List of stopped sessions, each with sub_session_id and title |
total_stopped | int | Total number of stopped sessions |
Stopping Flow
Section titled “Stopping Flow”sendMessageToSubAgent — Send Message to Sub-Agent
Section titled “sendMessageToSubAgent — Send Message to Sub-Agent”Send an additional message to an async sub-agent. Used to provide extra instructions, supply additional context, or respond to the sub-agent’s questions during its execution.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
sub_session_id | string | Yes | The server UUID of the target async sub-agent session |
message | string | Yes | The message content to send to the sub-agent |
Use Cases
Section titled “Use Cases”- Provide additional instructions during sub-agent execution
- Respond to questions from an async sub-agent
- Redirect the sub-agent’s focus
askUser — Ask the User
Section titled “askUser — Ask the User”The AI asks the user 1-4 multiple-choice questions to gather preferences, clarify ambiguity, understand requirements, or get decisions on implementation choices. Users can always pick “Other” to provide free-form text.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
questions | array | Yes | 1-4 question objects |
Each question object contains:
| Field | Type | Required | Description |
|---|---|---|---|
question | string | Yes | The complete question text, ending with a question mark |
header | string | Yes | Short label (max 12 characters) displayed as a chip/tag next to the question |
options | array | Yes | 2-4 options |
multiSelect | boolean | No | Set to true to allow selecting multiple options. Default: false |
Each option contains:
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Option display text (1-5 words) |
description | string | Yes | Explanation of what this option means or what will happen if chosen |
preview | string | No | Preview content rendered when this option is focused (supports multi-line text, only for single-select questions) |
Interaction Flow
Section titled “Interaction Flow”Usage Example
Section titled “Usage Example”{ "questions": [ { "question": "Which date formatting library should we use?", "header": "Date Library", "options": [ { "label": "date-fns", "description": "Lightweight, tree-shakable, import only what you need" }, { "label": "dayjs", "description": "Moment.js compatible API, only 2KB" } ] } ]}Return Format
Section titled “Return Format”After the user answers, the AI receives text in this format:
User has answered your questions: "Which date formatting library should we use?"="date-fns". You can now continue with the user's answers in mind.todoWrite — Task List Management
Section titled “todoWrite — Task List Management”Manage the AI’s task list (Todo List). Uses a full replacement mode — each call passes the complete todo list, replacing the previous content entirely. Updates are published as events to notify the frontend for real-time display.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
todos | array | No | Todo item list (complete replacement) |
Each todo item contains:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Task description (imperative) |
status | "pending" / "in_progress" / "completed" | Yes | Task status |
active_form | string | No | Short description for status bar display when in progress |
Usage Tips
Section titled “Usage Tips”- Keep tasks at a moderate granularity — each task should be a verifiable milestone
- Update status promptly — mark completed tasks as
completed, in-progress ones asin_progress - Remove unneeded tasks from the list directly instead of marking them as cancelled
Goal Tools — Autonomous Goal Driving
Section titled “Goal Tools — Autonomous Goal Driving”The Goal system allows AI to create autonomous goals and automatically advance them across turns until completion. Each Goal has its own state lifecycle and turn-boundary checkpoint.
Goal State
Section titled “Goal State”| State | Description |
|---|---|
active | Goal is active; progress checked each turn |
completed | Goal has been completed |
cancelled | Goal was cancelled |
exhausted | Reached max turn limit; automatically terminated |
createGoal — Create a Goal
Section titled “createGoal — Create a Goal”| Parameter | Type | Required | Description |
|---|---|---|---|
condition | string | Yes | Description of the goal completion condition |
max_turns | int | No | Maximum turn limit (default 50) |
Execution mechanism: After each Turn completes, the system automatically checks active Goals and increments the completed_turns counter. If the condition is met, the Goal is marked as completed; if max_turns is reached, it is marked as exhausted.
completeGoal / cancelGoal
Section titled “completeGoal / cancelGoal”| Parameter | Type | Required | Description |
|---|---|---|---|
goal_id | string | Yes | Goal ID |
Loop Tools — Scheduled Recurring Tasks
Section titled “Loop Tools — Scheduled Recurring Tasks”The Loop system allows AI to create scheduled recurring tasks. Built on the asynq background task queue, it supports pause, resume, and automatic expiry.
Loop State
Section titled “Loop State”| State | Description |
|---|---|
active | Loop is active; triggers automatically at intervals |
paused | Loop is paused; no new turns triggered |
completed | Loop has completed |
cancelled | Loop was cancelled |
exhausted | Reached max turns or expired |
createLoop — Create a Loop
Section titled “createLoop — Create a Loop”| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Prompt to execute on each cycle |
interval_seconds | int | Yes | Execution interval (seconds) |
max_turns | int | No | Maximum executions (default 10) |
Other Loop Operations
Section titled “Other Loop Operations”| Tool | Parameter | Description |
|---|---|---|
cancelLoop | loop_id | Cancel the loop |
completeLoop | reason | Mark the loop as completed (with completion reason) |
listLoops | None | List all loops in the current session |
pauseLoop | loop_id | Pause the loop |
resumeLoop | loop_id | Resume a paused loop |
💡 Loop vs Goal: A Goal is “work until the condition is met, then stop”; a Loop is “execute every N seconds”. They can be combined — create a Goal inside a Loop to have AI periodically check whether a condition is satisfied.
webSearch — Web Search
Section titled “webSearch — Web Search”Search the internet for up-to-date information. Supports multiple search engines (DuckDuckGo, Bing, SearXNG, Tavily) with automatic failover. This tool is only registered when the server has the web_search module configured.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query. Should be specific and clear. Examples: "latest Go programming news", "Python asyncio tutorial" |
max_results | integer | No | Maximum number of results to return. Default: 10, max: 30. Use fewer for quick answers, more for comprehensive research |
time_range | string | No | Limit results to a time range. Options: "day" (last 24h), "week", "month", "year". Leave empty for all time |
Return Format
Section titled “Return Format”Returns a JSON object containing:
| Field | Type | Description |
|---|---|---|
query | string | The original query |
result_count | integer | Number of results |
results | array | Search result list, each entry contains title, url, description, source |
Usage Tips
Section titled “Usage Tips”- Include the current year in your query (e.g.
"Go docs 2026") to get the most up-to-date results - Results include titles, URLs, and snippets — analyze them to find the most relevant URLs
- If snippets are sufficient to answer the question, respond directly; if deeper analysis of a specific URL is needed, use the
webFetchtool - Your response must include a “Sources:” section at the end, listing all referenced source links
webFetch — Web Content Fetching
Section titled “webFetch — Web Content Fetching”Fetches content from a specified URL and extracts information using an AI model. Converts HTML to Markdown and processes it with a small, fast model. This tool is only registered when the server has the web_fetch module configured.
WARNING: webFetch will FAIL for authenticated or private URLs (e.g. Google Docs, Confluence, Jira, private GitHub repos). For authenticated access, use a specialized MCP tool instead.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to fetch. Must be a fully-formed HTTP or HTTPS address |
prompt | string | Yes | Extraction prompt describing what information you want to extract from the page |
How It Works
Section titled “How It Works”| Feature | Description |
|---|---|
| Cache | Self-cleaning 30-minute cache for faster repeated access to the same URL |
| Redirects | When a URL redirects to a different host, the redirect URL is returned for a follow-up request |
| Content limits | Max URL length: 2,000 chars; max content size: 10 MB |
| Timeout | Fetch timeout: 60 seconds |
| LLM extraction threshold | LLM extraction is triggered when content exceeds 50,000 bytes (configurable) |
Next Steps
Section titled “Next Steps”- Command System — Learn about the slash commands available to users
- Skill System — Learn how the host registers custom functions to extend AI capabilities
- Session Management — Learn about session hierarchy and context management
- Remote Tool Calling — Learn about the remote calling mechanism behind tool invocations