LangGraph Engineer
github.com
github.com
The three reasons I can think of:
1. by predeclaring the structure, you can show debugging UI of the full graph, even if you've only executed part of it
2. Pregel can make it easier to reason about global state transitions (you can accomplish this in other systems too, if you set it up right)
3. by enforcing heavier structure on your program, you can ask the AI to reason about the whole graph or generate new graph parts
The downside is that this is an abnormal way of writing computer programs, originally designed for high-scale processing (Hadoop, Apache Spark, etc.). If you want to dynamically change the control flow of your program or special case control flow at various points, you'll wrestle against the up-front graph structure.I personally have more of a preference to write normal-looking code, without having to predeclare my execution graph.
But I think DAGs don't scale, or rather, as you point out, it quickly becomes easier to reason about code than about a graph.
I thought, maybe a setup like pytorch that let's you code it normally and once you run it or compile it creates a graph for you to see. But I remain unconvinced.
I like the Pytorch comparison, and I've seen DSPy position themselves as Pytorch for prompting.
I also think the actor model is a natural fit for AI agents, which has some similarities with Pregel (message passing), and some differences (there are no super-steps of graph execution, each actor has its own thread).
I definitely dislike state machines for most use cases.[2] I think we can learn a lot about good AI agent paradigms from game programming, and I enjoyed this article on game state: https://gameprogrammingpatterns.com/state.html
At the end, they mention that game AI doesn’t often use state machines anymore, because the structure they impose is limiting.
Also, the folks behind Temporal are anti-state-machine:
https://pages.temporal.io/download-state-machines-simplified...
https://community.temporal.io/t/workflow-maintainability-abs...
[1]: our goal is to be an open-source alternative to the OpenAI Assistants API, not to compete with LangGraph, but there is overlap
[2]: I understand that LangGraph is not a state machineI'll take a look at your repo!
Is there a succinct explanation of the value that pregel brings to LangGraph? Is it the 3 items I mentioned?
Thanks for explaining! I didn't fully grok this from the LangGraph docs
Honestly I'm happy to be proven wrong about the usefulness of it.
I've used langsmith and found it quite useful. I think I was just so jaded by my bad experience with Langchain, that I'm immediately skeptical of other "lang" products.
That being said, it's not doing that much. And you still end up having to use some of langchain's abstractions. If this current "make a cyclical graph of LLM agents that send messages to each other" thing has any staying power than I imagine we'll see a more robust option soon. Personally I'd love a way to build agent graphs in a strongly typed language with first class concurrency.
For our DSL (BAML https://github.com/BoundaryML/baml ) we found that adding a VSCode playground to visualize LLM function inputs and outputs was a massive win in terms of debuggability and testability, so I can see why langraph is going this way.
Looking for similar tools for a project am working on.
I don't complain actively about LangChain because this seems widely understood at this point, and apologize for being abrupt, but at some point, when this behavior is repeated, the assumption shifts from "lack of perspective on our own work", which we all suffer from, into "feigned naivete designed to mislead"
You know, thinking on it, the factor you mention gets it more likely to get you funding, and the funding is what lets you live in an echo chamber.
Tis sort of close-minded navel-gazing happened all. the. time. at Google. I call it "rich people thinking" but it might just be the penultimate white collar thing. At some point the "success" of being there is widely considered enough, and anyone speaking up is either crazy or not a team player.
Even when you've been watching the naked emperor together for 6 months.
Even when "speaking up" is hilariously non-negative, ex. "just a thought exercise, is it possible the emperor does not have 1000 layers of clothes? if so, maybe possibly could I do some work to contribute to the team that could consider an action plan to account for any anticipated negative effect in the market if, possibly, it is shown they are lacking some clothes?"
There's plenty of obviously coarse contrarians, I used to think complaining about this sort of thing was for chumps who couldn't communicate. It's not. Social problems tend to be well-known, drive ~all variability in results, and simple enough that a middle schooler would grok them.
This repo, for instance, makes no claims of AGI. It just claims to help bootstrap a starting point for a software project: "it will not attempt to write the logic to fill in the nodes and edges."
I agree, my heart says they know they're lying too, but that seems worse than assuming they're suffering from self-blindness, since we all do and that bears less intention
Imo it is a more promising way to make agents, than the prior approach of just giving an LLM N tools to use at once.
one I saw recently, obvs not the only one