Skip to content

openhands

openhands

OpenHandsAgent -- wraps the real openhands-sdk for AI-driven development.

Requires the openhands-sdk package (uv sync --extra openhands). For the native CodeAct-style agent, see :mod:openjarvis.agents.native_openhands.

Classes

OpenHandsAgent

OpenHandsAgent(engine: InferenceEngine, model: str, *, bus: Optional[EventBus] = None, temperature: float = 0.7, max_tokens: int = 1024, workspace: Optional[str] = None, api_key: Optional[str] = None)

Bases: BaseAgent

Agent that wraps the real openhands-sdk package.

This is a thin adapter that delegates to the openhands-sdk library for AI-driven software development tasks. Requires openhands-sdk to be installed.

Source code in src/openjarvis/agents/openhands.py
def __init__(
    self,
    engine: InferenceEngine,
    model: str,
    *,
    bus: Optional[EventBus] = None,
    temperature: float = 0.7,
    max_tokens: int = 1024,
    workspace: Optional[str] = None,
    api_key: Optional[str] = None,
) -> None:
    super().__init__(
        engine, model, bus=bus,
        temperature=temperature, max_tokens=max_tokens,
    )
    self._workspace = workspace or os.getcwd()
    self._api_key = api_key or os.environ.get("LLM_API_KEY", "")