Skip to content

Interface: RunAgentRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Agui / RunAgentRequest

Interface: RunAgentRequest

Defined in: src/types/agui.ts:157

The payload an AG-UI client POSTs to start (or continue) a run.

Remarks

Body of POST /api/v1/agui. The AG-UI wire contract is camelCase (runId, threadId, forwardedProps) — the normalizer emits those keys verbatim rather than the snake_case used by the rest of the API.

forwardedProps carries integration-specific properties: the backend reads mode, sortId, viewMode, and a2uiAction from it (structural dispatch, never linguistic).

Example

const request: RunAgentRequest = {
threadId: 'thread-1',
messages: [{ role: 'user', content: 'Which patients are at risk?' }],
forwardedProps: { mode: 'chat' },
};

Properties

context?

optional context: AguiContextItem[]

Defined in: src/types/agui.ts:159

Contextual key-value items.


forwardedProps?

optional forwardedProps: JsonValue

Defined in: src/types/agui.ts:164

Integration-specific properties (the backend reads mode, sortId, viewMode, and a2uiAction from here).


messages?

optional messages: AguiMessage[]

Defined in: src/types/agui.ts:166

Conversation history (last entry is the current user turn).


runId?

optional runId: string

Defined in: src/types/agui.ts:168

Run id (client-chosen; generated server-side when empty).


state?

optional state: JsonValue

Defined in: src/types/agui.ts:170

Client-side shared state.


threadId?

optional threadId: string

Defined in: src/types/agui.ts:175

Conversation thread id (client-chosen; the backend maps it to a conversation term deterministically).


tools?

optional tools: AguiTool[]

Defined in: src/types/agui.ts:177

Frontend tools the client offers the agent.