A plain-language prompt driving a browser agent from Python (add_to_cart.py)
hai-agents.
Python
Sync and async clients, typed with Pydantic v2.
TypeScript
A fully typed client for sessions, agents, skills, environments, schedules, and webhooks.
Install
Authenticate
SetHAI_API_KEY in your environment, or pass the key explicitly; either way the client attaches it to every call as a bearer token. If you don’t have a key yet, create one first.
Region
H runs isolated EU and US regions. Requests stay in-region, so an EU key only ever reaches EU infrastructure (data residency). The REST API lives under/api/v2 and the MCP server under /mcp on each region’s host:
The clients default to the EU host. To target another region, pass it explicitly:
Examples
Thehcompai/computer-use-agents-demos repo collects recipes for the hai-agents SDK. Each one runs on its own and is wired up as an MCP server, a CLI tool, or both, so you can call the agents from Claude Code, Cursor, Codex, or Hermes.
See it in action
QA a live page from Claude Code: “Usereview_web_ui to check the top story link works and the page has reasonable accessibility.”
Autonomous QA of a web page via the review_web_ui MCP tool
examples/add_to_cart/add_to_cart.py
Next steps
MCP server
Run and manage agents from Cursor, Claude Code, Codex, Hermes, and more, with no SDK code.
Coding assistants
Install the
hai-agents skill so Claude Code, Cursor, and other assistants know the H APIs and scaffold use cases for you.Quickstart
Run your first session end to end in under 5 minutes.
Agents
Reusable configurations: pre-built agents and how to create your own.