---
title: "Quickstart"
description: "Create and run your first AI agent in 5 minutes."
section: "General"
order: 20
---

# Quickstart

Create an agent, call it from TypeScript, and watch the run land in the event log.

## 1. Install the SDK

```bash
pnpm add @aeontel/sdk
```

## 2. Get an API key

Sign in at [platform.aeontel.com](https://platform.aeontel.com), open **Settings → API keys**, and mint a secret key (`sec_...`). Keep it out of frontend bundles.

Make note of your workspace ID — it appears as `wsp_...` in the URL.

## 3. Create an agent

```ts
import Aeontel from "@aeontel/sdk";

const client = new Aeontel(process.env.AEONTEL_API_KEY!);
const WORKSPACE_ID = "wsp_..."; // your workspace

const agent = await client.agents.create({
  workspaceId: WORKSPACE_ID,
  name: "Support triage",
  model: "anthropic/claude-sonnet-4-5",
  instructions: "You route incoming emails to the right queue.",
});

console.log("Created agent:", agent.id);
```

## 4. Run it

```ts
const run = await client.runs.create({
  workspaceId: WORKSPACE_ID,
  subjectType: "agent",
  subjectId: agent.id,
  input: {
    messages: [{ role: "user", content: "Refund request from VIP customer" }],
  },
});

// Poll until complete
let current = run;
while (current.status === "running" || current.status === "queued") {
  await new Promise((r) => setTimeout(r, 500));
  current = await client.runs.retrieve({ id: run.id });
}
console.log("Run finished:", current.status, current.output);
```

## 5. Watch the event log

Every step emitted an event — `agent.created`, `run.created`, `run.completed`. Tail them live:

```ts
const stream = client.events.stream({ workspaceId: WORKSPACE_ID });
stream.on("run.*", (event) => console.log(event.type, event.subjectId));
```

## What's next?

- [SDK Reference](/sdk) — authentication, pagination, errors, file uploads
- [React Reference](/react) — hooks that wrap the SDK for UI apps
- [Key concepts](/getting-started/key-concepts) — how primitives compose
- [MCP Reference](/mcp) — expose the same primitives to any MCP-compatible assistant
