Connect LangSmith

Forward LangSmith run data to Obsivara by pointing the LangSmith webhook at the Obsivara ingest endpoint.

Configure the webhook

In your LangSmith project settings, add a webhook that posts to:

text
https://api.obsivara.com/ingest/webhook/langsmith?asset_id=my-langsmith-agent

Add the header:

text
Authorization: Bearer obs_live_YOUR_KEY

LangSmith will POST a run payload to Obsivara each time a run completes. Obsivara maps the LangSmith run id to a stable internal UUID automatically — you do not need to manage ID translation.

Accepted payload shape

Obsivara reads the following fields from the LangSmith webhook payload. All other fields are ignored.

FieldTypeDescription
idstringLangSmith run ID (mapped to a stable UUID)
namestringRun / chain name
inputsobjectInput data passed to the chain
outputsobjectOutput data returned by the chain
statusstringRun outcome (success, error, etc.)
total_tokensnumberTotal tokens consumed
total_costnumberTotal cost in USD

Example payload:

json
{
  "id": "run_abc123",
  "name": "Support chain",
  "inputs": { "question": "where is my order?" },
  "outputs": { "answer": "Your order ships in 2 days." },
  "status": "success",
  "total_tokens": 420,
  "total_cost": 0.0052
}

Asset attribution

Pass ?asset_id= as a query parameter on the webhook URL to group runs under a named asset in the Obsivara dashboard. For example:

text
https://api.obsivara.com/ingest/webhook/langsmith?asset_id=support-agent

All runs forwarded via this URL will appear under the support-agent asset.

Test the connection

You can test the endpoint manually with curl before wiring up LangSmith:

bash
curl -X POST "https://api.obsivara.com/ingest/webhook/langsmith?asset_id=my-langsmith-agent" \
  -H "Authorization: Bearer obs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "run_abc123",
    "name": "Support chain",
    "inputs": { "question": "where is my order?" },
    "outputs": { "answer": "Your order ships in 2 days." },
    "status": "success",
    "total_tokens": 420,
    "total_cost": 0.0052
  }'

A successful response is HTTP 202:

json
{ "source": "langsmith", "accepted": 1, "rejected": 0, "errors": [] }
External LangSmith IDs are auto-mapped to stable Obsivara UUIDs on first ingest. Subsequent runs with the same LangSmith ID will be linked to the same internal run record.

Verify it worked

After triggering a LangSmith run, open the Obsivara dashboard and find your asset. Runs typically appear within one minute. See Verify it worked for a full walkthrough.