Skip to content

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).

ToolPurposeInterrupts Turn
subAgentCreate a sub-agent session for complex, multi-step tasksDepends on mode
listSubAgentList all active sub-agents in the current session treeNo
getSubAgentMessageGet the latest message from a specific sub-agentNo
stopSubAgentStop a specific sub-agent and all its descendant sessionsNo
sendMessageToSubAgentSend an additional message to an async sub-agentNo
askUserAsk the user 1-4 multiple-choice questions and wait for answersYes
todoWriteManage task lists (create, update todo items)No
createGoalCreate an autonomous goal, automatically driving subsequent turns until completionNo
completeGoalMark the goal as completedNo
cancelGoalCancel the goalNo
createLoopCreate a scheduled loop task that runs automatically at fixed intervalsNo
cancelLoopCancel a loop taskNo
completeLoopMark a loop task as completedNo
listLoopsList all loop tasks in the current sessionNo
pauseLoopPause a loop taskNo
resumeLoopResume a paused loop taskNo
webSearchSearch the web for up-to-date information (when configured)No
webFetchFetch a URL and extract content using AI (when configured)No

💡 Additionally, the memory system provides tools saveMemory, updateMemory, deleteMemory, listMemories, and searchMemory. See Memory System for details.


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.

Sub-agents form a tree hierarchy through parent/root session IDs:

FieldDescription
parent_server_session_idThe server-side UUID of the direct parent session
root_server_session_idThe server-side UUID of the root session (inherited from the parent if the current session is already a sub-session)

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.

ParameterTypeRequiredDescription
titlestringYesShort task description (3-5 words), e.g. "OAuth authentication setup", "Login button fix"
instructionstringYesTask instruction for the sub-agent. Must include all necessary context since the sub-agent starts with a blank context
modestringNoExecution mode: "async" (default) or "sync"
ModeBehaviorUse 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 sessionThe parent can continue working without waiting for the result
syncThe parent session pauses (via StatefulInterrupt) and waits for the sub-agent to complete, then returns the resultThe parent needs the sub-agent’s result before continuing
  • 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

List all active sub-agent sessions in the current session tree. Use this to check the status of spawned sub-agents.

None.

Returns a JSON array, each element containing:

FieldTypeDescription
sub_session_idstringServer-side UUID of the sub-session
titlestringSub-agent title
statusstringSession status (only active sessions are returned)
created_atstringCreation time (RFC 3339 format)
updated_atstringUpdate 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.

ParameterTypeRequiredDescription
sub_session_idstringYesServer-side UUID of the target sub-session. Use listSubAgent to get available session IDs

Returns a JSON object:

FieldTypeDescription
sub_session_idstringSub-session UUID
sub_session_titlestringSub-session title
sub_session_statusstringSub-session status
message_idstring / nullLatest message ID (null if no messages)
rolestring / nullMessage role (null if no messages)
contentstringMessage text content
created_atstring / nullMessage creation time (null if no messages)
  • The target session must be a descendant of the current session tree (root_server_session_id must match)
  • Cannot query the current session itself

Stop a specific sub-agent session and all its descendant sessions. Uses a bottom-up stopping order (leaf nodes first, then parents).

ParameterTypeRequiredDescription
sub_session_idstringYesServer-side UUID of the target sub-session. Use listSubAgent to get available session IDs

Returns a JSON object:

FieldTypeDescription
stopped_sessionsarrayList of stopped sessions, each with sub_session_id and title
total_stoppedintTotal number of stopped sessions

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.

ParameterTypeRequiredDescription
sub_session_idstringYesThe server UUID of the target async sub-agent session
messagestringYesThe message content to send to the sub-agent
  • Provide additional instructions during sub-agent execution
  • Respond to questions from an async sub-agent
  • Redirect the sub-agent’s focus

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.

ParameterTypeRequiredDescription
questionsarrayYes1-4 question objects

Each question object contains:

FieldTypeRequiredDescription
questionstringYesThe complete question text, ending with a question mark
headerstringYesShort label (max 12 characters) displayed as a chip/tag next to the question
optionsarrayYes2-4 options
multiSelectbooleanNoSet to true to allow selecting multiple options. Default: false

Each option contains:

FieldTypeRequiredDescription
labelstringYesOption display text (1-5 words)
descriptionstringYesExplanation of what this option means or what will happen if chosen
previewstringNoPreview content rendered when this option is focused (supports multi-line text, only for single-select questions)
{
"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"
}
]
}
]
}

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.

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.

ParameterTypeRequiredDescription
todosarrayNoTodo item list (complete replacement)

Each todo item contains:

FieldTypeRequiredDescription
contentstringYesTask description (imperative)
status"pending" / "in_progress" / "completed"YesTask status
active_formstringNoShort description for status bar display when in progress
  • Keep tasks at a moderate granularity — each task should be a verifiable milestone
  • Update status promptly — mark completed tasks as completed, in-progress ones as in_progress
  • Remove unneeded tasks from the list directly instead of marking them as cancelled

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.

StateDescription
activeGoal is active; progress checked each turn
completedGoal has been completed
cancelledGoal was cancelled
exhaustedReached max turn limit; automatically terminated
ParameterTypeRequiredDescription
conditionstringYesDescription of the goal completion condition
max_turnsintNoMaximum 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.

ParameterTypeRequiredDescription
goal_idstringYesGoal ID

The Loop system allows AI to create scheduled recurring tasks. Built on the asynq background task queue, it supports pause, resume, and automatic expiry.

StateDescription
activeLoop is active; triggers automatically at intervals
pausedLoop is paused; no new turns triggered
completedLoop has completed
cancelledLoop was cancelled
exhaustedReached max turns or expired
ParameterTypeRequiredDescription
promptstringYesPrompt to execute on each cycle
interval_secondsintYesExecution interval (seconds)
max_turnsintNoMaximum executions (default 10)
ToolParameterDescription
cancelLooploop_idCancel the loop
completeLoopreasonMark the loop as completed (with completion reason)
listLoopsNoneList all loops in the current session
pauseLooploop_idPause the loop
resumeLooploop_idResume 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.


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.

ParameterTypeRequiredDescription
querystringYesThe search query. Should be specific and clear. Examples: "latest Go programming news", "Python asyncio tutorial"
max_resultsintegerNoMaximum number of results to return. Default: 10, max: 30. Use fewer for quick answers, more for comprehensive research
time_rangestringNoLimit results to a time range. Options: "day" (last 24h), "week", "month", "year". Leave empty for all time

Returns a JSON object containing:

FieldTypeDescription
querystringThe original query
result_countintegerNumber of results
resultsarraySearch result list, each entry contains title, url, description, source
  • 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 webFetch tool
  • Your response must include a “Sources:” section at the end, listing all referenced source links

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.

ParameterTypeRequiredDescription
urlstringYesThe URL to fetch. Must be a fully-formed HTTP or HTTPS address
promptstringYesExtraction prompt describing what information you want to extract from the page
FeatureDescription
CacheSelf-cleaning 30-minute cache for faster repeated access to the same URL
RedirectsWhen a URL redirects to a different host, the redirect URL is returned for a follow-up request
Content limitsMax URL length: 2,000 chars; max content size: 10 MB
TimeoutFetch timeout: 60 seconds
LLM extraction thresholdLLM extraction is triggered when content exceeds 50,000 bytes (configurable)

  • 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