Skip to content

Interface: RunAgentRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / RunAgentRequest

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

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

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

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

optional context?: AguiContextItem[]

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

Contextual key-value items.


optional forwardedProps?: JsonValue

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

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


optional messages?: AguiMessage[]

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

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


optional runId?: string

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

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


optional state?: JsonValue

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

Client-side shared state.


optional threadId?: string

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

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


optional tools?: AguiTool[]

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

Frontend tools the client offers the agent.