Agent Run
Description
Run the Laminar agent with the given prompt. The response can be streamed or returned as a single response.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The instructions to be used for the agent run.
Stringified Laminar OpenTelemetry span context. Useful to embed agent spans in a larger trace. Read more about LaminarSpanContext in our tracing docs.
LLM provider. Make sure to explicitly set this parameter, especially if you are setting the model
parameter.
anthropic
, gemini
, openai
LLM model name. Must match the provider API model name, e.g. 'claude-3-7-sonnet-latest'. Make sure to set the modelProvider
parameter explicitly.
If true, the response will be streamed including the intermediate 'thinking' steps. If false, the response will be returned as a single message. Currently, non-streaming connections timeout after 350 seconds. Laminar SDKs always set this to true, and, in the non-streaming mode, the response will be returned as a single message. Defaults to false.
The thinking parameter that is sent to the underlying LLM. This is always true for Gemini models. Defaults to true.
Stringified agent state as returned by a previous agent run. Useful to resume from a previous state.
Stringified browser storage state as returned by a previous agent run. Contains cookies and auth-related data.
Timeout in seconds. Only works in streaming mode. Note, this is a soft timeout, and the agent will finish its current step even if the timeout is reached. In addition, this timeout does not include initialization time.
Maximum number of steps to execute. Defaults to 100.
URL of the Chrome DevTools Protocol (CDP) server. If not specified, Laminar will start its own CDP browser instance.
Number of tokens the underlying LLM can use for thinking. Currently, there is a heuristic that converts the token budget to a reasoning effort parameter for OpenAI.
URL to start the agent from. If not specified, the agent will infer this from the prompt. Make sure this is a valid URL with the protocol/scheme included.
Whether to return screenshots of the browser with each step. Ignored in non-streaming mode.
Whether to return the agent state at the end of the run. CAUTION: This is a very large payload. Defaults to false.
Whether to return the browser storage state at the end of the run. This includes cookies and auth-related data. CAUTION: This may be a very large payload. Defaults to false.
Response
The result of the agent run.
Stringified browser storage state as returned by a previous agent run. Contains cookies and auth-related data. Only returned if returnStorageState
is true in the request. CAUTION: This may be a very large payload.
Stringified agent state as returned by a previous agent run. Only returned if returnAgentState
is true in the request. CAUTION: This is a very large payload.
Number of steps the agent took. Returned in non-streaming mode.