Skip to content

Conversation

@timon0305
Copy link

Summary

Implements the /insight command for session analysis and personalization as described in #1929.

  • Adds InsightTool that scans historical conversation data from ~/.openhands/conversations
  • Identifies usage patterns (most used actions, tools, average events per session)
  • Detects bottlenecks (high error rates, repetitive action patterns)
  • Generates HTML dashboard reports with Chart.js visualizations
  • Provides optimization suggestions for skill/workflow improvements
  • Handles schema incompatibility with older session formats gracefully

Test plan

  • Unit tests added (15 tests in tests/tools/insight/)
  • Tested with real conversation data
  • Verify HTML report renders correctly in browser

Files added

  • openhands-tools/openhands/tools/insight/__init__.py - Package exports
  • openhands-tools/openhands/tools/insight/definition.py - Action/Observation schemas and ToolDefinition
  • openhands-tools/openhands/tools/insight/executor.py - Core analysis logic
  • tests/tools/insight/__init__.py - Test package
  • tests/tools/insight/test_insight_tool.py - Unit tests
  • examples/01_standalone_sdk/31_insight_tool.py - Example usage

Closes #1929

)

Implement /insight command that scans conversation history and generates
usage reports with optimization suggestions.

Features:
- Analyzes historical sessions from ~/.openhands/conversations
- Identifies usage patterns (most used actions, tools, avg events)
- Detects bottlenecks (high error rates, repetitive patterns)
- Generates HTML dashboard reports with Chart.js visualizations
- Provides skill/workflow optimization suggestions
- Handles schema incompatibility with older session formats gracefully

Files added:
- openhands-tools/openhands/tools/insight/ - InsightTool implementation
- tests/tools/insight/ - Unit tests (15 tests)
- examples/01_standalone_sdk/31_insight_tool.py - Example usage

Closes OpenHands#1929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Implement /insight command for session analysis and personalization

1 participant