Header menu logo Nao

OrchestratorBase Type

The fundamental orchestrator agent. Accepts user input, uses an LLM to decide which tool or sub-agent to invoke, executes the action, feeds results back, and produces a final response. Subclass and override virtual members to customize behavior.

Constructors

Constructor Description

OrchestratorBase(config)

Full Usage: OrchestratorBase(config)

Parameters:
Returns: OrchestratorBase

Instance members

Instance member Description

this.BuildSystemPrompt

Full Usage: this.BuildSystemPrompt

Returns: string
Modifiers: abstract

Override to customize the system prompt generation.

Returns: string

this.Config

Full Usage: this.Config

Returns: OrchestratorConfig

The orchestrator configuration.

Returns: OrchestratorConfig

this.DefaultTryParseAction

Full Usage: this.DefaultTryParseAction

Parameters:
    content : string

Returns: AgentAction option

Default single-action parsing logic. Returns the FIRST recognised action, if any. Can be called by subclasses that cannot use base in task CEs.

content : string
Returns: AgentAction option

this.DefaultTryParseActions

Full Usage: this.DefaultTryParseActions

Parameters:
    content : string

Returns: AgentAction list

Parse a planner response into the actions to execute. The planner emits a single JSON object: { "actions": [ {type,name,params}, ... ] }; every step is returned in order. Tolerates a leading label or prose (e.g. "PLAN:") before the JSON and a bare legacy action object. Returns an empty list when the content is a normal final answer.

content : string
Returns: AgentAction list

this.HasMalformedActionBlock

Full Usage: this.HasMalformedActionBlock

Parameters:
    content : string

Returns: bool

True when the response contains a tagged `application/json+nao` action block whose payload is NOT well-formed (or yields no valid action). Lets the run loop ask the model to repair the block instead of silently dropping the action or echoing the broken JSON to the user. A response with no action block is never "malformed".

content : string
Returns: bool

this.OnRoundComplete

Full Usage: this.OnRoundComplete

Parameters:
    round : int
    content : string

Modifiers: abstract

Override to add custom logic after an agent round completes.

round : int
content : string

this.OnToolResult

Full Usage: this.OnToolResult

Parameters:
    toolName : string
    input : string
    result : string

Modifiers: abstract

Override to add custom logic after a tool executes.

toolName : string
input : string
result : string

this.TraceContext

Full Usage: this.TraceContext

Tracing context (tracer + parent span) optionally injected by the harness so each tool invocation is recorded as a child span carrying the tool name, parameters, and round. `None` disables per-tool tracing (e.g. when no tracer is configured).

this.TryGetActionBlockValidationError

Full Usage: this.TryGetActionBlockValidationError

Parameters:
    content : string

Returns: string option

Returns a concrete syntax/schema/semantic validation error for a tagged action block, or None when the response has no block or the block is executable.

content : string
Returns: string option

this.TryHandleDelegationAsync

Full Usage: this.TryHandleDelegationAsync

Parameters:
    agentName : string
    input : string

Returns: Task<string option>
Modifiers: abstract

Override to intercept delegation to a sub-agent before the default in-process call. Return Some finalAnswer to finish the turn immediately with that answer — e.g. when the delegation was handed off to a background task and the orchestrator should reply with a token instead of blocking. Return None to fall back to in-process delegation.

agentName : string
input : string
Returns: Task<string option>

this.TryParseActionAsync

Full Usage: this.TryParseActionAsync

Parameters:
    arg0 : string

Returns: Task<AgentAction option>
Modifiers: abstract

Override to customize how LLM output is parsed into an AgentAction. Return Some to invoke a tool/agent, None to treat the response as final answer.

arg0 : string
Returns: Task<AgentAction option>

this.TryParseActionsAsync

Full Usage: this.TryParseActionsAsync

Parameters:
    arg0 : string

Returns: Task<AgentAction list>
Modifiers: abstract

Override to customize how LLM output is parsed into MULTIPLE actions. Return the actions to execute in order; an empty list treats the response as a final answer.

arg0 : string
Returns: Task<AgentAction list>

Type something to start searching.