# How to use @langchain/react

**URL:** <https://forum.langchain.com/t/how-to-use-langchain-react/3674>\
**Category:** LangSmith Product Help\
**Tags:** self-hosted, python-help\
**Created:** [May 6, 2026, 4:02pm UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674 "2026-05-06T16:02:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![whatCanIsay321](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/whatcanisay321/32/2964_2.png) [@whatCanIsay321](https://forum.langchain.com/u/whatCanIsay321)\
**Post date:** [May 6, 2026, 4:02pm UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/1 "2026-05-06T16:02:43Z")

</div>

I just use @langchain/react@1.0.1 to develop frontend ,but when i use function submit ,i found that new submit need POST /threads/{threadId}/commands  
POST /threads/{threadId}/stream/events

langgraph dev expose :/threads/{thread\_id}/stream  
/threads/{thread\_id}/runs/stream  
/threads/{thread\_id}/runs/{run\_id}/stream  
/runs/stream

how could i start agent serve that meet the @langchain/react@1.0.1 locally

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [May 6, 2026, 6:10pm UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/2 "2026-05-06T18:10:27Z")

</div>

hi @whatCanIsay321

what is your @langchain/langgraph-cli version?  
Run `npm list @langchain/react @langchain/core langchain`

---

<div class="post-metadata">

**Author:** ![whatCanIsay321](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/whatcanisay321/32/2964_2.png) [@whatCanIsay321](https://forum.langchain.com/u/whatCanIsay321)\
**Post date:** [May 7, 2026, 6:00am UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/4 "2026-05-07T06:00:24Z")

</div>

I use python to develop my backend .my pip list as follow:  
langgraph 1.1.10  
langgraph-api 0.7.98  
langgraph-checkpoint 4.0.1  
langgraph-checkpoint-sqlite 3.0.3  
langgraph-cli 0.4.21  
langgraph-prebuilt 1.0.13  
langgraph-runtime-inmem 0.27.3  
langgraph-sdk 0.3.12  
langsmith 0.7.32

when i use cmd langgraph dev to open agent serve . I found these interface:post/threads

- post/threads/search

- post/threads/count

- post/threads/prune

- get/threads/{thread\_id}/state

- post/threads/{thread\_id}/state

- get/threads/{thread\_id}/state/{checkpoint\_id}

- post/threads/{thread\_id}/state/checkpoint

- get/threads/{thread\_id}/history

- post/threads/{thread\_id}/history

- post/threads/{thread\_id}/copy

- get/threads/{thread\_id}

- delete/threads/{thread\_id}

- patch/threads/{thread\_id}

- get/threads/{thread\_id}/stream

but @langchain/react@1.0.1 submit need agent serve contain

POST /threads/{threadId}/commands  
POST /threads/{threadId}/stream/events

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [May 7, 2026, 10:50am UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/5 "2026-05-07T10:50:15Z")

</div>

hi @whatCanIsay321

If your backend is Python `langgraph dev`, `@langchain/react@1.0.1` is not usable with it yet. The Python Agent Server does not expose `POST /threads/{thread_id}/commands` or `POST /threads/{thread_id}/stream/events`.

Use the legacy SDK hook instead:

```bash
npm install @langchain/langgraph-sdk

```

```tsx
import { useStream } from "@langchain/langgraph-sdk/react";

const stream = useStream({
  apiUrl: "http://localhost:2024",
  assistantId: "agent",
});

```

Only use `@langchain/react@1.x` today if you serve the agent with the JS/TS `@langchain/langgraph-api>=1.2.0` server. Do not try to fix this with `paths` - the protocols differ, not just the URLs.

---

<div class="post-metadata">

**Author:** ![whatCanIsay321](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/whatcanisay321/32/2964_2.png) [@whatCanIsay321](https://forum.langchain.com/u/whatCanIsay321)\
**Post date:** [May 7, 2026, 11:06am UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/6 "2026-05-07T11:06:25Z")

</div>

okay！ thank u 🫡

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [May 8, 2026, 1:21pm UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/7 "2026-05-08T13:21:45Z")

</div>

hi @whatCanIsay321

let me know if it solves your problem 🙂 If so, please mark it solve for the other so they can make use of it. Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/system/32/1_2.png) [@system](https://forum.langchain.com/u/system)\
**Post date:** [May 9, 2026, 1:22am UTC](https://forum.langchain.com/t/how-to-use-langchain-react/3674/8 "2026-05-09T01:22:21Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
