Skip to main content

Quickstart

Go from zero to your first monitored AI agent session in under 15 minutes.

Prerequisites

A hatiOS account (sign up at app.hatiosai.com), Node.js 18+ or Python 3.9+, and an existing AI agent or LLM integration.

Step 1: Install the SDK​

Choose your language and install the hatiOS SDK.

npm install @hatios/sdk

Step 2: Get your API key​

Navigate to Dashboard → Agents → Create Agent. Give it a name and copy the generated API key. Keys are prefixed with hk_live_ for production or hk_test_ for sandbox.

Keep your API key secret

API keys are shown only once at creation. Store them in environment variables or a secret manager. Never commit keys to source control.

Step 3: Point your agent through hatiOS​

Replace your LLM endpoint with the hatiOS proxy. Two config changes — zero code changes.

agent.ts
import { HatiOS } from '@hatios/sdk';

const client = new HatiOS({
apiKey: process.env.HATIOS_API_KEY, // hk_live_...
});

// Use exactly like the OpenAI SDK
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [
{ role: 'user', content: 'Analyze Q1 vendor options' }
],
});

console.log(response.hatios.session_id); // session_7f3a9c2d
console.log(response.hatios.trace_id); // trace_a1b2c3d4

Step 4: View your first trace​

Open the hatiOS Dashboard at app.hatiosai.com. Navigate to Sessions and see your agent's reasoning trace — every thought, tool call, and LLM response with SHA-256 hashing.

You're all set!

Your agent is now monitored. Every action recorded, policies enforced, and you can intervene in real-time via the dashboard.

Next steps​