OpenHands Main Execution Flow

OpenHands Main Execution Flow A sequence diagram generated by Archify. POST /api/conversations start() LocalConversation(...) WS /sockets/session/{id} POST /events run=true send_message + run arun() task step(conv, on_event) View msgs + tools tool_calls ActionEvent tool(action, conv) Observation ObservationEvent event frames (after_seq) Create Message + run Agent step (repeats) Stream Canvas · browser client · Sequence participant Canvas browser client Agent Server · routers · Sequence participant Agent Server routers EventService · per conversation · Sequence participant EventService per conversation Conversation · LocalConversation · Sequence participant Conversation LocalConversation Agent · step() · Sequence participant Agent step() LLM · LiteLLM · Sequence participant LLM LiteLLM Tool · executor · Sequence participant Tool executor EventLog · + PubSub · Sequence participant EventLog + PubSub Legend main request return async trace message