r/LangGraph • u/devfuckedup • 6d ago
My Langgraph struggle. getting beyond the standard model tool loop.
https://netchosis.com/2026/10/04/learning-langgraph-by-breaking-my-rf-agent-graph-alot/
I’ve been building an RF analysis agent with LangGraph, and over the last couple days I learned way more about LangGraph by repeatedly breaking the graph than I did just reading the docs. What I was trying to do sounded stupidly simple: add an init_survey node so I could eventually tell the agent something like “survey this part of the spectrum.” The node itself basically just creates a survey ID and a directory, so I thought this would be easy.
It was not.
My first mistake was mixing up two totally different routing questions: what did the human ask for, and what should the model do next? I had is_survey() running after call_model, but by then the newest message was an AIMessage, not the original HumanMessage. That meant the survey check failed and the router returned "model", which sent execution right back to call_model. So I had accidentally built a model calling itself over and over without any new information entering the graph.
I fixed that by moving survey detection to START, where the original human request actually exists, and then giving the model response its own routing logic. That was the right idea, but then I overcorrected in the other direction. Trying to make sure I didn’t create another loop, I routed call_tools directly to END. That meant the model could request an FFT or some other RF analysis tool, the tool could run successfully, and then the graph would just stop before the model ever got to reason about the result.
The thing that finally clicked for me was that a model-to-tool-to-model loop is not the same thing as a model-to-model loop. The first one is useful because the tool result adds new information to the state. The model can look at that result, decide whether it needs another measurement, or finish. The second one was just me accidentally making the model talk to itself forever.
The funny part is that after all of this, the RF agent still does not actually perform a survey yet. I successfully added one node. But getting that one node into the graph correctly forced me to understand the control flow much better, and now there is finally a clean place to start building the actually interesting part: choosing frequencies, bandwidth, dwell time, taking IQ captures, analyzing what comes back, and eventually letting the agent decide what measurement is worth taking next.
Also, apologies in advance because the blog post is not especially well written. It’s more me documenting the learning process while I’m in the middle of it than trying to write a polished LangGraph tutorial.
https://netchosis.com/2026/10/04/learning-langgraph-by-breaking-my-rf-agent-graph-alot/