{"library":"openhands-tools","title":"OpenHands Tools - Runtime tools for AI agents","description":"OpenHands Tools is a Python SDK providing runtime components and utilities for building AI agents, including core agent definitions, tools, and conversation management. As of version 1.16.1, it focuses on enabling robust and extensible agent development. The library maintains an active release cadence, with frequent minor updates and significant feature additions in its 1.x releases.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install openhands-tools"],"cli":null},"imports":["from openhands.core.agent import Agent","from openhands.core.tools.tool import Tool","from openhands.core.conversation import Conversation"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom openhands.core.agent import Agent\nfrom openhands.core.tools.tool import Tool\nfrom typing import List, Dict, Any\n\n# Define a simple tool function\ndef get_current_weather(location: str) -> str:\n    \"\"\"Get the current weather in a given location.\"\"\"\n    # In a real scenario, this would make an API call to a weather service\n    return f\"The weather in {location} is sunny with 25 degrees Celsius.\"\n\n# Create a Tool instance from the function\nweather_tool = Tool(\n    name=\"get_current_weather\",\n    description=\"Get the current weather in a given location\",\n    func=get_current_weather,\n    args_schema={\n        \"location\": {\"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\"}\n    },\n)\n\n# Define a simple Agent that could potentially use this tool\n# In a real scenario, this agent would be instantiated with an LLM\n# and have more complex logic to interpret tasks and call tools.\nclass MySimpleAgent(Agent):\n    def __init__(self):\n        super().__init__(\n            name=\"SimpleWeatherAgent\",\n            description=\"An agent that can tell the weather.\",\n            tools=[weather_tool]\n        )\n    \n    # The 'run' method would typically interact with an LLM and orchestrate tool usage.\n    # For this quickstart, we'll just demonstrate its structure.\n    def run(self, task: str, *args, **kwargs):\n        print(f\"Agent '{self.name}' received task: '{task}'\")\n        print(f\"Agent's available tools: {[tool.name for tool in self.tools]}\")\n        if \"weather\" in task.lower():\n            print(\"Agent could call 'get_current_weather' if prompted by LLM for weather in a location.\")\n        return \"Agent is ready to process tasks with its tools.\"\n\n# Instantiate and demonstrate the agent\nagent = MySimpleAgent()\nprint(agent.run(\"What's the weather like in New York?\"))\n","lang":"python","description":"This quickstart demonstrates how to define a custom tool and create a basic `Agent` that is configured with this tool. In a full OpenHands runtime, the agent's `run` method would interact with an LLM to dynamically select and execute tools based on the given task.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.22.0","pypi_latest":"1.22.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":20,"avg_install_s":27.9,"avg_import_s":null,"wheel_type":"sdist"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":0.1,"import_time_s":null,"mem_mb":null,"disk_size":"525.1M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":47.3,"import_time_s":null,"mem_mb":null,"disk_size":"506M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"525.0M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":36.3,"import_time_s":null,"mem_mb":null,"disk_size":"505M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"openhands-tools","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}