AgentProjectorOptions
Defined in: react/src/agents.ts:134
Properties
Section titled “Properties”agentId?
Section titled “agentId?”optional agentId?: string;Defined in: react/src/agents.ts:142
Registered root agent, when known before a snapshot or handoff event.
clientTools?
Section titled “clientTools?”optional clientTools?: Readonly<Record<string, (arguments_, request) => unknown>>;Defined in: react/src/agents.ts:165
Explicitly authorize each device input. Receives effective, approved arguments, NOT the model’s original JSON string. The callback must validate and filter for this viewer.
error?
Section titled “error?”optional error?: (state) => DisplayError;Defined in: react/src/agents.ts:169
Without it a failure shows its code and a sentence that says nothing private.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
state |
| { limit: LimitReason; status: "limited"; } | { error: RunFailure; status: "failed"; } |
Returns
Section titled “Returns”input?
Section titled “input?”optional input?: (input, scope) => | { text?: string;} | undefined;Defined in: react/src/agents.ts:178
Viewer-safe text from saved steering input. Never copy raw history or media references.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
RunInput |
scope |
{ rootRunId: string; runId: string; } |
scope.rootRunId |
string |
scope.runId |
string |
Returns
Section titled “Returns”| {
text?: string;
}
| undefined
labels?
Section titled “labels?”optional labels?: object;Defined in: react/src/agents.ts:146
Words for rows, keyed by tool name and by registered definition id.
agent?
Section titled “agent?”optional agent?: Readonly<Record<string, string>>;optional run?: Readonly<Record<string, string>>;Optional overrides for a particular run, before the registered-agent label.
optional step?: Readonly<Record<string, string>>;Explicit safe labels keyed by step key. Unmapped steps have a generic label.
optional tool?: Readonly<Record<string, string>>;workflow?
Section titled “workflow?”optional workflow?: Readonly<Record<string, string>>;messageId
Section titled “messageId”messageId: string;Defined in: react/src/agents.ts:136
The assistant message this run writes into.
output?
Section titled “output?”optional output?: (candidate) => readonly DisplayPart[];Defined in: react/src/agents.ts:185
Parts for a completed run’s checked result (the submit_result arguments, or the final
text of a run without an output contract). Without it the result is not shown. Give the
parts ids no SDK operation id can take, and settle them: they are sent unnumbered.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
candidate |
unknown |
Returns
Section titled “Returns”readonly DisplayPart[]
reasoning?
Section titled “reasoning?”optional reasoning?: (source) => boolean;Defined in: react/src/agents.ts:176
Which runs’ reasoning words are sent, on their thinking rows. Defaults to none. Reasoning can
quote the instructions, a tool’s output or private data, so by default a thinking row says
only that the model thought and for how long. A run gets thinking rows only where text
shows its text.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source |
TextSource |
Returns
Section titled “Returns”boolean
request?
Section titled “request?”optional request?: (activity) => | RequestDisplay | null | undefined;Defined in: react/src/agents.ts:162
Opts viewer-safe question fields, edited inputs and decision data into display. Without it, questions and client actions show a generic, non-actionable waiting row.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
activity |
AskRecord |
Returns
Section titled “Returns”| RequestDisplay
| null
| undefined
runId: string;Defined in: react/src/agents.ts:140
The run this projector draws: the runId you gave agent.run, or the runId of its
saved snapshot. It stays the same across approval segments. Another run’s events are drawn
only after a child event named it as a specialist of this one.
optional step?: (activity) => | Omit<ToolDisplay, "name"> | null | undefined;Defined in: react/src/agents.ts:159
Viewer-safe step details only. Raw step data stays on the server without this callback.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
activity |
StepActivity |
Returns
Section titled “Returns”| Omit<ToolDisplay, "name">
| null
| undefined
optional text?: (source) => boolean;Defined in: react/src/agents.ts:171
Which runs’ model text is shown. Defaults to the root and its conversation handoffs only.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source |
TextSource |
Returns
Section titled “Returns”boolean
optional tool?: (activity) => | ToolDisplay | null | undefined;Defined in: react/src/agents.ts:157
Return null to hide a call. That is decided from the call before it has a result, so a
call is shown for its whole life or never. Called again with the result for the final row.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
activity |
ToolActivity |
Returns
Section titled “Returns”| ToolDisplay
| null
| undefined
workflowId?
Section titled “workflowId?”optional workflowId?: string;Defined in: react/src/agents.ts:144
Registered workflow root, instead of agentId. Workflows have no conversation owner.