Skip to content

Enhance ReActAgent's behavior with new messages during invocation #456

@coderabbitai

Description

@coderabbitai

Current Behavior

When new messages arrive during ReActAgent's invocation, they are currently queued for later processing.

Desired Enhancement

Consider implementing alternative strategies for handling incoming messages during agent invocation:

  1. Interrupt current invocation: Drop the current invoke to respond to new data as quickly as possible. This would prioritize responsiveness to new information.

  2. Prioritize current processing: Option to drop new messages when the agent is busy, prioritizing the completion of the current task.

Benefits

  • More flexible message handling would improve the agent's responsiveness in time-sensitive scenarios
  • Allow for different operation modes depending on the use case (e.g., interactive vs. batch processing)
  • Provide more control over the agent's attention management

Implementation Considerations

  • Add configuration options to specify the preferred behavior
  • Consider how to gracefully interrupt ongoing processing
  • Implement appropriate notification mechanisms when messages are dropped

Ref: PR #450

Metadata

Metadata

Assignees

Labels

priority/majorImportant work that comes next after all critical and blocking tasks are completed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions