Skip to content

[FEATURE] Summarize the steps when max steps limit reached #4150

@Hailong-am

Description

@Hailong-am

Is your feature request related to a problem?
Currently, when agent max step limit reached, it will return a default message like
Agent reached maximum iterations 20 without completing the task, It doesn't have too much meaning of what the agent have been done, it's better to summarize all the steps in this run and return the summary instead.

String incompleteResponse = (lastThought.get() != null && !lastThought.get().isEmpty() && !"null".equals(lastThought.get()))
? String.format("%s. Last thought: %s", String.format(MAX_ITERATIONS_MESSAGE, maxIterations), lastThought.get())
: String.format(MAX_ITERATIONS_MESSAGE, maxIterations);

What solution would you like?

Add a option to let summarize all the steps when steps limit reached.

we have max_iteration for the total steps, maybe a new parameter like summarize_when_max_iteration: true

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

On-deck

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions