Skip to main content
Call the API directly over HTTP, or use a typed client. Both ship as hai-agents.

Python

Sync and async clients, typed with Pydantic v2.

TypeScript

A fully typed client for sessions, agents, skills, and environments.

Install

pip install hai-agents

Authenticate

Pass your H API key when you instantiate the client, or set H_API_KEY in your environment and omit the argument. See Authentication for region selection and security notes.
from hai_agents import Client

client = Client(api_key="hk-...")
The interactive playground in the API reference sends requests straight from your browser, so its examples show the raw HTTP call rather than SDK code. Use it to explore the wire format; use the SDK snippets here and in the Quickstart for the code you’d actually ship.

Next steps

Quickstart

Run your first session end to end in under 5 minutes.

Agents

Reusable configurations: pre-built agents and how to create your own.