How ramrohitaws99/openhands works
OpenHands is a platform for AI software-development agents, exposed through an interactive web app and documented headless and CLI modes. The main workflow is a user task entering a session, being advanced by the agent controller and an agent/LLM, then executed in a sandbox runtime that can run commands, edit files, and browse. Results return as observations for the agent and user. The graph includes documented product capabilities and major runtime layers; links without direct source evidence are marked dashed, and some backend wiring is inferred from the README rather than inspected source.
Main entry points: agent_controller.py Agent controller · App.tsx Web application · client.py Runtime client · manager.py Session manager
Components 20
User interfaces
- Web application
frontend/src/App.tsx - Chat interface
frontend/src/components/chat/ChatInterface.tsx - Workspace and files
frontend/src/components/Workspace.tsx - File service
frontend/src/services/fileService.ts - CLI entry point
openhands/core/cli.py
Sessions and control
- Session manager
openhands/server/session/manager.py - Agent session
openhands/server/session/session.py - Agent controller
openhands/controller/agent_controller.py - Task state
openhands/controller/state/state.py
Agents and models
- Agent implementations
agenthub - Action parsing
openhands/controller/action_parser.py - LLM provider layer
openhands/llm/llm.py - Actions and observations
openhands/events
Execution runtime
- Sandbox runtime
openhands/runtime/runtime.py - Runtime client
openhands/runtime/client/client.py - Browser environment
openhands/runtime/browser/browser_env.py - Runtime plugins
openhands/runtime/plugins
Platform services
- File storage
openhands/storage/files.py - Security analysis
openhands/security/analyzer.py
Other components
- Developer
Connections 22
- Developer → Web application: uses
README.md - Web application → Chat interface: renders
frontend/src/App.tsx - Web application → Workspace and files: renders
frontend/src/App.tsx - Workspace and files → File service: requests files
- Web application → Session manager: sends tasks
- Session manager → Agent session: creates
openhands/server/session/manager.py - Agent session → Agent controller: runs agent
- Agent controller → Agent implementations: steps
openhands/controller/agent_controller.py - Agent controller → Task state: updates
openhands/controller/agent_controller.py - Agent controller → LLM provider layer: creates for delegate
openhands/controller/agent_controller.py - Agent controller → Actions and observations: handles events
openhands/controller/agent_controller.py - Agent implementations → Action parsing: parses responses
agenthub/codeact_agent/action_parser.py - Action parsing → Actions and observations: produces actions
agenthub/codeact_agent/action_parser.py - Agent implementations → LLM provider layer: requests completions
- Agent controller → Sandbox runtime: dispatches actions
- Sandbox runtime → Runtime client: hosts
- Runtime client → Browser environment: uses
openhands/runtime/client/client.py - Runtime client → Runtime plugins: loads plugins
openhands/runtime/client/client.py - Runtime client → Actions and observations: executes actions
openhands/runtime/client/client.py - Session manager → File storage: receives store
openhands/server/session/manager.py - Developer → CLI entry point: runs headless or interactive
README.md - Web application → Security analysis: offers security view