mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
- Add MediaTool for native image/video support with configurable limits - MediaLimits dataclass configurable via HANZO_MEDIA_* env vars - Actions: load, load_batch, optimize, resize, extract_frames, info, limits, status - Hard caps enforced: 100 images, 32MB payload, 4096px max resolution - Default optimal targets: 768px, 85% JPEG quality - Fixed requires-python to >=3.12 (was >=3.11) - Bump hanzo-tools-computer to v0.3.0 Environment variables: HANZO_MEDIA_MAX_IMAGES=100 # Max images per batch HANZO_MEDIA_MAX_PAYLOAD_MB=32 # Max total payload in MB HANZO_MEDIA_MAX_RESOLUTION=1568 # Max image dimension HANZO_MEDIA_OPTIMAL_SIZE=768 # Target size for optimization HANZO_MEDIA_JPEG_QUALITY=85 # JPEG quality (1-100)
hanzo-tools-computer
Computer control tools for Hanzo AI - pyautogui-based Mac automation.
Installation
pip install hanzo-tools-computer
Usage
from hanzo_tools.computer import ComputerTool, register_tools
# Register with MCP server
register_tools(mcp_server, permission_manager)
Actions
Mouse
click- Click at (x, y)double_click- Double click at (x, y)right_click- Right click at (x, y)move- Move mouse to (x, y)drag- Drag to (x, y)scroll- Scroll by amount
Keyboard
type- Type text stringpress- Press single keyhotkey- Press key combination
Screen
screenshot- Capture screenlocate- Find image on screeninfo- Get screen/mouse info
Examples
# Click at coordinates
computer(action="click", x=100, y=200)
# Type text
computer(action="type", text="Hello world")
# Keyboard shortcut (Cmd+C on Mac)
computer(action="hotkey", keys=["command", "c"])
# Take screenshot
computer(action="screenshot")
# Get screen info
computer(action="info")
Safety
- FAILSAFE enabled: Move mouse to corner to abort
- macOS only (checks platform)
- All actions run in executor threads (non-blocking)
License
MIT