Skip to content

Request for a Resume API for a Run #32

@MadaraUchiha-314

Description

@MadaraUchiha-314

Problem

When a run is created in a thread, the agent which is running might go into an interrupted state. This puts the run in an interrupted state. This also puts the thread in an interrupted state.

Question: How do we resume that run by resolving (or providing a response for) the interrupt ?

Solution Workaround:

Create a new run on the thread with a custom payload passed about the previous run_id and some indication that the previous run has to be resumed. Using the previous run_id, one can locate the agent_id which was invoked and resume that agent from a checkpoint.

This is custom business logic layer that's implemented on top of the API specification which is not at all ideal.

Ideal Solution

Ideally, an update run API should be exposed which can re-run the run from the interrupted state and take it to success/error etc:

POST /threads/{thread_id}/runs/{run_id}

Another alternative is to provide an explicit resume api:

POST /threads/{thread_id}/runs/{run_id}/resume

Any help on this is highly appreciated! If this proposal looks good, I can create a PR to make the change in the API specification as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions