Skip to content

Quickstart

Install the SDK:

Terminal window
npm install @axiastudio/aioc

Minimal example:

import "dotenv/config";
import { Agent, run, setupOpenAI } from "@axiastudio/aioc";
setupOpenAI();
const agent = new Agent({
name: "Hello Agent",
model: "gpt-4.1-mini",
instructions: "Answer in 2 short sentences.",
});
const result = await run(
agent,
"In one sentence, what is a deterministic policy gate in an agent SDK?",
);
console.log(result.finalOutput);
  1. A provider is configured with setupOpenAI() or setupMistral().
  2. The Agent defines instructions, model, tools, and handoffs.
  3. run(...) executes the turn loop and returns a structured result.

By default, run(...) is non-streaming unless stream: true is set.