Skip to content

[FEATURE] make event loop settings configurable #283

Open
@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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions