How oraichain/openhands works
• Frontend/UI: Represented by the “frontend” directory. This is the web client (built with React/TypeScript) that users interact with. It handles authentication, chat interfaces, GitHub connectivity, file explorer, settings, and various interactive features.
• Core Agent & Controller Modules: Group the “openhands/agenthub”, “openhands/controller”, “openhands/core”, “openhands/llm”, “openhands/microagent”, and “openhands/events”. These modules form the AI agent logic and orchestration layer. They are responsible for parsing user input, dispatching actions to agents, managing the multiagent workflows, and handling agent feedback or observations.
• Storage & Memory: Represent modules like “openhands/storage” and “openhands/memory” where conversation history, session data, and file states are stored.
• Backend to the Agent/Controller modules. Illustrate requests for code execution, messaging, and agent coordination.
• Storage component as a separate module that is consumed by the Backend and Agent layers for persisting conversations, file edits, and configuration/state information.
Architectural Patterns and Design Principles
• Modularity—the system is broken down into distinct modules (agent logic, integration, runtime, storage) that communicate through well-defined APIs.
• Containerization and deployment abstraction (Docker, Kubernetes flags, runtime builders, and isolated execution environments).
• Separation of concerns between user interface, API server logic, agent decision making, execution, and testing.
Technologies and Frameworks to Note
• Frontend: React/TypeScript (from the “frontend” directory, with tests, React components, hooks).
• Backend: Python-based modules running the OpenHands server (likely using a lightweight framework, with REST and WebSocket endpoints).
• Docker: Multiple container definitions and Dockerfiles (in “containers” and “docker-compose.yml”) represent the deployment and runtime environments.
• Testing Frameworks: A rich set of unit, integration, and regression tests (files under “tests” and “evaluation”), ensuring reliability.
• Integration with external code hosting and AI models (GitHub/Latte integrations, Anthropic API keys, etc.).