{"name":"@langchain/langgraph-sdk","version":"0.0.85","license":"MIT","_id":"@langchain/langgraph-sdk@0.0.85","maintainers":[{"name":"hwchase17","email":"hw.chase.17@gmail.com"},{"name":"jacoblee93","email":"jacoblee93@gmail.com"},{"name":"basproul","email":"braceasproul@gmail.com"},{"name":"eric_langchain","email":"eric@langchain.dev"},{"name":"andrewnguonly","email":"andrewnguonly@gmail.com"},{"name":"nfcampos","email":"nuno@boringbits.io"},{"name":"davidduong","email":"david@duong.cz"},{"name":"maddyadams","email":"madelyn.adams1@gmail.com"},{"name":"sam_noyes","email":"sam@langchain.dev"},{"name":"hntrl","email":"hunter@hntrl.io"}],"dist":{"shasum":"b44a76114dba69605b7a631888d57de88bb1f7a4","tarball":"http://registry-npm.ywwl.com/@langchain/langgraph-sdk/download/@langchain/langgraph-sdk-0.0.85.tgz","fileCount":96,"integrity":"sha512-kdBFPF9a3ZDUhUYo+BtDUQ/I2j3U/gHVjM7sZkYh+dWBYRuow+i+rgmxhmZqHIhwylnHLxPvaslxFGWVWH1GCg==","signatures":[{"sig":"MEUCIE0Jf7nyRjgZ86Hs0KyCvdGgHdeCoL9khv4FGMPEi69vAiEA3lgBIBrCuqksjd2K8BoCrjU1PhezooqY+A7XS1yNGqg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":279157,"size":63751,"noattachment":false,"key":"/@langchain/langgraph-sdk/-/@langchain/langgraph-sdk-0.0.85.tgz"},"main":"index.js","type":"module","types":"./index.d.ts","exports":{".":{"types":{"import":"./index.d.ts","default":"./index.d.ts","require":"./index.d.cts"},"import":"./index.js","require":"./index.cjs"},"./auth":{"types":{"import":"./auth.d.ts","default":"./auth.d.ts","require":"./auth.d.cts"},"import":"./auth.js","require":"./auth.cjs"},"./react":{"types":{"import":"./react.d.ts","default":"./react.d.ts","require":"./react.d.cts"},"import":"./react.js","require":"./react.cjs"},"./client":{"types":{"import":"./client.d.ts","default":"./client.d.ts","require":"./client.d.cts"},"import":"./client.js","require":"./client.cjs"},"./react-ui":{"types":{"import":"./react-ui.d.ts","default":"./react-ui.d.ts","require":"./react-ui.d.cts"},"import":"./react-ui.js","require":"./react-ui.cjs"},"./package.json":"./package.json","./react-ui/server":{"types":{"import":"./react-ui/server.d.ts","default":"./react-ui/server.d.ts","require":"./react-ui/server.d.cts"},"import":"./react-ui/server.js","require":"./react-ui/server.cjs"}},"gitHead":"4a26ca5bc210694cac587609e76e842927390c28","scripts":{"lint":"prettier --check src && tsc --noEmit","test":"vitest","build":"yarn clean && yarn lc_build --create-entrypoints --pre --tree-shaking","clean":"rm -rf dist/ dist-cjs/","format":"prettier --write src","prepack":"yarn run build","typedoc":"typedoc && typedoc src/react/index.ts --out docs/react --options typedoc.react.json && typedoc src/auth/index.ts --out docs/auth --options typedoc.auth.json"},"_npmUser":{"name":"davidduong","actor":{"name":"davidduong","type":"user","email":"david@duong.cz"},"email":"david@duong.cz"},"_npmVersion":"10.8.2","description":"Client library for interacting with the LangGraph API","directories":{},"_nodeVersion":"20.19.2","dependencies":{"uuid":"^9.0.0","p-queue":"^6.6.2","p-retry":"4","@types/json-schema":"^7.0.15"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.19","devDependencies":{"msw":"^2.8.2","jsdom":"^26.1.0","react":"^19.0.0","vitest":"^3.1.3","typedoc":"^0.27.7","prettier":"^3.2.5","concat-md":"^0.5.1","react-dom":"^19.0.0","typescript":"^5.4.5","@types/node":"^20.12.12","@types/uuid":"^9.0.1","@types/react":"^19.0.8","@langchain/core":"^0.3.31","@types/react-dom":"^19.0.3","@langchain/scripts":"^0.1.4","@testing-library/dom":"^10.4.0","@vitejs/plugin-react":"^4.4.1","@tsconfig/recommended":"^1.0.2","@testing-library/react":"^16.3.0","typedoc-plugin-markdown":"^4.4.2","@testing-library/jest-dom":"^6.6.3","@testing-library/user-event":"^14.6.1"},"peerDependencies":{"react":"^18 || ^19","@langchain/core":">=0.2.31 <0.4.0"},"peerDependenciesMeta":{"react":{"optional":true},"@langchain/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/langgraph-sdk_0.0.85_1750962648261_0.5344056675455313","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@langchain/langgraph-sdk`\n\nThe JavaScript / TypeScript SDK for talking to a LangGraph API server.\nUse it to create and manage assistants, threads, runs, cron\nschedules, and the KV store — and, most importantly, to **stream**\ngraph executions in real time.\n\n📚 **[Full documentation](./docs/README.md)**\n\n## Install\n\n```bash\npnpm add @langchain/langgraph-sdk @langchain/core\n# or: npm install @langchain/langgraph-sdk @langchain/core\n# or: yarn add @langchain/langgraph-sdk @langchain/core\n```\n\n## Quick start\n\n```ts\nimport { Client } from \"@langchain/langgraph-sdk\";\n\nconst client = new Client({ apiUrl: \"http://localhost:2024\" });\n\n// Open a thread-centric stream (the recommended way to stream).\nconst thread = client.threads.stream({ assistantId: \"my-agent\" });\n\nawait thread.run.start({\n  input: { messages: [{ role: \"user\", content: \"hello\" }] },\n});\n\nfor await (const message of thread.messages) {\n  for await (const token of message.text) {\n    process.stdout.write(token);\n  }\n}\n\nconsole.log(await thread.output);\nawait thread.close();\n```\n\nWith no `apiUrl`, the SDK points at `http://localhost:2024` (the\ndefault `langgraph dev` URL).\n\n## What's in the SDK\n\n| Sub-client          | Purpose                                            | Docs                                                            |\n| ------------------- | -------------------------------------------------- | --------------------------------------------------------------- |\n| `client.threads`    | Create threads, manage state, and **stream** runs. | [Threads](./docs/threads.md) · [Streaming](./docs/streaming.md) |\n| `client.assistants` | CRUD for assistants (schemas, graphs, versions).   | [Assistants](./docs/assistants.md)                              |\n| `client.runs`       | Trigger / join / cancel runs without streaming.    | [Runs (legacy)](./docs/runs.md)                                 |\n| `client.crons`      | Schedule recurring runs.                           | [Crons](./docs/crons.md)                                        |\n| `client.store`      | Namespaced KV + semantic store.                    | [Store](./docs/store.md)                                        |\n\n### Streaming\n\n`client.threads.stream(...)` returns a [`ThreadStream`](./docs/streaming.md)\nwith typed, lazy projections for every aspect of a run:\n\n- `thread.messages` / `thread.toolCalls` — assembled chat output.\n- `thread.values` / `thread.output` — graph state and final answer.\n- `thread.interrupts` / `thread.interrupted` — human-in-the-loop.\n- `thread.subgraphs` / `thread.subagents` — nested / deep-agent work.\n- `thread.extensions.<name>` — typed custom server projections.\n- `thread.audio` / `thread.images` / `thread.video` / `thread.files`\n  — media.\n\n> **Deprecated.** The generator-based streaming APIs on\n> `client.runs.*` (`stream`, `joinStream`) and `client.threads.joinStream`\n> are preserved for backwards compatibility only. New code should use\n> `client.threads.stream(...)`. See\n> [Runs (legacy)](./docs/runs.md) for migration guidance.\n\n### Transports\n\nStreaming defaults to Server-Sent Events (SSE) over HTTP. You can\nswitch to WebSocket per-call or globally, or plug in a custom\n`AgentServerAdapter`:\n\n```ts\nconst thread = client.threads.stream({\n  assistantId: \"my-agent\",\n  transport: \"websocket\",\n});\n```\n\nSee [Transports](./docs/transports.md) for full details.\n\n## Framework adapters\n\nIf you're building a UI, use the framework-specific packages that\nwrap this SDK:\n\n- [`@langchain/langgraph-sdk/react`](../sdk-react/docs/README.md)\n- [`@langchain/langgraph-sdk/vue`](../sdk-vue/docs/README.md)\n- [`@langchain/langgraph-sdk/svelte`](../sdk-svelte/docs/README.md)\n- [`@langchain/langgraph-sdk/angular`](../sdk-angular/docs/README.md)\n\nUse the SDK directly when you need low-level control, run it from a\nnon-browser environment (Node.js server, edge workers, scripts), or\nintegrate into a framework that does not yet have a first-party\nadapter.\n\n## Architecture\n\nThe client code is organized into sub-client modules under\n`src/client/`:\n\n| Path                 | Module                                                    |\n| -------------------- | --------------------------------------------------------- |\n| `client/assistants/` | `AssistantsClient`                                        |\n| `client/threads/`    | `ThreadsClient` (includes the v2 `stream(...)` primitive) |\n| `client/runs/`       | `RunsClient` (legacy streaming + CRUD)                    |\n| `client/crons/`      | `CronsClient`                                             |\n| `client/store/`      | `StoreClient`                                             |\n| `client/stream/`     | `ThreadStream`, assemblers, transports                    |\n| `client/base.ts`     | `BaseClient`, shared config & helpers                     |\n| `client/index.ts`    | Main `Client` class & re-exports                          |\n\n## Change log\n\nSee [CHANGELOG.md](https://github.com/langchain-ai/langgraphjs/blob/main/libs/sdk/CHANGELOG.md).\n","publish_time":1750962648465,"_cnpm_publish_time":1750962648465,"dist-tags":{"latest":"1.15.0","lts":"1.8.12","next":"1.0.0","rc":"1.12.0-rc.0"}}