Skip to main content
View source

LlamaIndex

View as Markdown

A RocketRide agent node that runs a single-agent ReAct loop using LlamaIndex.

What it does

Receives a question on the questions lane, reasons step by step (selecting and invoking tools as needed), and emits the final answer on the answers lane.

Uses llama-index-core for the ReAct scaffolding (ReActChatFormatter, ReActOutputParser), but drives the loop by hand: the agent's LLM invocation channel returns plain text synchronously, so each turn the node formats the ReAct prompt, calls the host LLM with the stop word Observation:, and parses the model's Thought / Action / Action Input (or final Answer) output. Tool execution happens through the host's control-plane call_tool, not inside LlamaIndex. Connected tools are wrapped as metadata-only FunctionTools whose descriptions carry the tool's input JSON schema.

Because the loop is text-based, it works with any LLM that can follow the ReAct format; no native function-calling support is required. The agent still reaches multimodal capabilities (OCR, transcription, image embedding, etc.) by invoking those as tools.

The loop runs up to 10 iterations. If no final Answer is produced within the budget, the node returns "Agent stopped after reaching the maximum number of reasoning steps.". If the model's output cannot be parsed as a ReAct step it is treated as a direct answer (a leading Thought: is stripped so loop scaffolding does not leak to the user). A tool call that raises is not fatal: the error is fed back to the model as the observation ({tool, error, type}).

Progress is streamed over the thinking SSE lane ("Starting LlamaIndex agent...", "Calling ..."), and every tool step (action, action_input, observation) is recorded in the returned reasoning stack.

The node registers with classType: ["agent", "tool"]. It runs standalone on the questions lane and can also be invoked as a tool by parent agents (see "Using as a tool").


Configuration

Lanes

LaneDirectionDescription
questionsinQuestions for the agent to answer
answersoutThe agent's final answer

Fields

A single default profile with two fields:

FieldTypeDescription
agent_descriptionstringDefault empty. What does this agent do? Describe its purpose and capabilities, this helps parent agents select and invoke it correctly.
instructionsarrayAdditional instructions to guide the agent.
profilestringDefault "default".

Invoke channels

Control-plane channels the agent uses during its reasoning loop:

ChannelRequiredDescription
llmyes (min 1)LLM the agent thinks with
toolno (min 0)Tools available to the agent (via control-plane invoke)

Using as a tool

The node exposes itself as <nodeId>.run_agent, so parent agents can delegate to it in hierarchical pipelines. The configured agent_description is prepended to the tool description to help the parent pick the right sub-agent.

DirectionShape
Input{query: string, context?: object} (query must be a non-empty string)
Output{content, meta, stack}

An optional context object is passed to the sub-agent as a context entry of type RocketRide.agent.tool_context.v1. When invoked as a tool the answer is returned to the caller instead of being emitted on the answers lane.


Upstream docs


Schema

FieldTypeDescriptionDefault
agent_descriptionstringAgent description
What does this agent do? Describe its purpose and capabilities, this helps parent agents select and invoke it correctly.
""
agent_llamaindex.profilestringProfile"default"
instructionsarrayInstructions
Additional instructions to guide the agent.

Dependencies

  • llama-index-core