langgraph/tutorials/plan-and-execute/plan-and-execute/ #571
Replies: 17 comments 19 replies
-
Curious if anyone has ever built anything leveraging this in combination with 'human in the loop' components - meaning AI plans and executes the overall project and escalates to different human agents when needed. |
Beta Was this translation helpful? Give feedback.
-
I am not sure why I am getting an error of canot concatenate list with a tuple, I literally copied the code and pasted it |
Beta Was this translation helpful? Give feedback.
-
What is the disadvantages of this "plan-and-execute" style agent? If my task is simple, should I use this solution? When multiple agents collaboration, I think the messages passed between agents may cause misunderstanding. So I think when there's a simple task, it's better to use a single agent instead of multiple agents. Am I right? |
Beta Was this translation helpful? Give feedback.
-
Regarding the construction of def messages_modifier(messages: list):
prompt = ChatPromptTemplate.from_messages([
("system", "You are a helpful assistant."),
("placeholder", "{messages}"),
])
return prompt.invoke({"messages": messages})
agent_executor = create_react_agent(llm, tools, messages_modifier=messages_modifier) Note: The prompt placeholder is slightly different from the one on LangHub. |
Beta Was this translation helpful? Give feedback.
-
Is the List type Plan step working always? steps: List[str] = Field(
description="different steps to follow, should be in sorted order"
) I get following error
|
Beta Was this translation helpful? Give feedback.
-
This is one of the worst documents I've ever seen. The sample code is uncommented, each example is not runnable independently, and the correlation between the examples is unclear. It is a waste of time... |
Beta Was this translation helpful? Give feedback.
-
The strange plan and action always be right here nomatter what linput. Anybody knows what happenedand how to fix it?
|
Beta Was this translation helpful? Give feedback.
-
should I modify PlanExecute and Plan classes? or it can run without any changes? I got the following error: replanner = replanner_prompt | self.llm.with_structured_output(Act). ValueError: Value not declarable with JSON Schema, field: name='action_Response' type=Response required=True |
Beta Was this translation helpful? Give feedback.
-
InvalidUpdateError: Must write to at least one of ['messages']
|
Beta Was this translation helpful? Give feedback.
-
I pasted these codes,
but raised the erro
What's the reason causing this? |
Beta Was this translation helpful? Give feedback.
-
An interesting agentic-system pattern can be to use this approach with Map Reduce Paradigm. This will reduce the execution time but if our next step in dependent on the last one response then there will be a constraint. To overcome this, we can improve our planning phase to mark such condition and then decide on the sequential and parrel steps execution. |
Beta Was this translation helpful? Give feedback.
-
I got the got an error "IndexError: list index out of range" when executing the last cell : `config = {"recursion_limit": 20} for event in app.streaputs, config=config):
The response end with [] likely during replan: What could be the problem? |
Beta Was this translation helpful? Give feedback.
-
Why is it when i make an agent without using the create_react_agent i get the following error message: |
Beta Was this translation helpful? Give feedback.
-
Working version for me with attached Langfuse:
|
Beta Was this translation helpful? Give feedback.
-
You know, when learning about your framework and its principles, it would really help if you would not use "helper"-functions like create_react_agent for Agents or TavilySearchResults for Tools in your tutorials. It gives me really hard times grasping your core concepts if you apply different strategies but do not at least reference those core concepts. For example, I cannot find a clear definition for what an Agent actually is in your docs. Coming from LangChain, I initially understood it as a Python function. To my current understanding an Agent in LangGraph is an assembly of nodes in the Graph. But still, there is this create_react_agent function for whatever reason you even recommend to not use. So, please stick to your core concepts and repeat them as often as possible in your tutorials and guides. Seeing them multiple times in different tutorials would give a nice learning effect and the assurance of having understood them correctly. Currently, this mixture of strategies for solving the same problems is utterly confusing. |
Beta Was this translation helpful? Give feedback.
-
task_formatted = f"""For the following plan: I think I've found a mistake. Because step {1} is hard-coded, each LLM mistakenly thinks it is currently in the first step. |
Beta Was this translation helpful? Give feedback.
-
FWIW, the with_structured_output doesn't seem to work with ChatOllama and ChatCohere out of box. For ChatOllama, I needed to change to prompt to be:
Without the last sentence, the For ChatCohere, nothing seems to work. |
Beta Was this translation helpful? Give feedback.
-
langgraph/tutorials/plan-and-execute/plan-and-execute/
Build language agents as graphs
https://langchain-ai.github.io/langgraph/tutorials/plan-and-execute/plan-and-execute/
Beta Was this translation helpful? Give feedback.
All reactions