### Clone and setup HoloDesktop CLI from source Source: https://hub.hcompany.ai/holo-desktop-cli/getting-started/quickstart Commands to clone the repository, install dependencies, and verify the installation using uv. ```bash git clone https://github.com/hcompai/holo-desktop-cli cd holo-desktop-cli make setup uv run holo --help ``` -------------------------------- ### Verify HoloDesktop CLI installation Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-as-skill Example task string to verify that the host correctly identifies and utilizes the installed skill. ```text Use HoloDesktop CLI to open TextEdit and write a short note saying the HoloDesktop CLI skill is installed. ``` -------------------------------- ### Start a session response Source: https://hub.hcompany.ai/computer-use-agents/n8n Example response received after successfully creating a session, containing the session ID. ```json { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": {"status": "pending", "steps": 0}, "agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890", "latest_answer": null } ``` -------------------------------- ### Install the client Source: https://hub.hcompany.ai/computer-use-agents/quickstart Install the necessary client library or CLI tool for your preferred environment. ```bash pip install "hai-agents[cli]" ``` ```bash # no install needed, the API is plain HTTP ``` ```bash pip install hai-agents ``` ```bash npm install hai-agents ``` -------------------------------- ### Install OpenAI Client Source: https://hub.hcompany.ai/quickstart Install the official OpenAI client library for your preferred language. ```bash pip install openai ``` ```bash npm install openai ``` -------------------------------- ### Task Prompt Examples Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-from-cli Examples of well-defined versus vague task strings for the agent. ```bash holo run "Open Calendar, show today's events, and report each event with its time and title. Do not create or edit anything." ``` ```bash holo run "What's on today?" ``` -------------------------------- ### Example skill path Source: https://hub.hcompany.ai/holo-desktop-cli/reference/paths-and-files Path for the expense-report example skill. ```text ~/.holo/skills/expense-report/SKILL.md ``` -------------------------------- ### Initiate browser profile upload examples Source: https://hub.hcompany.ai/computer-use-agents/browser-profiles/initiate-upload Examples for initiating a profile upload using cURL, Python, and TypeScript. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/browser-profiles/initiate-upload \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() upload = client.browser_profiles.initiate_browser_profile_upload() print(upload.profile_id, upload.upload_url) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const upload = await client.browserProfiles.initiateBrowserProfileUpload(); console.log(upload.profileId, upload.uploadUrl); ``` -------------------------------- ### Install the desktop driver Source: https://hub.hcompany.ai/computer-use-agents/desktop/local-control Install the required desktop driver package via pip. ```bash pip install "hai-agents[desktop]" ``` -------------------------------- ### Install HoloDesktop CLI Source: https://hub.hcompany.ai/holo-desktop-cli/getting-started/quickstart Use these commands to install the CLI on your respective operating system. ```bash curl -fsSL https://install.hcompany.ai/install.sh | bash ``` ```powershell irm https://install.hcompany.ai/install.ps1 | iex ``` -------------------------------- ### Verify CLI Installation Source: https://hub.hcompany.ai/holo-desktop-cli/getting-started/quickstart Check that the CLI is correctly installed and available in your PATH. ```bash holo --help ``` -------------------------------- ### Create an environment Source: https://hub.hcompany.ai/computer-use-agents/environments/create Examples for initializing a new environment using different interfaces. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/environments \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "wide-browser", "kind": "web", "start_url": "https://www.google.com", "mode": {"type": "visual", "width": 1920, "height": 1080} }' ``` ```python from hai_agents import Client client = Client() environment = client.environments.create_environment( id="wide-browser", start_url="https://www.google.com", mode={"type": "visual", "width": 1920, "height": 1080}, ) print(environment.id) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const environment = await client.environments.createEnvironment({ kind: "web", id: "wide-browser", startUrl: "https://www.google.com", mode: { type: "visual", width: 1920, height: 1080 }, }); console.log(environment.id); ``` -------------------------------- ### Complete browser profile upload examples Source: https://hub.hcompany.ai/computer-use-agents/browser-profiles/complete-upload Examples showing how to finalize a profile upload using cURL, Python, and TypeScript. ```bash curl -X POST "https://agp.eu.hcompany.ai/api/v2/browser-profiles/a1b2c3d4-5678-90ab-cdef-1234567890ab/complete-upload" \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "acme-prod-login", "browser_name": "chromium", "browser_version": "131", "labels": {"team": "qa"} }' ``` ```python from hai_agents import Client client = Client() profile = client.browser_profiles.complete_browser_profile_upload( profile_id="a1b2c3d4-5678-90ab-cdef-1234567890ab", name="acme-prod-login", browser_name="chromium", browser_version="131", labels={"team": "qa"}, ) print(profile.id) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const profile = await client.browserProfiles.completeBrowserProfileUpload({ profileId: "a1b2c3d4-5678-90ab-cdef-1234567890ab", name: "acme-prod-login", browserName: "chromium", browserVersion: "131", labels: { team: "qa" }, }); console.log(profile.id); ``` -------------------------------- ### List Vaults API Examples Source: https://hub.hcompany.ai/computer-use-agents/vaults/list Examples for retrieving vault configurations using cURL, Python, and TypeScript. ```bash curl "https://agp.eu.hcompany.ai/api/v2/vaults?limit=50&offset=0" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.vaults.list_vaults(limit=50, offset=0) for vault in page.vaults: print(vault.id, vault.name) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.vaults.listVaults({ limit: 50, offset: 0 }); for (const vault of page.vaults) { console.log(vault.id, vault.name); } ``` -------------------------------- ### Install the browser driver Source: https://hub.hcompany.ai/computer-use-agents/browser/local-control Install the necessary package to enable browser control capabilities. ```bash pip install "hai-agents[browser]" ``` -------------------------------- ### Update a skill examples Source: https://hub.hcompany.ai/computer-use-agents/skills/update Examples showing how to update a skill using cURL, Python, and TypeScript. ```bash curl -X PUT https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "extract-table-data", "description": "Extract data from HTML tables: updated with CSV output support.", "body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request." }' ``` ```python from hai_agents import Client client = Client() skill = client.skills.update_skill( name_="extract-table-data", name="extract-table-data", description="Extract data from HTML tables: updated with CSV output support.", body="When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.", ) print(skill.description) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const skill = await client.skills.updateSkill({ name: "extract-table-data", body: { name: "extract-table-data", description: "Extract data from HTML tables: updated with CSV output support.", body: "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.", }, }); console.log(skill.description); ``` -------------------------------- ### Start Nimbus Development Environment Source: https://hub.hcompany.ai/holo-desktop-cli/examples/claude-code-ui-qa Commands to initialize the environment and start the development server for the Nimbus application. ```bash uv sync cd examples/software_qa/nimbus-desk npm install npm run dev ``` -------------------------------- ### Install llama.cpp on macOS Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/run-a-local-model-server Use Homebrew to install the llama.cpp server package. ```bash brew install llama.cpp ``` -------------------------------- ### List browser profiles API examples Source: https://hub.hcompany.ai/computer-use-agents/browser-profiles/list Examples for retrieving browser profiles using cURL, Python, and TypeScript SDKs. ```bash curl "https://agp.eu.hcompany.ai/api/v2/browser-profiles?limit=10&offset=0" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.browser_profiles.list_browser_profiles(limit=10, offset=0) for profile in page.profiles: print(profile.id, profile.name) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.browserProfiles.listBrowserProfiles({ limit: 10, offset: 0 }); for (const profile of page.profiles) { console.log(profile.id, profile.name); } ``` -------------------------------- ### List schedules API examples Source: https://hub.hcompany.ai/computer-use-agents/schedules/list Examples for retrieving a list of schedules using different programming languages. ```bash curl "https://agp.eu.hcompany.ai/api/v2/schedules" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.schedules.list_schedules() for schedule in page.items: print(schedule.id, schedule.name, schedule.paused) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.schedules.listSchedules(); for (const schedule of page.items) { console.log(schedule.id, schedule.name, schedule.paused); } ``` -------------------------------- ### Retrieve an environment Source: https://hub.hcompany.ai/computer-use-agents/environments/retrieve Examples for fetching environment details using different client implementations. ```bash curl "https://agp.eu.hcompany.ai/api/v2/environments/h/browser" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() environment = client.environments.get_environment("h/browser") print(environment) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const environment = await client.environments.getEnvironment({ id: "h/browser" }); console.log(environment); ``` -------------------------------- ### Skill installation directory Source: https://hub.hcompany.ai/holo-desktop-cli/examples/expense-report-automation The destination path where the bundled expense report skill is installed. ```text ~/.holo/skills/expense-report/ ``` -------------------------------- ### Install workspace dependencies Source: https://hub.hcompany.ai/holo-desktop-cli/examples/expense-report-automation Run this command from the holo-desktop-cli directory to install all required workspace groups. ```bash uv sync --all-groups ``` -------------------------------- ### Install hai-agents SDKs Source: https://hub.hcompany.ai/computer-use-agents/sdks Commands to install the required packages for CLI, Python, or TypeScript environments. ```bash pip install "hai-agents[cli]" ``` ```bash pip install hai-agents ``` ```bash npm install hai-agents ``` -------------------------------- ### Set default browser profile examples Source: https://hub.hcompany.ai/computer-use-agents/browser-profiles/set-default Examples showing how to set a browser profile as default using cURL, Python, and TypeScript. ```bash curl -X PUT "https://agp.eu.hcompany.ai/api/v2/browser-profiles/a1b2c3d4-5678-90ab-cdef-1234567890ab/default" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() profile = client.browser_profiles.set_default_browser_profile( profile_id="a1b2c3d4-5678-90ab-cdef-1234567890ab", ) print(profile.is_default) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const profile = await client.browserProfiles.setDefaultBrowserProfile({ profileId: "a1b2c3d4-5678-90ab-cdef-1234567890ab", }); console.log(profile.isDefault); ``` -------------------------------- ### Install HoloDesktop CLI into hosts Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-mcp Commands to install the MCP server into specific hosts or all detected hosts. ```bash cd /path/to/your/claude-code-workspace holo install claude-code ``` ```bash holo install cursor ``` ```bash holo install ``` -------------------------------- ### Install HoloDesktop CLI skill Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-as-skill Commands to install the skill into a specific workspace or all detected supported hosts. ```bash cd /path/to/your/claude-code-workspace holo install claude-code ``` ```bash holo install ``` -------------------------------- ### Trigger a schedule API examples Source: https://hub.hcompany.ai/computer-use-agents/schedules/trigger Examples for triggering a schedule using cURL, Python, and TypeScript clients. ```bash curl -X POST "https://agp.eu.hcompany.ai/api/v2/schedules/9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f/trigger" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() run = client.schedules.trigger_schedule("9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f") print(run.status, run.session_id) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const run = await client.schedules.triggerSchedule({ scheduleId: "9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f" }); console.log(run.status, run.sessionId); ``` -------------------------------- ### Install Agent Skills in Claude Code Source: https://hub.hcompany.ai/computer-use-agents/coding-skills Register the marketplace and install the skill using the built-in /plugin command. ```bash /plugin marketplace add hcompai/computer-use-agents-demos /plugin install hai-agents@hai-skills ``` -------------------------------- ### Verify HoloDesktop CLI installation Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-mcp Use these commands to list installed hosts and re-register a specific host ID if the CLI is not detected. ```bash holo install list ``` ```bash holo install ``` -------------------------------- ### List schedule runs API examples Source: https://hub.hcompany.ai/computer-use-agents/schedules/runs Examples for fetching schedule run history using cURL, Python, and TypeScript clients. ```bash curl "https://agp.eu.hcompany.ai/api/v2/schedules/9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f/runs" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.schedules.list_schedule_runs("9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f") for run in page.items: print(run.scheduled_for, run.status, run.session_id) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.schedules.listScheduleRuns({ scheduleId: "9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f" }); for (const run of page.items) { console.log(run.scheduledFor, run.status, run.sessionId); } ``` -------------------------------- ### Example Task Definitions Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-mcp Comparison of well-defined and vague task prompts for the MCP tool. ```text Open Slack in the Acme workspace and send a DM to Sarah Chen saying "on my way". Return "sent" after the message appears. ``` ```text Tell Sarah. ``` -------------------------------- ### Create a vault request examples Source: https://hub.hcompany.ai/computer-use-agents/vaults/create Examples for creating a vault using cURL, Python, and TypeScript. Ensure the service account token is sent over HTTPS. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/vaults \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "prod-1password", "provider_config": {"provider": "onepassword", "op_vault_id": "abcd1234efgh5678"}, "token": "ops_eyJ..." }' ``` ```python from hai_agents import Client, OnePasswordConfig client = Client() vault = client.vaults.create_vault( name="prod-1password", provider_config=OnePasswordConfig(op_vault_id="abcd1234efgh5678"), token="ops_eyJ...", ) print(vault.id) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const vault = await client.vaults.createVault({ name: "prod-1password", providerConfig: { opVaultId: "abcd1234efgh5678" }, token: "ops_eyJ...", }); console.log(vault.id); ``` -------------------------------- ### List webhooks examples Source: https://hub.hcompany.ai/computer-use-agents/webhooks/list Retrieve a list of webhooks using cURL, Python, or TypeScript. ```bash curl "https://agp.eu.hcompany.ai/api/v2/webhooks" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.webhooks.list_webhooks() for webhook in page.items: print(webhook.id, webhook.url) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.webhooks.listWebhooks(); for (const webhook of page.items) { console.log(webhook.id, webhook.url); } ``` -------------------------------- ### Create a schedule Source: https://hub.hcompany.ai/computer-use-agents/schedules/create Examples for creating a new schedule using cURL, Python, and TypeScript. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/schedules \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "morning-market-scan", "description": "Weekday scan of new Paris listings", "timing": {"expression": "0 9 * * 1-5", "timezone": "Europe/Paris"}, "session_request": { "agent": "h/web-surfer-flash", "messages": [ {"type": "user_message", "message": "Scan new apartment listings in Paris 11e and summarize the top five"} ] } }' ``` ```python from hai_agents import Client client = Client() schedule = client.schedules.create_schedule( name="morning-market-scan", description="Weekday scan of new Paris listings", timing={"expression": "0 9 * * 1-5", "timezone": "Europe/Paris"}, session_request={ "agent": "h/web-surfer-flash", "messages": [ {"type": "user_message", "message": "Scan new apartment listings in Paris 11e and summarize the top five"} ], }, ) print(schedule.id, schedule.next_run_times[0]) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const schedule = await client.schedules.createSchedule({ name: "morning-market-scan", description: "Weekday scan of new Paris listings", timing: { expression: "0 9 * * 1-5", timezone: "Europe/Paris" }, sessionRequest: { agent: "h/web-surfer-flash", messages: [ { type: "user_message", message: "Scan new apartment listings in Paris 11e and summarize the top five" }, ], }, }); console.log(schedule.id, schedule.nextRunTimes[0]); ``` -------------------------------- ### Install Agent Skills in Hermes Source: https://hub.hcompany.ai/computer-use-agents/coding-skills Clone the repository and copy the skill folder into the ~/.hermes/skills directory. ```bash git clone https://github.com/hcompai/computer-use-agents-demos mkdir -p ~/.hermes/skills cp -r computer-use-agents-demos/skills/hai-agents ~/.hermes/skills/hai-agents ``` -------------------------------- ### Override agent configuration for a single session Source: https://hub.hcompany.ai/computer-use-agents/sessions/overview Examples of applying overrides to a web-surfer agent to change its start URL using various interfaces. ```bash hai run "Summarize the top discussion right now" \ --agent h/web-surfer-flash \ --override 'agent.environments[kind=web].start_url=https://news.ycombinator.com' ``` ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/sessions \ -H "Authorization: Bearer $HAI_API_KEY" -H "Content-Type: application/json" \ -d '{ "agent": "h/web-surfer-flash", "messages": [{"type": "user_message", "message": "Summarize the top discussion right now"}], "overrides": {"agent.environments[kind=web].start_url": "https://news.ycombinator.com"} }' ``` ```python session = client.sessions.create_session( agent="h/web-surfer-flash", messages="Summarize the top discussion right now", overrides={"agent.environments[kind=web].start_url": "https://news.ycombinator.com"}, ) ``` ```typescript const session = await client.sessions.createSession({ body: { agent: "h/web-surfer-flash", messages: "Summarize the top discussion right now", overrides: { "agent.environments[kind=web].start_url": "https://news.ycombinator.com" }, }, }); ``` -------------------------------- ### GET /api/v2/sessions/quota Source: https://hub.hcompany.ai/computer-use-agents/sessions/overview Get the current session quota. ```APIDOC ## GET /api/v2/sessions/quota ### Description Get the current quota. ### Method GET ### Endpoint /api/v2/sessions/quota ``` -------------------------------- ### Launch a fresh Chrome instance Source: https://hub.hcompany.ai/computer-use-agents/browser/profiles Start a new Chrome instance with a dedicated user-data directory to create a clean profile. ```bash "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \ --user-data-dir="$HOME/agent-profile" ``` ```bash google-chrome --user-data-dir="$HOME/agent-profile" ``` -------------------------------- ### Run MCP server Source: https://hub.hcompany.ai/holo-desktop-cli/reference/cli Starts the stdio MCP server, typically invoked by an MCP host. ```bash holo mcp ``` -------------------------------- ### List environments using various clients Source: https://hub.hcompany.ai/computer-use-agents/environments/list Examples of how to fetch the list of environments using cURL, Python, and TypeScript. ```bash curl "https://agp.eu.hcompany.ai/api/v2/environments" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.environments.list_environments() print(page.items) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.environments.listEnvironments(); console.log(page.items); ``` -------------------------------- ### List Skills API Requests Source: https://hub.hcompany.ai/computer-use-agents/skills/list Examples of how to retrieve the skill catalog using different programming interfaces. ```bash curl "https://agp.eu.hcompany.ai/api/v2/skills" \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() page = client.skills.list_skills() for skill in page.items: print(skill.name) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const page = await client.skills.listSkills(); for (const skill of page.items) { console.log(skill.name); } ``` -------------------------------- ### GET /api/v2/sessions/{id}/resources/{bucket}/{key} Source: https://hub.hcompany.ai/computer-use-agents/sessions/overview Get a resource from a specific session. ```APIDOC ## GET /api/v2/sessions/{id}/resources/{bucket}/{key} ### Description Get a session resource. ### Method GET ### Endpoint /api/v2/sessions/{id}/resources/{bucket}/{key} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the session. - **bucket** (string) - Required - The bucket name. - **key** (string) - Required - The resource key. ``` -------------------------------- ### MCP server configuration examples Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-mcp JSON configuration structures for file-backed hosts and hosts requiring environment variables. ```json { "mcpServers": { "holo": { "type": "stdio", "command": "/absolute/path/to/holo", "args": ["mcp"] } } } ``` ```json { "mcpServers": { "holo": { "type": "stdio", "command": "/absolute/path/to/holo", "args": ["mcp"], "env": { "HAI_AGENT_RUNTIME_BASE_URL": "http://localhost:8000/v1", "HAI_AGENT_RUNTIME_MODEL": "Hcompany/Holo-3.1-35B-A3B" } } } } ``` -------------------------------- ### Run a basic desktop session script Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/embed-with-python Initializes the agent runtime and executes a task using the Python client. ```python import asyncio from holo_desktop.agent_client import AgentApiClient, SpawnConfig, ensure_running from holo_desktop.agent_client.requests import build_session_request async def main() -> None: daemon = await ensure_running(SpawnConfig(port=18795)) try: async with AgentApiClient(daemon.base_url, daemon.token) as client: request = build_session_request( task="Open TextEdit and write a short note saying HoloDesktop CLI is embedded", max_steps=10, max_time_s=120, ) session_id = await client.create_session(request) stream = client.stream(session_id) async for event in stream.events(): print(event.type) print(stream.answer) finally: await daemon.aclose() asyncio.run(main()) ``` ```bash python your_script.py ``` -------------------------------- ### Monitor session progress and completion Source: https://hub.hcompany.ai/computer-use-agents/observe-and-steer Demonstrates how to start a session and use status, changes, and completion methods to track agent activity. ```python from hai_agents import Client client = Client() session = client.start_session( agent="h/web-surfer-flash", messages=[{"type": "user_message", "message": "Find the top story on Hacker News"}], ) session.status() # cheap liveness snapshot session.changes(from_index=0) # new events + final answer, long-polled session.get() # the full Session resource result = session.wait_for_completion() # block until terminal, then read the answer print(result.status, result.answer) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const session = await client.startSession({ agent: "h/web-surfer-flash", messages: [{ type: "user_message", message: "Find the top story on Hacker News" }], }); await session.status(); // cheap liveness snapshot await session.changes({ fromIndex: 0 }); // new events + final answer, long-polled await session.get(); // the full Session resource const result = await session.waitForCompletion(); // block until terminal, then read the answer console.log(result.status, result.answer); ``` -------------------------------- ### Connect HoloDesktop CLI to local server Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/run-a-local-model-server Point the CLI to the local model server URL. ```bash holo run "Open TextEdit and write a short note saying HoloDesktop CLI is installed" \ --base-url http://localhost:8080/v1 \ --model holo3-1-35b ``` ```bash holo run "Open TextEdit and write a short note saying HoloDesktop CLI is installed" \ --base-url http://localhost:8000/v1 \ --model holo3-1-35b ``` -------------------------------- ### Configure MCP server environment Source: https://hub.hcompany.ai/holo-desktop-cli/reference/environment-variables Example configuration for integrating HoloDesktop CLI as an MCP server with custom runtime variables. ```json { "mcpServers": { "holo": { "command": "holo", "args": ["mcp"], "env": { "HAI_AGENT_RUNTIME_BASE_URL": "http://localhost:8000/v1", "HAI_AGENT_RUNTIME_MODEL": "Hcompany/Holo-3.1-35B-A3B" } } } } ``` -------------------------------- ### Create a skill using various clients Source: https://hub.hcompany.ai/computer-use-agents/skills/create Examples of how to create a new skill using cURL, the Python SDK, or the TypeScript SDK. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/skills \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "extract-table-data", "description": "Extract structured data from HTML tables into JSON.", "body": "When you encounter an HTML table, extract all rows and columns into a JSON array of objects. Each object should use the table headers as keys.", "source": "https://github.com/myorg/skills" }' ``` ```python from hai_agents import Client client = Client() skill = client.skills.create_skill( name="extract-table-data", description="Extract structured data from HTML tables into JSON.", body="When you encounter an HTML table, extract all rows and columns into a JSON array of objects. Each object should use the table headers as keys.", source="https://github.com/myorg/skills", ) print(skill.name) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const skill = await client.skills.createSkill({ name: "extract-table-data", description: "Extract structured data from HTML tables into JSON.", body: "When you encounter an HTML table, extract all rows and columns into a JSON array of objects. Each object should use the table headers as keys.", source: "https://github.com/myorg/skills", }); console.log(skill.name); ``` -------------------------------- ### Configure authentication and local runtime Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/embed-with-python Authenticate via CLI or configure specific model settings during runtime initialization. ```bash holo login ``` ```python daemon = await ensure_running( SpawnConfig( port=18795, model="Hcompany/Holo-3.1-35B-A3B", base_url="http://localhost:8000/v1", ) ) ``` -------------------------------- ### Install Claude Code integration Source: https://hub.hcompany.ai/holo-desktop-cli/reference/paths-and-files Command to install the Claude Code integration within the current workspace. ```bash holo install claude-code ``` -------------------------------- ### Create a local desktop agent Source: https://hub.hcompany.ai/computer-use-agents/desktop/local-control Define an agent with the environment kind set to 'desktop' and host set to 'user_device'. ```python from hai_agents import Client client = Client() agent = client.agents.create_agent( name="local-desktop", description="Drives the desktop on my own machine.", environments=[ { "id": "my-laptop", "kind": "desktop", "host": "user_device", } ], ) ``` -------------------------------- ### Access Log Directories Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/debug-failed-run Locate startup and per-run event logs for troubleshooting. ```text ~/.holo/logs/ ``` ```text ~/.holo/runs/ ``` -------------------------------- ### Install Agent Skills in Cursor Source: https://hub.hcompany.ai/computer-use-agents/coding-skills Clone the repository and copy the skill folder into the project's .cursor/skills directory. ```bash git clone https://github.com/hcompai/computer-use-agents-demos mkdir -p .cursor/skills cp -r computer-use-agents-demos/skills/hai-agents .cursor/skills/hai-agents ``` -------------------------------- ### Retrieve a session using various clients Source: https://hub.hcompany.ai/computer-use-agents/sessions/retrieve Examples for fetching session details using CLI, cURL, Python, and TypeScript. ```bash hai sessions get a1b2c3d4-e5f6-7890-abcd-ef1234567890 ``` ```bash curl https://agp.eu.hcompany.ai/api/v2/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() session = client.sessions.get_session("a1b2c3d4-e5f6-7890-abcd-ef1234567890") print(session.status.status, session.latest_answer) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const session = await client.sessions.getSession({ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", }); console.log(session.status.status, session.latestAnswer); ``` -------------------------------- ### Make First API Request Source: https://hub.hcompany.ai/quickstart Initialize the client with the custom base URL and send a text completion request. ```python import os from openai import OpenAI client = OpenAI( base_url="https://api.hcompany.ai/v1/", api_key=os.environ.get("HAI_API_KEY"), ) response = client.chat.completions.create( model="holo3-1-35b-a3b", messages=[{"role": "user", "content": "In one sentence, what is a computer-use agent?"}], ) print(response.choices[0].message.content) ``` ```typescript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.hcompany.ai/v1/", apiKey: process.env.HAI_API_KEY, }); const response = await client.chat.completions.create({ model: "holo3-1-35b-a3b", messages: [{ role: "user", content: "In one sentence, what is a computer-use agent?" }], }); console.log(response.choices[0].message.content); ``` ```bash curl https://api.hcompany.ai/v1/chat/completions \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "holo3-1-35b-a3b", "messages": [{"role": "user", "content": "In one sentence, what is a computer-use agent?"}] }' ``` -------------------------------- ### Rotate webhook secret examples Source: https://hub.hcompany.ai/computer-use-agents/webhooks/rotate Examples for rotating a webhook secret using cURL, Python, and TypeScript. Ensure the new secret is stored securely upon receipt. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/webhooks/f47ac10b-58cc-4372-a567-0e02b2c3d479/rotate \ -H "Authorization: Bearer $HAI_API_KEY" ``` ```python from hai_agents import Client client = Client() webhook = client.webhooks.rotate_webhook_secret(webhook_id="f47ac10b-58cc-4372-a567-0e02b2c3d479") print(webhook.secret) # store it now; it is never returned again ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const webhook = await client.webhooks.rotateWebhookSecret({ webhookId: "f47ac10b-58cc-4372-a567-0e02b2c3d479" }); console.log(webhook.secret); // store it now; it is never returned again ``` -------------------------------- ### Create a custom environment Source: https://hub.hcompany.ai/computer-use-agents/environments/overview Create a reusable environment in the catalog by specifying an ID, kind, and display mode. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/environments \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "wide-browser", "kind": "web", "mode": {"type": "visual", "width": 1920, "height": 1080} }' ``` ```python from hai_agents import Client client = Client() client.environments.create_environment( id="wide-browser", kind="web", mode={"type": "visual", "width": 1920, "height": 1080}, ) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); await client.environments.createEnvironment({ id: "wide-browser", kind: "web", mode: { type: "visual", width: 1920, height: 1080 }, }); ``` -------------------------------- ### Rotate Vault Token Examples Source: https://hub.hcompany.ai/computer-use-agents/vaults/rotate-token Examples for updating a vault's service account token using cURL, Python, and TypeScript. Ensure the request is sent over HTTPS as the token is transmitted in plaintext. ```bash curl -X PUT https://agp.eu.hcompany.ai/api/v2/vaults/f47ac10b-58cc-4372-a567-0e02b2c3d479/token \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"token": "ops_newtoken..."}' ``` ```python from hai_agents import Client client = Client() client.vaults.rotate_vault_token( vault_id="f47ac10b-58cc-4372-a567-0e02b2c3d479", token="ops_newtoken...", ) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); await client.vaults.rotateVaultToken({ vaultId: "f47ac10b-58cc-4372-a567-0e02b2c3d479", token: "ops_newtoken...", }); ``` -------------------------------- ### Run the expense report demo Source: https://hub.hcompany.ai/holo-desktop-cli/examples/expense-report-automation Executes the expense report automation task using the default configuration. ```bash uv run holo-demo run expense_report ``` -------------------------------- ### GET /api/v2/webhooks Source: https://hub.hcompany.ai/computer-use-agents/webhooks/list Retrieves a paginated list of webhooks for the organization. ```APIDOC ## GET /api/v2/webhooks ### Description Returns a paginated list of your organization's webhooks. Signing secrets are never included. ### Method GET ### Endpoint https://agp.eu.hcompany.ai/api/v2/webhooks ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number (1-based). Default: 1 - **size** (integer) - Optional - Items per page. Maximum: 1000. Default: 10 - **sort** (string) - Optional - Sort order. Options: `created_at`, `-created_at`. Default: `-created_at` ### Response #### Success Response (200) - **items** (array) - List of webhook objects - **page** (integer) - Current page number - **total** (integer) - Total number of webhooks #### Response Example { "items": [ { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "url": "https://example.com/hooks/h", "enabled_events": ["session.status_updated"], "description": "Production listener", "disabled": false, "last_delivery_status": "succeeded", "last_delivery_error": null, "last_delivery_at": "2026-07-03T08:30:00Z", "last_success_at": "2026-07-03T08:30:00Z", "consecutive_failures": 0, "created_at": "2026-06-11T15:04:05Z", "updated_at": "2026-06-11T15:04:05Z" } ], "page": 1, "total": 1 } ``` -------------------------------- ### GET /api/v2/schedules Source: https://hub.hcompany.ai/computer-use-agents/schedules/list Retrieves a paginated list of organization schedules. ```APIDOC ## GET /api/v2/schedules ### Description Returns a paginated list of your organization's schedules. ### Method GET ### Endpoint /api/v2/schedules ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number (1-based). Default: 1 - **size** (integer) - Optional - Items per page. Maximum: 1000. Default: 10 - **sort** (string) - Optional - Sort order. Options: `created_at`, `-created_at`. Default: `-created_at` ### Response #### Success Response (200) - **items** (array) - List of schedule objects - **page** (integer) - Current page number - **total** (integer) - Total number of schedules #### Response Example { "items": [ { "id": "9f8e7d6c-5b4a-4c3d-8e2f-1a0b9c8d7e6f", "name": "morning-market-scan", "description": "Weekday scan of new Paris listings", "timing": {"type": "cron", "expression": "0 9 * * 1-5", "timezone": "Europe/Paris"}, "session_request": { "agent": "h/web-surfer-flash", "messages": [ {"type": "user_message", "message": "Scan new apartment listings in Paris 11e and summarize the top five"} ], "max_time_s": 3600 }, "paused": false, "pause_note": null, "next_run_times": [ "2026-07-06T07:00:00Z", "2026-07-07T07:00:00Z", "2026-07-08T07:00:00Z", "2026-07-09T07:00:00Z", "2026-07-10T07:00:00Z" ], "last_run_at": "2026-07-03T07:00:00Z", "created_at": "2026-06-20T12:00:00Z", "updated_at": "2026-07-03T07:00:00Z" } ], "page": 1, "total": 1 } ``` -------------------------------- ### Start llama.cpp server Source: https://hub.hcompany.ai/holo-desktop-cli/how-to/run-a-local-model-server Launch the llama.cpp server with the specified model. The server defaults to port 8080. ```bash llama-server -hf Hcompany/Holo-3.1-35B-A3B-GGUF ``` ```bash llama-server \ --hf Hcompany/Holo-3.1-35B-A3B-GGUF \ --n-gpu-layers 999 \ --ctx-size 65536 \ --batch-size 16384 \ --ubatch-size 2048 \ --flash-attn 1 \ --cache-type-k q8_0 \ --cache-type-v q8_0 \ --image-min-tokens 1024 \ --ctx-checkpoints 8 \ --cache-ram 32768 \ --kv-unified \ --threads 16 ``` -------------------------------- ### GET /api/v2/sessions/{id}/events Source: https://hub.hcompany.ai/computer-use-agents/sessions/overview List events for a specific session. ```APIDOC ## GET /api/v2/sessions/{id}/events ### Description List events for a session. ### Method GET ### Endpoint /api/v2/sessions/{id}/events ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the session. ``` -------------------------------- ### Create an Agent Source: https://hub.hcompany.ai/computer-use-agents/agents/create Methods to initialize a new agent with a web browser environment. ```bash curl -X POST https://agp.eu.hcompany.ai/api/v2/agents \ -H "Authorization: Bearer $HAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "my-web-agent", "description": "Custom web researcher", "environments": [ { "id": "browser", "kind": "web", "mode": {"type": "visual", "width": 1280, "height": 720}, "start_url": "https://news.ycombinator.com" } ] }' ``` ```python from hai_agents import Client client = Client() agent = client.agents.create_agent( name="my-web-agent", description="Custom web researcher", environments=[ { "id": "browser", "kind": "web", "mode": {"type": "visual", "width": 1280, "height": 720}, "start_url": "https://news.ycombinator.com", } ], ) print(agent.name) ``` ```typescript import { HaiAgentsClient } from "hai-agents"; const client = new HaiAgentsClient(); const agent = await client.agents.createAgent({ name: "my-web-agent", description: "Custom web researcher", environments: [ { id: "browser", kind: "web", mode: { type: "visual", width: 1280, height: 720 }, startUrl: "https://news.ycombinator.com", }, ], }); console.log(agent.name); ``` -------------------------------- ### Dry-run output example Source: https://hub.hcompany.ai/holo-desktop-cli/examples/expense-report-automation Expected output format when running a dry-run command. ```text [dry-run] expense_report: would launch ['com.apple.finder', 'org.libreoffice.script', 'com.apple.mail'] [dry-run] expense_report: would focus 'org.libreoffice.script' [dry-run] expense_report: output would go to runs/expense_report ``` -------------------------------- ### Start ACP mode Source: https://hub.hcompany.ai/holo-desktop-cli/integrations/use-acp Command to initiate the HoloDesktop CLI in ACP mode. ```bash holo acp ```