Add adaptive scheduling to minimize time-to-visibility for new installations while maintaining low overhead for established deployments. Two-Phase Scheduling Strategy: ------------------------------- Phase 1 (Bootstrap - No Identity): - Triggered when no user has authenticated yet (no admin email available) - Checks every 3 minutes for first user authentication - Immediately collects and uploads metrics once first user authenticates - Creates Replicated customer/instance identity on first successful upload - Goal: Minimize time between installation and vendor visibility Phase 2 (Normal Operations - Identity Established): - Triggered after identity (customer_id + instance_id) exists in database - Checks every 1 hour (reduced from 3-minute bootstrap interval) - Collects metrics every 7 days - Uploads metrics every 24 hours - Goal: Maintain visibility with minimal resource overhead Implementation Details: ----------------------- 1. Added _is_identity_established() helper method - Checks if both customer_id and instance_id exist in TelemetryIdentity table - Returns True only when identity is fully established 2. Updated _collection_loop() with adaptive intervals - Uses 3-minute interval in bootstrap phase - Switches to 1-hour interval in normal phase - Logs debug messages during bootstrap phase 3. Updated _upload_loop() with adaptive intervals and immediate upload - Uses 3-minute interval in bootstrap phase - Switches to 1-hour interval in normal phase - Detects identity creation and logs first successful upload - Continues with short interval for one cycle after identity creation 4. Added configuration constants - bootstrap_check_interval_seconds = 180 (3 minutes) - normal_check_interval_seconds = 3600 (1 hour) 5. Enhanced error handling - Falls back to bootstrap interval on errors for faster retry 6. Updated class docstring with comprehensive two-phase explanation Benefits: --------- - New installations visible within 3 minutes of first user login (vs up to 1 hour) - Established installations maintain low overhead (hourly checks vs constant polling) - Graceful handling of installations that never get users - Automatic phase transition without manual intervention - Self-optimizing based on deployment state Documentation Updates: --------------------- - Section 4.3: Added two-phase strategy overview - Class docstring: Added detailed phase explanation - Method docstrings: Clarified phase-specific behavior - Inline comments: Explained phase detection and interval selection Co-authored-by: openhands <openhands@all-hands.dev>
OpenHands: AI-Driven Development
🙌 Welcome to OpenHands, a community focused on AI-driven development. We’d love for you to join us on Slack.
There are a few ways to work with OpenHands:
OpenHands Software Agent SDK
The SDK is a composable Python library that contains all of our agentic tech. It's the engine that powers everything else below.
Define agents in code, then run them locally, or scale to 1000s of agents in the cloud.
Check out the docs or view the source
OpenHands CLI
The CLI is the easiest way to start using OpenHands. The experience will be familiar to anyone who has worked with e.g. Claude Code or Codex. You can power it with Claude, GPT, or any other LLM.
Check out the docs or view the source
OpenHands Local GUI
Use the Local GUI for running agents on your laptop. It comes with a REST API and a single-page React application. The experience will be familiar to anyone who has used Devin or Jules.
Check out the docs or view the source in this repo.
OpenHands Cloud
This is a deployment of OpenHands GUI, running on hosted infrastructure.
You can try it with a free $10 credit by signing in with your GitHub account.
OpenHands Cloud comes with source-available features and integrations:
- Integrations with Slack, Jira, and Linear
- Multi-user support
- RBAC and permissions
- Collaboration features (e.g., conversation sharing)
OpenHands Enterprise
Large enterprises can work with us to self-host OpenHands Cloud in their own VPC, via Kubernetes. OpenHands Enterprise can also work with the CLI and SDK above.
OpenHands Enterprise is source-available--you can see all the source code here in the enterprise/ directory, but you'll need to purchase a license if you want to run it for more than one month.
Enterprise contracts also come with extended support and access to our research team.
Learn more at openhands.dev/enterprise
Everything Else
Check out our Product Roadmap, and feel free to open up an issue if there's something you'd like to see!
You might also be interested in our evaluation infrastructure, our chrome extension, or our Theory-of-Mind module.
All our work is available under the MIT license, except for the enterprise/ directory in this repository (see the enterprise license for details).
The core openhands and agent-server Docker images are fully MIT-licensed as well.
If you need help with anything, or just want to chat, come find us on Slack.