Skip to main content
OpenHands can enhance every phase of your software development lifecycle (SDLC), from planning through deployment. This guide shows some example prompts that you can use when you integrate OpenHands into your development workflow.

Integration with Development Workflows

Planning Phase

Use OpenHands during planning to accelerate technical decisions: Technical specification assistance:
Create a technical specification for adding search functionality:

Requirements from product:
- Full-text search across products and articles
- Filter by category, price range, and date
- Sub-200ms response time at 1000 QPS

Provide:
1. Architecture options (Elasticsearch vs. PostgreSQL full-text)
2. Data model changes needed
3. API endpoint designs
4. Estimated implementation effort
5. Risks and mitigations
Sprint planning support:
Review these user stories and create implementation tasks in our Linear task management software using the LINEAR_API_KEY environment variable:

Story 1: As a user, I can reset my password via email
Story 2: As an admin, I can view user activity logs

For each story, create:
- Technical subtasks
- Estimated effort (hours)
- Dependencies on other work
- Testing requirements

Development Phase

OpenHands excels during active development: Feature implementation:
  • Write new features with clear specifications
  • Follow existing code patterns automatically
  • Generate tests alongside code
  • Create documentation as you go
Bug fixing:
  • Analyze error logs and stack traces
  • Identify root causes
  • Implement fixes with regression tests
  • Document the issue and solution
Code improvement:
  • Refactor for clarity and maintainability
  • Optimize performance bottlenecks
  • Update deprecated APIs
  • Improve error handling

Testing Phase

Automate test creation and improvement:
Add comprehensive tests for the UserService module:

Current coverage: 45%
Target coverage: 85%

1. Analyze uncovered code paths using the codecov module
2. Write unit tests for edge cases
3. Add integration tests for API endpoints
4. Create test data factories
5. Document test scenarios

Each time you add new tests, re-run codecov to check the increased coverage. Continue until you have sufficient coverage, and all tests pass (by either fixing the tests, or fixing the code if your tests uncover bugs).

Review Phase

Accelerate code reviews:
Review this PR for our coding standards:

Check for:
1. Security issues (SQL injection, XSS, etc.)
2. Performance concerns
3. Test coverage adequacy
4. Documentation completeness
5. Adherence to our style guide

Provide actionable feedback with severity ratings.

Deployment Phase

Assist with deployment preparation:
Prepare for production deployment:

1. Review all changes since last release
2. Check for breaking API changes
3. Verify database migrations are reversible
4. Update the changelog
5. Create release notes
6. Identify rollback steps if needed

CI/CD Integration

OpenHands can be integrated into your CI/CD pipelines through the Software Agent SDK. Rather than using hypothetical actions, you can build powerful, customized workflows using real, production-ready tools.

GitHub Actions Integration

The Software Agent SDK provides composite GitHub Actions for common workflows: For example, to set up automated PR reviews, see the Automated Code Review guide which uses the real OpenHands/software-agent-sdk/.github/actions/pr-review composite action.

What You Can Automate

Using the SDK, you can create GitHub Actions workflows to:
  1. Automatic code review when a PR is opened
  2. Automatically update docs weekly when new functionality is added
  3. Diagnose errors that have appeared in monitoring software such as DataDog and automatically send analyses and improvements
  4. Manage TODO comments and track technical debt
  5. Assign reviewers based on code ownership patterns

Getting Started

To integrate OpenHands into your CI/CD:
  1. Review the SDK Getting Started guide
  2. Explore the GitHub Workflows examples
  3. Set up your LLM_API_KEY as a repository secret
  4. Use the provided composite actions or build custom workflows
See the Use Cases section for complete examples of production-ready integrations.

Team Workflows

Solo Developer Workflows

For individual developers: Daily workflow:
  1. Morning review: Have OpenHands analyze overnight CI results
  2. Feature development: Use OpenHands for implementation
  3. Pre-commit: Request review before pushing
  4. Documentation: Generate/update docs for changes
Best practices:
  • Set up automated reviews on all PRs
  • Use OpenHands for boilerplate and repetitive tasks
  • Keep AGENTS.md updated with project patterns

Small Team Workflows

For teams of 2-10 developers: Collaborative workflow:
Team Member A: Creates feature branch, writes initial implementation
OpenHands: Reviews code, suggests improvements
Team Member B: Reviews OpenHands suggestions, approves or modifies
OpenHands: Updates documentation, adds missing tests
Team: Merges after final human review
Communication integration:
  • Slack notifications for OpenHands findings
  • Automatic issue creation for bugs found
  • Weekly summary reports

Enterprise Team Workflows

For larger organizations: Governance and oversight:
  • Configure approval requirements for OpenHands changes
  • Set up audit logging for all AI-assisted changes
  • Define scope limits for automated actions
  • Establish human review requirements
Scale patterns:
Central Platform Team:
├── Defines OpenHands policies
├── Manages integrations
└── Monitors usage and quality

Feature Teams:
├── Use OpenHands within policies
├── Customize for team needs
└── Report issues to platform team

Best Practices

Code Review Integration

Set up effective automated reviews:
# .openhands/review-config.yml
review:
  focus_areas:
    - security
    - performance
    - test_coverage
    - documentation
  
  severity_levels:
    block_merge:
      - critical
      - security
    require_response:
      - major
    informational:
      - minor
      - suggestion
  
  ignore_patterns:
    - "*.generated.*"
    - "vendor/*"

Pull Request Automation

Automate common PR tasks:
TriggerAction
PR openedAuto-review, label by type
Tests failAnalyze failures, suggest fixes
Coverage dropsIdentify missing tests
PR approvedUpdate changelog, check docs

Quality Gates

Define automated quality gates:
quality_gates:
  - name: test_coverage
    threshold: 80%
    action: block_merge
  
  - name: security_issues
    threshold: 0 critical
    action: block_merge
  
  - name: code_review_score
    threshold: 7/10
    action: require_review
  
  - name: documentation
    requirement: all_public_apis
    action: warn

Automated Testing

Integrate OpenHands with your testing strategy: Test generation triggers:
  • New code without tests
  • Coverage below threshold
  • Bug fix without regression test
  • API changes without contract tests
Example workflow:
on:
  push:
    branches: [main]

jobs:
  ensure-coverage:
    steps:
      - name: Check coverage
        run: |
          COVERAGE=$(npm test -- --coverage | grep "All files" | awk '{print $10}')
          if [ "$COVERAGE" -lt "80" ]; then
            openhands generate-tests --target 80
          fi

Common Integration Patterns

Pre-Commit Hooks

Run OpenHands checks before commits:
# .git/hooks/pre-commit
#!/bin/bash

# Quick code review
openhands review --quick --staged-only

if [ $? -ne 0 ]; then
    echo "OpenHands found issues. Review and fix before committing."
    exit 1
fi

Post-Commit Actions

Automate tasks after commits:
# .github/workflows/post-commit.yml
on:
  push:
    branches: [main]

jobs:
  update-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Update API docs
        run: openhands update-docs --api
      - name: Commit changes
        run: |
          git add docs/
          git commit -m "docs: auto-update API documentation" || true
          git push

Scheduled Tasks

Run regular maintenance:
# Weekly dependency check
on:
  schedule:
    - cron: '0 9 * * 1'  # Monday 9am

jobs:
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check dependencies
        run: |
          openhands check-dependencies --security --outdated
      - name: Create issues
        run: openhands create-issues --from-report deps.json

Event-Triggered Workflows

You can build custom event-triggered workflows using the Software Agent SDK. For example, the Incident Triage use case shows how to automatically analyze and respond to issues. For more event-driven automation patterns, see: