/v1 API: a session for a customer, their computer connecting, a task that asks a question and an approval, and the finished result with its replay. Every step has cURL, Node and Python. The Node code needs Node 18 or later (it uses the built-in fetch). The Python code needs requests (pip install requests). A single script with all of it is at the end of the page.
1
Get an API key
Sign in at guidinghand.ai/console and open Settings → API. Create a key and copy it: it starts with Every request sends it as a bearer token. The Node and Python snippets below share this small helper, which turns error responses into exceptions:
gh_live_ and is shown once. Creating keys needs the admin or owner role in the org.2
Create an agent (optional)
An agent holds your instructions, the model it runs on, its reasoning effort and the greeting the customer sees on the invite page. You can skip this step: a session that names no agent runs on Eager’s own instructions alone.
agent_id becomes part of invite links, so it is lowercase letters, numbers and dashes. Creating an agent needs the admin role; an API key has it. An agent_id that already exists returns 409 conflict. model sets the price of the agent’s tokens. Without a model, the agent runs on Eager’s default, GPT-6 Astra: $15 per million input tokens and $75 per million output, about 58¢ for a typical 10-step task. Claude Sonnet 5.5 ("model": "claude-sonnet-5-5") is $3 and $15, about 15¢ a task. effort has no price of its own: medium thinks more each step, so it uses more tokens. See Agents.3
Create a session and send the invite link
A session is one pairing code for one computer. Put your own ids in Send
metadata so you can match the session to a ticket later.Response
invite_url to the customer through whatever channel you already use: chat, email or the ticket. The page walks them through installing the desktop app, granting the macOS permissions, and clicking Connect. The session_id is the code itself.session_token is for the older session-token API. It is shown once; you don’t need it for /v1.4
Wait until the computer is connected
Tasks need Once connected,
status: connected. Either poll the session, or set up a webhook and wait for session.connected.device tells you the operating system (mac or windows), the computer’s name and its screen size.5
Start a task
Describe the outcome in plain language. One task runs at a time per computer. Starting another while one runs returns
request_id is an idempotency key: if your request times out and you send it again with the same request_id, you get the same task back instead of a second one.Response
409 conflict with the running task’s id in error.active_task_id.6
Follow the task and answer what it asks
GET /v1/tasks/{task_id}/events returns the events after after. With wait_ms (up to 55000) it holds the request open until something new happens, so a simple loop gets every event as it happens. Pass the returned cursor as after on the next call, and stop when task.done is true.When the agent needs a person, it asks in the task’s conversation (task.conversation_id): the task is paused, task.pending holds the request, and you decide it there, with POST /v1/conversations/{conversation_id}/decisions:pending.type: "question": sendanswerwith itsquestion_idand youranswer. The customer usually sees the question on their screen too (pending.customer_can_answer) and can answer it there. The first answer is used; answering after them returns409withcode: "already_decided"(or"not_pending"once the task has ended), which just means it’s done.pending.type: "approval": sendapprovalwith itsapproval_idand adecisionofapproveordeny. The customer usually sees the request on their screen too (pending.customer_can_approve) and can allow it or not there. As with questions, the first decision is used, andalready_decidedornot_pendingjust means it’s done.
Response
answered keeps the loop from answering the same question twice if the next page arrives before the task moves on.A task waiting on a question or approval uses no tokens, so the wait costs nothing. A task pays for the tokens its model uses, at the price of the agent’s model (GPT-6 Astra is $15 per million input tokens and $75 per million output). See Billing.
7
Read the result
When Add
task.done is true, status is completed, failed or stopped. A completed task has the agent’s summary in result. A failed task has the reason in error. For a stopped task, the reason is the message of its last event (stopped), for example “Stopped by the person at the computer.”Response
?include=events to get every event with the task.8
Open the replay
replay_url opens the task in the console: every screen the agent saw, with its cursor and clicks, next to the timeline of events. Anyone in the org can open it after signing in.To get the screens yourself, GET /v1/tasks/{task_id}/recording lists the frames and each frame’s url returns the PNG. See Recordings.The whole thing
Save one of these and run it withEAGER_API_KEY set. It makes a support agent (once), prints the invite link, waits for the computer, runs one task and answers questions and approvals from your terminal (the customer can also answer the questions on their screen). Set EAGER_API_URL=https://dev.guidinghand.ai to run it against dev.