Skip to content

Interface: BrowserStepRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / BrowserStepRequest

Defined in: src/types/browser-agent.ts:68

The page state of one planning step.

The engine refuses an undeclared field. domSnapshot is the serialized interactive-element tree ([ref]<tag attr=…/> lines, * marking elements new since the previous step); its refs are opaque handles the browser resolves.

const step: BrowserStepRequest = {
task: 'Find the pricing page',
url: 'https://example.com',
domSnapshot: '[e1]<a href="/pricing">Pricing</a>',
};

domSnapshot: string

Defined in: src/types/browser-agent.ts:74

The serialized interactive-element tree.


optional history?: string[]

Defined in: src/types/browser-agent.ts:78

Compact prior-step summaries, oldest first.


optional marks?: string[]

Defined in: src/types/browser-agent.ts:80

Refs (eNN) drawn as numbered marks in screenshot: box “N” is ref eNN.


optional maxTokens?: number | null

Defined in: src/types/browser-agent.ts:82

Maximum tokens for the decoded step (default 768, clamped to 64..2048).


optional memory?: string

Defined in: src/types/browser-agent.ts:84

The planner’s durable note from the prior step, carried forward.


optional navigationLinks?: BrowserLink[] | null

Defined in: src/types/browser-agent.ts:86

Same-origin links from a complete structured browser snapshot.


optional screenshot?: string | null

Defined in: src/types/browser-agent.ts:88

Base64-encoded PNG of the current viewport, without a data: prefix.


optional tabs?: BrowserTab[]

Defined in: src/types/browser-agent.ts:90

The tabs of the task tab group, in group order.


task: string

Defined in: src/types/browser-agent.ts:70

The person’s objective for the run; constant across steps.


optional title?: string

Defined in: src/types/browser-agent.ts:76

The current page title (may be empty).


url: string

Defined in: src/types/browser-agent.ts:72

The current page address.