Instructions to use Wellz1000/hermes-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- HERMES
How to use Wellz1000/hermes-2 with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download tools/computer_use/__init__.py from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 2.06 kB
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/tools/computer_use/__init__.py
- Command line
-
hf download hf://Wellz1000/hermes-2/tools/computer_use/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Wellz1000/hermes-2/resolve/main/tools/computer_use/__init__.py
2.06 kB
| """Computer use toolset β universal (any-model) macOS desktop control. | |
| Architecture | |
| ------------ | |
| This toolset drives macOS apps through cua-driver's background computer-use | |
| primitive (SkyLight private SPIs for focus-without-raise + pid-scoped event | |
| posting). Unlike #4562's pyautogui backend, it does NOT steal the user's | |
| cursor, keyboard focus, or Space β the agent and the user can co-work on the | |
| same machine. | |
| Unlike #4562's Anthropic-native `computer_20251124` tool, the schema here is | |
| a plain OpenAI function-calling schema that every tool-capable model can | |
| drive. Vision models get SOM (set-of-mark) captures β a screenshot with | |
| numbered overlays on every interactable element plus the AX tree β so they | |
| click by element index instead of pixel coordinates. Non-vision models can | |
| drive via the AX tree alone. | |
| Wiring | |
| ------ | |
| * `tool.py` β registers the `computer_use` tool via tools.registry. | |
| * `backend.py` β abstract `ComputerUseBackend`; swappable implementation. | |
| * `cua_backend.py`β default backend; speaks MCP over stdio to `cua-driver`. | |
| * `schema.py` β shared schema + docstring for the generic `computer_use` | |
| tool. Model-agnostic. | |
| * `capture.py` β screenshot post-processing (PNG coercion, sizing, SOM | |
| overlay if the backend did not). | |
| The outer integration points (multimodal tool-result plumbing, screenshot | |
| eviction in the Anthropic adapter, image-aware token estimation, the | |
| COMPUTER_USE_GUIDANCE prompt block, approval hook, and the skill) live | |
| alongside this package. See agent/anthropic_adapter.py and | |
| agent/prompt_builder.py for the salvaged hunks from PR #4562. | |
| """ | |
| from __future__ import annotations | |
| # Re-export the public surface so `from tools.computer_use import ...` works. | |
| from tools.computer_use.tool import ( # noqa: F401 | |
| handle_computer_use, | |
| release_computer_use_session, | |
| set_approval_callback, | |
| check_computer_use_requirements, | |
| get_computer_use_schema, | |
| release_computer_use_session, | |
| ) | |