Overview
OpenHands Software Agent SDK is a Python SDK for building AI software agents that can work with code. It provides tools for terminal access, file editing, task tracking, and browser automation, enabling agents to perform software development tasks.What Laminar captures
- The entire structure of the OpenHands SDK conversation flow, including agent steps and tool calls.
- LLM prompts and responses sent to the model via LiteLLM.
- Tool calls (
bash,file_editor,task_tracker, etc.) and their results. - Latencies, token counts, and token costs.
- Conversation sessions grouped by their unique conversation ID.
- Browser session replays when using browser-use tools.
Getting started
Install uv package manager
The OpenHands SDK requires the uv package manager (version 0.8.13+):
Automatic instrumentation
The OpenHands SDK automatically instruments the following when Laminar is initialized:- Conversations: Each conversation is traced as a session, with the conversation UUID used as the session ID.
- Agent steps: Each
agent.stepiteration is captured as a span within the conversation trace. - LLM calls: All LLM calls via LiteLLM are automatically traced with prompts, responses, token counts, and costs.
- Tool calls: Terminal commands (
bash), file edits (file_editor), and other tool executions are captured with their inputs and outputs. - Browser sessions: When using browser-use tools, session replays are automatically captured.
Trace hierarchy
Traces are organized hierarchically:Alternative OTEL configuration
For non-Laminar OpenTelemetry backends, you can configure the SDK using standard OTEL environment variables:View the traces in Laminar
Go to the Laminar dashboard, and you will see the traces for the OpenHands SDK. Each conversation appears as a separate session, making it easy to track multi-turn interactions. The trace view shows:- The conversation span as the root
- Nested spans for each agent step
- LLM calls with prompts, responses, and token usage
- Tool calls with their inputs and outputs
