Skip to content

[FEATURE] make event loop settings configurable #283

@liuyangc3

Description

@liuyangc3

Problem Statement

now the settings are hardcode in event_loop.py

MAX_ATTEMPTS = 6
INITIAL_DELAY = 4
MAX_DELAY = 240  # 4 minutes

Proposed Solution

For example pass a parameter like event_loop_config into Agent

agent =Agent(
    model="...",
    system_prompt="..."
    event_loop_config={
        "max_attempts": 6,
        "initial_delay": 4,
        "max_delay": 240
    }
)

Use Case

To control event_loop behaviour, for example sometimes we'd like code fail fast for testing purpose, we dont want too much retries.

Alternatives Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestto-refineIssue needs to be discussed with the team and the team has come to an effort estimate consensus

Type

No type

Projects

Status

Just Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions