Yes, you can absolutely use Langgraph in Rust (Or any python only frameworks really)
github.com·2d·
Discuss: r/rust
🦀Rust
Preview
Report Post

Pyo3 - Langgraph Prove of Concept

This project is a proof of concept that you can use Langgraph just as easy as in Python, but in Rust instead, with the power of Pyo3.

Features

  • A bare minimum chat interface built with inquire.
  • A bare minimum graph that accepts user message and send it to Ollama.
  • All chat history are perserved through one session.

How is It Done?

Go read the code :). JK, pyo3 is doing the heavy-lifting here. It allows you to use any Python packages just like in Python. Most of the time you are just translating Python code into Rust with 1:1 ratio, or 1:2 because it’s a little bit more verbose in Rust.

The streaming is a little bit tricky thought. In Python, you would do:

stream = streamer()
for chunk in stream:
print(chunk)

Bu…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help