Skip to main content
In the console, you train an agent like a new hire: hand it your files and coach it. This page builds the smallest version of that through the API most integrations use: an agent with instructions and a cloud browser, and your first conversation with it. It answers from what it knows and opens the browser when the answer is on a website. It takes about five minutes and well under a dollar of the free credit. 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).
1

Get an API key

Sign in at guidinghand.ai/console and open Settings → API. Create a key and copy it: it starts with gh_live_ and is shown once. Creating keys needs the admin or owner role in the org; your first org is yours, with $20 of free credit.
Every request sends it as a bearer token. The Node and Python snippets below share this small helper, which turns error responses into exceptions:
To build without touching production billing, use https://dev.guidinghand.ai as the base URL with a key made in the dev console. Dev runs Stripe in test mode.
2

Create an agent with a browser

An agent is your configuration: its instructions, the model it runs on, its tools and what it may use. This one answers questions from Wikipedia, with a cloud browser that starts there and may only use Wikipedia. In your own agent, the start page is the portal or back office the answers live in.
  • model sets the price of the agent’s tokens: Claude Sonnet 5.5 is $3 per million input tokens and $15 per million output. Without one, the agent runs on Eager’s default, GPT-6.2 Astra. See every model.
  • resources.browser lets it run browser tasks; guardrails.sites.allow keeps those tasks on Wikipedia, enforced in the browser itself. See Browsers and computers and Guardrails.
  • The agent is published as version 1. An agent_id that already exists is a 409.
You can do all of this in the console under Agents too, and chat with the agent there, with its browser playing live beside the conversation.
3

Send it a message

Each call to /responses is one turn of a conversation. The call waits for the reply (up to 55 seconds; a turn that runs a browser task can take longer, so follow it while it’s in_progress).
Response
output is the whole turn in order: your message, the browser task the agent ran (a tool_call, the task and its tool_result), and its answer, the last assistant_message. The task is an ordinary task with a recording: open https://guidinghand.ai/console/<your org>/tasks/<task_id> to replay what the browser did.
4

Carry on the conversation

Send the next message with the conversation_id. The agent has everything said and done so far, and the same browser, still on the page it left (until it closes after 10 minutes without a task; then the next task opens a new one at the start page).
GET /v1/conversations/{conversation_id}/items returns the whole conversation, and the console shows it under Conversations.
5

Stream the reply

With "stream": true, the reply arrives as server-sent events as it’s written, with each tool call and task step on the way: what a chat window or a voice agent needs to speak while the agent works.

What you built

An agent that decides for itself when to look something up, runs the lookup in a browser held to the site you allowed, and answers from what it found, with a replay of every step. From here, train it like a new hire: