LangSmith agent run finished notifications on your phone.

Get a push notification when a LangGraph agent run finishes, fails or times out, with how long it took and the agent's final answer.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into LangSmith

Add it as a webhook for Agent run.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the LangSmith agent run webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. Follow the setup notes below: Agent run finished is configured in a different part of LangSmith than the other recipes.
  3. Paste your webhook URL (plus any query parameters from the notes) as the webhook URL and save.https://••••••••/•••••••• your personal URL, shown after install
  4. LangGraph Platform (Agent Server) calls a webhook when you pass one on the run. Add `webhook` to the request that starts it:
  5. ```json
  6. POST /threads/{thread_id}/runs
  7. {
  8. "assistant_id": "research-agent",
  9. "input": { "messages": [{ "role": "user", "content": "Summarise this week's support tickets" }] },
  10. "webhook": "your webhook URL"
  11. }
  12. ```
  13. The same `webhook` field works on `/runs/wait`, `/runs/stream` and cron jobs. With the Python SDK: `client.runs.create(thread_id, assistant_id, input=..., webhook="your webhook URL")`.
  14. The push shows the agent's last message when it's plain text, which is usually its final answer.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// LangSmith → LangGraph agent run finished
2// Fires when a LangGraph Platform (Agent Server) run you started with a "webhook"
3// parameter completes, fails, or times out. Great for long-running agents.
4// Docs: https://docs.langchain.com/langsmith/use-webhooks
5
6// Run statuses, how to label them, and how loud to be.
7const STATUSES = {
8 success: { title: "✅ Agent run finished", priority: -1 },
9 error: { title: "❌ Agent run failed", priority: 1 },
10 timeout: { title: "⏱️ Agent run timed out", priority: 1 },
11 interrupted: { title: "⏸️ Agent run interrupted", priority: 0 },
12}
13
14// "2m 14s" from two ISO timestamps.
15function duration(start, end) {
16 const ms = Date.parse(end) - Date.parse(start)
17 if (!Number.isFinite(ms) || ms < 0) return null
18 const s = Math.round(ms / 1000)
19 return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`
20}
21
22// The agent's last message, if it's text — usually its final answer.
23function lastMessage(values) {
24 const messages = Array.isArray(values?.messages) ? values.messages : []
25 const content = messages[messages.length - 1]?.content
26 const text = typeof content === "string"
27 ? content
28 : Array.isArray(content)
29 ? content.map((part) => (typeof part?.text === "string" ? part.text : "")).join(" ")
30 : ""
31 const clean = text.replace(/\s+/g, " ").trim()
32 return clean.length > 140 ? clean.slice(0, 139) + "…" : clean || null
33}
34
35function handleRequest(request) {
36 const run = request.body || {}
37
38 // Guard: only LangGraph run payloads.
39 if (!run.run_id || !Object.prototype.hasOwnProperty.call(STATUSES, run.status)) {
40 console.log(`Not a finished LangGraph run (status "${run.status ?? "unknown"}") — skipping`)
41 return null
42 }
43
44 const status = STATUSES[run.status]
45 const took = duration(run.run_started_at ?? run.created_at, run.run_ended_at ?? run.webhook_sent_at)
46 const who = run.assistant_id ? `${run.assistant_id}` : "Agent"
47 const failure = run.error && typeof run.error === "object"
48 ? [run.error.error, run.error.message].filter(Boolean).join(": ")
49 : null
50 const detail = run.status === "success" ? lastMessage(run.values) : failure
51
52 return {
53 title: status.title,
54 message: `${who}${took ? ` · ${took}` : ""}${detail ? ` — ${detail}` : ""}`,
55 topic: "LangSmith",
56 priority: status.priority,
57 }
58}
Payload

The LangSmith run webhook

This is what LangSmith sends to your URL for agent run. It is a sample, trimmed to the fields recipes use.

run · sample.json
1{
2 "error": null,
3 "kwargs": {
4 "input": {
5 "messages": [
6 {
7 "role": "user",
8 "content": "Summarise this week's support tickets"
9 }
10 ]
11 }
12 },
13 "run_id": "1ef6a5b8-4457-6db0-8b15-cffd3797fa04",
14 "status": "success",
15 "values": {
16 "messages": [
17 {
18 "type": "human",
19 "content": "Summarise this week's support tickets"
20 },
21 {
22 "type": "ai",
23 "content": "142 tickets this week, up 12%. Top themes: login issues (38), billing questions (27) and export bugs (19)."
24 }
25 ]
26 },
27 "metadata": [],
28 "thread_id": "9dde5490-2b67-47c8-aa14-4bfec88af217",
29 "created_at": "2026-09-29T09:05:01.000000+00:00",
30 "assistant_id": "research-agent",
31 "run_ended_at": "2026-09-29T09:07:15.500000+00:00",
32 "run_started_at": "2026-09-29T09:05:01.500000+00:00",
33 "webhook_sent_at": "2026-09-29T09:07:15.900000+00:00",
34 "multitask_strategy": "reject"
35}
FAQ

LangSmith agent run finished notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into LangSmith and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

LangSmith on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.