- TypeScript
- Python
LaminarClient
HTTP client for Laminar API operations.| Name | Type | Default | Description |
|---|---|---|---|
projectApiKey | string | LMNR_PROJECT_API_KEY env | API key |
baseUrl | string | https://api.lmnr.ai | API base URL |
port | number | 443 | API port |
client.tags.tag(traceId, tags)
Add tags to a completed trace.| Name | Type | Default | Description |
|---|---|---|---|
traceId | string | — | Trace UUID |
tags | string[] | string | — | Tag(s) to add |
Promise<any>Note: Call after Laminar.flush() to ensure trace exists.client.datasets
Dataset operations.client.datasets.listDatasets()
Returns:Promise<Dataset[]>client.datasets.getDatasetByName(name)
Parameters:| Name | Type | Default | Description |
|---|---|---|---|
name | string | — | Dataset name |
Promise<Dataset[]>client.datasets.pull(options)
Pull datapoints from a dataset.Parameters:| Name | Type | Default | Description |
|---|---|---|---|
options.name | string | — | Dataset name |
options.id | string | — | Dataset ID |
options.limit | number | 100 | Max datapoints |
options.offset | number | 0 | Pagination offset |
Promise<GetDatapointsResponse<D, T>>client.datasets.push(options)
Push datapoints to a dataset.Parameters:| Name | Type | Default | Description |
|---|---|---|---|
options.points | Datapoint<D, T>[] | — | Datapoints to push |
options.name | string | — | Dataset name |
options.id | string | — | Dataset ID |
options.batchSize | number | 100 | Batch size |
options.createDataset | boolean | false | Create dataset if missing |
Promise<PushDatapointsResponse | undefined>client.evals
Evaluation operations.client.evals.init(name?, groupName?, metadata?)
Parameters:| Name | Type | Default | Description |
|---|---|---|---|
name | string | — | Evaluation name |
groupName | string | — | Group name |
metadata | Record<string, any> | — | Evaluation metadata |
Promise<InitEvaluationResponse>client.evals.createDatapoint(options)
Parameters:| Name | Type | Default | Description |
|---|---|---|---|
options.evalId | string | — | Evaluation UUID |
options.data | any | — | Input data |
options.target | any | — | Target/expected output |
options.metadata | Record<string, any> | — | Datapoint metadata |
options.index | number | — | Dataset index |
options.traceId | string | — | Trace UUID |
Promise<string>client.evaluators.score(options)
Attach evaluator score to a trace or span.traceId or spanId.| Name | Type | Default | Description |
|---|---|---|---|
options.name | string | — | Evaluator name |
options.score | number | — | Score value |
options.metadata | Record<string, any> | — | Score metadata |
options.traceId | string | — | Trace UUID |
options.spanId | string | — | Span UUID |
Promise<void>client.agent.run(options)
Run a browser agent.| Name | Type | Default | Description |
|---|---|---|---|
prompt | string | — | Agent instruction (required) |
parentSpanContext | string | Current span | Parent trace context |
model | string | — | Model to use |
stream | boolean | false | Stream responses |
maxSteps | number | 100 | Maximum steps |
startUrl | string | — | Starting URL |
timeout | number | — | Timeout in ms |
returnScreenshots | boolean | false | Include screenshots |
returnAgentState | boolean | false | Return agent state |
returnStorageState | boolean | false | Return storage state |
disableGiveControl | boolean | false | Disable “give control” |
enableThinking | boolean | true | Enable thinking |
Promise<AgentOutput>whenstreamisfalsePromise<ReadableStream<RunAgentResponseChunk>>whenstreamistrue
