Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency with summary_mode for MultiStepAgent._generate_updated_plan #934

Open
Jus-Codin opened this issue Mar 10, 2025 · 1 comment

Comments

@Jus-Codin
Copy link

In MultiStepAgent._generate_updated_plan it mentions that summary_mode is False so as to not extract the previous planning steps from memory.

def _generate_updated_plan(self, task: str, step: int) -> Tuple[ChatMessage, ChatMessage]:
# Do not take the system prompt message from the memory
# summary_mode=False: Do not take previous plan steps to avoid influencing the new plan
memory_messages = self.write_memory_to_messages()[1:]

However, in PlanningStep.to_messages, the previous plan is added to the message history if summary_mode is False.

if not summary_mode: # This step is not shown to a model writing a plan to avoid influencing the new plan
messages.append(
Message(
role=MessageRole.ASSISTANT, content=[{"type": "text", "text": f"[PLAN]:\n{self.plan.strip()}"}]
)
)
return messages

The comment in the above snippet also references hiding the step from a model writing a plan, which means that when writing a plan, summary_mode should be set to True. Am I missing something out here?

@Jus-Codin
Copy link
Author

Just figured out that summary_mode is intended to be used to provided agents with a managed agent's summary of work. However, the above mentioned comments should probably be either removed or changed to avoid confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant