Skip to main content

openhands.core.loop

run_agent_until_done

async def run_agent_until_done(controller: AgentController, runtime: Runtime,
end_states: list[AgentState])

run_agent_until_done takes a controller and a runtime, and will run the agent until it reaches a terminal state. Note that runtime must be connected before being passed in here.