Every LangGraph user I know is making the same mistake! They all use the popular supervisor pattern to build conversational agents. The pattern defines a supervisor agent that analyzes incoming queries and routes them to specialized sub-agents. Each sub-agent handles a specific domain (returns, billing, technical support) with its own system prompt. This works beautifully when there's a clear separation of concerns. The problem is that it always selects just one route. For instance, if a customer asks: "I need to return this laptop. Also, what's your warranty on replacements?" The supervisor routes this to the Returns Agent, which knows returns perfectly but has no idea about warranties. So it either ignores the warranty question, admits it can't help, or even worse, hallucinates an answer. None of these options are desired. This gets worse as conversations progress because real users don't think categorically. They mix topics, jump between contexts, and still expect the agent to keep up. This isn't a bug you can fix since this is fundamentally how router patterns work. Now, let's see how we can solve this problem. Instead of routing between Agents, first, define some Guidelines. Think of Guidelines as modular pieces of instructions like this: ``` agent.create_guideline( condition="Customer asks about refunds", action="Check order status first to see if eligible", tools=[check_order_status], ) ``` Each guideline has two parts: - Condition: When it gets activated? - Action: What should the agent do? Based on the user's query, relevant guidelines are dynamically loaded into the Agent's context. For instance, when a customer asks about returns AND warranties, both guidelines get loaded into context simultaneously, enabling coherent responses across multiple topics without artificial separation. This approach is actually implemented in Parlant - a recently trending open-source framework (15k+ stars). Instead of routing between specialized agents, Parlant uses dynamic guideline matching. At each turn, it evaluates ALL your guidelines and loads only the relevant ones, maintaining coherent flow across different topics. You can see the full implementation and try it yourself. That said, LangGraph and Parlant are not competitors. LangGraph is excellent for workflow automation where you need precise control over execution flow. Parlant is designed for free-form conversation where users don't follow scripts. The best part? They work together beautifully. LangGraph can handle complex retrieval workflows inside Parlant tools, giving you conversational coherence from Parlant and powerful orchestration from LangGraph. I have shared the repo in the replies!

Oct 30, 2025 Β· 12:31 PM UTC

If you found it insightful, reshare with your network. Find me β†’ @akshay_pachaar βœ”οΈ For more insights and tutorials on LLMs, AI Agents, and Machine Learning!
Every LangGraph user I know is making the same mistake! They all use the popular supervisor pattern to build conversational agents. The pattern defines a supervisor agent that analyzes incoming queries and routes them to specialized sub-agents. Each sub-agent handles a specific domain (returns, billing, technical support) with its own system prompt. This works beautifully when there's a clear separation of concerns. The problem is that it always selects just one route. For instance, if a customer asks: "I need to return this laptop. Also, what's your warranty on replacements?" The supervisor routes this to the Returns Agent, which knows returns perfectly but has no idea about warranties. So it either ignores the warranty question, admits it can't help, or even worse, hallucinates an answer. None of these options are desired. This gets worse as conversations progress because real users don't think categorically. They mix topics, jump between contexts, and still expect the agent to keep up. This isn't a bug you can fix since this is fundamentally how router patterns work. Now, let's see how we can solve this problem. Instead of routing between Agents, first, define some Guidelines. Think of Guidelines as modular pieces of instructions like this: ``` agent.create_guideline( condition="Customer asks about refunds", action="Check order status first to see if eligible", tools=[check_order_status], ) ``` Each guideline has two parts: - Condition: When it gets activated? - Action: What should the agent do? Based on the user's query, relevant guidelines are dynamically loaded into the Agent's context. For instance, when a customer asks about returns AND warranties, both guidelines get loaded into context simultaneously, enabling coherent responses across multiple topics without artificial separation. This approach is actually implemented in Parlant - a recently trending open-source framework (15k+ stars). Instead of routing between specialized agents, Parlant uses dynamic guideline matching. At each turn, it evaluates ALL your guidelines and loads only the relevant ones, maintaining coherent flow across different topics. You can see the full implementation and try it yourself. That said, LangGraph and Parlant are not competitors. LangGraph is excellent for workflow automation where you need precise control over execution flow. Parlant is designed for free-form conversation where users don't follow scripts. The best part? They work together beautifully. LangGraph can handle complex retrieval workflows inside Parlant tools, giving you conversational coherence from Parlant and powerful orchestration from LangGraph. I have shared the repo in the replies!
4
Replying to @akshay_pachaar
Great explanation!! I recently read the paper that details the reasoning technique (ARQ) that powers this engine. In a gist, instead of letting LLMs reason freely, ARQs guide the Agent through explicit, domain-specific questions. For instance, before it makes a recommendation or decides on a tool call, the LLM is prompted to fill structured keys like: ``` { "current_context": "Customer asking about refund eligibility", "active_guideline": "Always verify order before issuing refund", "action_taken_before": false, "requires_tool": true, "next_step": "Run check_order_status()" } ``` This helps reinstate critical instructions by keeping the LLM aligned mid-conversation and avoiding hallucinations. So by the time the LLM generates the final response, it’s already walked through a sequence of controlled reasoning steps, without doing any free-form reasoning that happens in techniques like CoT or ToT. This visual explains it:
1
17
Wonderful! Another key advantage is that dynamic guidelines keep the system prompt clean, ensuring the agent receives only the right instructions at the right time.
1
Replying to @akshay_pachaar
This moves the "skill" from the agent to the guideline. It’s a more granular "Single Responsibility Principle," which is much more flexible than a single router.
1
2
Absolutely! πŸ’―
1
Replying to @akshay_pachaar
Exactly, even popular patterns can backfire if everyone blindly follows them without adapting.
1
2
Exactly! And when it’s comes to building conversational AI, humans are tricky and not easy to handle. You can not use patterns like a silver bullet.
1
Replying to @akshay_pachaar
sounds synonymous to Claude Skills feature
1
2
Couldn't agree more! πŸ’― Skills : Agent context :: Guidelines : System prompt
2
Replying to @akshay_pachaar
Isn’t this claude skills?
1
1
There’s striking similarities at fundamental level. πŸ’― This however is meant for Conversational agents.
Replying to @akshay_pachaar
This seems like another form of "skills" that claude just released. Where the different skills are used to solve the flows and problems independently. Its just making sure that all the parts are handled.
2
1
Yes the ideas are certainly relatable! πŸ’―
1
Replying to @akshay_pachaar
I know that in LangGraph, we can call multiple tools, each as a sub-agent. Thus, LangGraph solves the problem. This is just a theory from what I learned from the documentation.
2
1
Yes, you can implement similar flows in LangGraph, but you need to understand the costs associated and the engineering effort required to do so. Firstly, dynamic guideline matching β‰  intent routing. Routing β€œreturns” vs β€œwarranty” is intent classification. Guideline matching needs a scoring and conflict-resolution engine that can evaluate multiple conditions per turn, distinguish continuous vs one-time actions, handle partial fulfillment and re-application, and weigh conflicting rules based on priorities and scope of the conversation. So you’ll have to design schemas, thresholds, and lifecycle rules, not just edges between nodes. Secondly, verification and revision loops are essential (especially in high-stakes environments). If you want consistent behavior, you’d need to add a structured self-check: β€œDid I break any high-priority rules? Are all facts sourced from the allowed context?” That implies a JSON-logged revision cycle, not just a single LLM call per node. Thirdly, token budgeting is another problem. Loading all relevant instructions is easy to say and hard to do without blowing context. You’ll need ordering policies (recency > global), deduplication, summarization, slot-filling, and hard budgets per turn so the model stays focused and costs/latency remain predictable. Lastly, the reasoning technique used by Parlant (called ARQ) is precisely built to get precise control over Agents.
Replying to @akshay_pachaar
You can have the supervisor select a set of relevant agents instead of just one though
I get your point. However, real users don't think categorically. They mix topics, jump between contexts, and still expect the agent to keep up at every turn of the conversation. You need something that can dynamically load context at every turn. That's where @ParlantIO shines!
Replying to @akshay_pachaar
The best solution that works in my case if build your custom router which can be combination of small ml model like tiny bert, bm 25 and classic n gram matching. You can do some kind of weighted voting and router should work like giving answer to multiple choice questions.
What if you are doing a multi-turn conversation, and at every turn you need to dynamically load context (do routing)? That's where Parlant would shine.
Replying to @akshay_pachaar
You really got it! Thanks for sharing @akshay_pachaar
1
1
Replying to @akshay_pachaar
Interesting point. Dynamic guidelines could really enhance context handling.
1
1
Exactly! Also improves instruction following.
Replying to @akshay_pachaar
Beautiful breakdown
Replying to @akshay_pachaar
About parlant:
You spend 20 minutes writing the PERFECT prompt for an AI. You list all your constraints, give it clear examples, and press enter. ...and it ignores your single most important instruction. πŸ€¦β€β™‚οΈ Why does this happen? And how do we fix it? A new paper has a brilliant answer. 🧡 --- This isn't just you. It's a fundamental flaw in LLMs. Researchers call it "context forgetfulness" or "alignment drift." Think of the AI as a brilliant but incredibly distracted student. It gets excited and forgets the rules written on the first page of the exam. The longer the conversation, the worse it gets. --- The first big fix for this was "Chain-of-Thought" (CoT) prompting. This is the famous "Let's think step by step" trick. It encourages the AI to reason before answering. It's like telling that distracted student, "Just think harder!" It helps, but it doesn't give them a structure for their thinking. But what if, instead of just telling it to think, you gave it a mandatory checklist? --- This is the core idea behind a new method called Attentive Reasoning Queries (ARQs). Instead of a blank page for reasoning (CoT), you give the AI a structured worksheet. A JSON "blueprint" with specific questions it MUST answer before giving you a final response. It's a game-changer. --- Here’s the difference: ❌ Old Way (CoT): "Pick a restaurant for my group. Jane is vegetarian and John wants a burger." AI thinks: "Okay, vegetarian, burger... Bob's Burgers has both. I'll suggest that."* βœ… New Way (ARQ): The AI is FORCED to fill this out first: { "constraints": ["Jane is vegetarian"], "preferences": ["John wants a burger"], "evaluation_of_Bobs": "Has veggie options AND burgers.", "final_decision": "Bob's Burgers" } See the difference? It's not allowed to forget the constraints. --- This works because it weaponizes a known LLM weakness: recency bias. LLMs pay most attention to the information at the very end of the prompt. By forcing the AI to answer these queries right before generating its response, you're putting the rules front-and-center in its attention. --- And the results are stunning. In a head-to-head test on GPT-4o, the ARQ method achieved a 90.2% success rate, beating both Chain-of-Thought (86.1%) and direct prompting (81.5%). It was especially powerful at preventing hallucinations and forcing the AI to re-apply rules in long conversations. --- The secret to unlocking an AI's genius isn't more freedom. It's smarter constraints.
Replying to @akshay_pachaar
Brother, put your logo/brand on the content that u created.. I saw people stealing yr work and putting their logo on it shamelessly
1
Replying to @akshay_pachaar
Most "supervisor agents" are prompt bloat in disguise. 90% of agentic processes could be a simple prompt + function calling chains. Many use LangGraph for what should be conditional logic. This guideline pattern is legitimately clean and worth using with or without the Parlant framework. A simple pattern is to detect and decompose multi-question queries and route each question to the appropriate downstream logic. State, memory, etc., can all be composed around this. But Parlant-style guidelines are quite a nice pattern for scalable decomposition
1