API referenceConsole
observability
Polylane watches your LangSmith projects for changes in errors, latency and cost, picks up your alert rules, and opens failing traces to find the cause.

Connect

Connect LangSmith from the terminal. Pass --help for the flags LangSmith accepts.

Terminal
polylane integration connect --type langsmith

How it works

LangSmith alerts become issues

Polylane adds its webhook action to your alert rules on connect and again every hour. A rule that you create later gets the action within an hour.

When a rule fires, LangSmith sends the alert to Polylane, and the alert opens an issue in Polylane. Polylane investigates the issue. An error-count rule arrives with the severity "error". Latency, cost, run-count and feedback rules arrive as warnings. When the same rule fires again while its issue is open, the alert goes to that issue. LangSmith sends no notice when a rule recovers.

If the key cannot update alert rules, Polylane stops the hourly sync and asks you to rotate the key.

Checks on your tracing projects

Polylane watches each tracing project for changes in errors, latency, tokens, and cost. Every 30 minutes, it reads the monitoring dashboard of the ten busiest projects that had a root run in the last seven days. For each project it checks seven series:

  • Root-trace error rate, p99 latency, and volume
  • LLM calls with an error
  • Cost, input tokens, and output tokens

A clear change opens an issue. If Polylane cannot read the dashboard of one selected project, it skips that run and tries again, so a partial reading never marks an issue as recovered. On the integration page, you can change how often the checks run or turn them off.

Polylane also explores the connection when you connect it and every 12 hours after that, and records what it finds as issues. It checks the key every six hours.

During an investigation

Agents read your tracing projects with their statistics, search runs, open a whole trace as a run tree, and read project metrics, feedback, datasets, examples, and alert rules. Agents can also call other LangSmith APIs. A call that changes state requires safety review and approval before it runs.

LangSmith APIs

Polylane uses these LangSmith APIs:

LangSmith APIWhat it unlocks
GET /api/v1/sessionsLists tracing projects with their run counts, error rates, latency, tokens, and cost.
POST /api/v1/runs/query, GET /api/v1/runs/{id}Finds failing and slow runs and opens a whole trace.
POST /api/v1/sessions/{id}/dashboardReads error rate, latency, token, and cost series per project.
GET /api/v1/feedbackReads feedback scores and comments on runs.
GET /api/v1/datasets, GET /api/v1/examplesReads datasets and their examples.
/api/v1/platform/alertsReads your alert rules and adds the Polylane webhook action to each one.
langsmithApiCalls any other LangSmith API. API key, service key, access token and trace ingestion routes are not available.

Disconnecting

Disconnecting removes the Polylane webhook action from your alert rules and leaves the service key in LangSmith. Remove it under Settings → API Keys in LangSmith.

LangSmith requires one action on each rule. A rule whose only action is the Polylane action keeps it, and Polylane rejects its deliveries.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what LangSmith's API lets it remove. The following stays until you remove it yourself:

  • LangSmith API key
Terminal
polylane integration disconnect <id>

Tools

8

Operations agents can perform in threads.

List Projects
List LangSmith tracing projects with run counts, error rates, latency, tokens and cost
Query Runs
Search LangSmith runs and traces by project, time window, status, run type and filter
Get Trace
Read one LangSmith trace as a run tree with latency, tokens, cost and errors
Get Project Metrics
Read LangSmith project metrics over time: traces, errors, latency, LLM calls, tokens and cost
List Feedback
List LangSmith feedback scores and comments on runs
List Datasets
List LangSmith datasets and read dataset examples
List Alert Rules
List LangSmith alert rules and where each rule sends its alerts
Api
Call the connected LangSmith REST API