Skip to content

Exit directly when there is nothing to do with the current task #1033

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zhenjunMa
Copy link
Contributor

@zhenjunMa zhenjunMa commented Apr 6, 2025

Features

  • Exit directly when there is nothing to do with the current task

Feature Docs

Influence

Result

Currently, when using openmanus, inputting tasks that require no further processing (e.g., "hello") causes openmanus to enter an empty loop until max_steps is exceeded. The new change involves instructing the LLM to directly invoke "terminate" to end execution when the current task requires no further processing.

Other

issue: #1025

@zhenjunMa
Copy link
Contributor Author

Another idea is that if the LLM's returned response does not require invoking any tools, set the Agent's state to AgentState.FINISHED. I wonder if this is feasible.

image

@zhenjunMa
Copy link
Contributor Author

zhenjunMa commented Apr 19, 2025

I found that simply adding an explanation to the terminate tool in NEXT_STEP_PROMPT will suffice.
image

@misakayao
Copy link

This prompt adjustment is very effective, hope to be merged.

@zhenjunMa
Copy link
Contributor Author

@mannaandpoem @fred913

any feedback about this? i think many users confused about this

#1133

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

Successfully merging this pull request may close these issues.

2 participants