Agent Development Kit · Start

Install and setup

Run a live agent on your machine. You need Node 22 or newer and an OpenAI API key.

Step 1

Install the package

In your project directory, install the ADK and Zod.

Starting a new project?
mkdir my-agent
cd my-agent
npm init -y
npm install @animahealth/adk zod@^3.25
npm install -D tsx

tsx runs the TypeScript file below. If your project already runs TypeScript, use your existing runner.

Step 2

Create an agent

Save this as agent.mts.

import { adk } from '@animahealth/adk'
import { openai } from '@animahealth/adk/openai'

const app = adk()

const assistant = app.agent({
	name: 'assistant',
	model: openai('gpt-5.6-luna'),
	context: [
		app.context.system('Answer concisely.'),
		app.context.history(),
	],
})

const run = await app.run(assistant, 'Suggest a name for a booking assistant.')
console.log(run.output.text)

The .mts extension lets you use top-level await without changing your project's module configuration.

Step 3

Set your key and run

In your terminal, replace the placeholder with your OpenAI API key.

export OPENAI_API_KEY="your-api-key"
npx tsx agent.mts

The agent calls OpenAI and prints its suggestion in your terminal. The wording varies with each run. To use another provider, see Models and providers.

Build on it

Setup is complete. Add tools and typed state with the Quickstart.

When your application needs more, follow the relevant guide.