Skip to content

Agent Accelerator documentation ​

Build, run and look after AI agents in TypeScript with one small SDK.

Agent Accelerator (agent-accelerator) gives you one Agent class for Google Gemini, OpenAI, Anthropic, OpenRouter and any OpenAI-compatible service.

It adds tools, streaming, helper agents, scheduled actions, saved sessions, spending limits and safe file handling. There are no provider SDKs to install. The only dependency is zod.

Status: the SDK is before version 1.0. Pin an exact version. The known limits are listed honestly in Security.

Start here ​

You are…Read
NewGetting started, then How it works
Looking something upReference
UpgradingMigration
An AI agent writing code with the SDKFor AI agents and llms.txt

A first look ​

ts
import { Agent } from "agent-accelerator";

const agent = new Agent({
  model: "google/gemini-3.5-flash-lite",
  instructions: "You are a concise assistant.",
});

const res = await agent.run("Explain what a mutex is in two sentences.");
console.log(res.text);
console.log(res.usage);

I want to… ​

GoalRead
Create an agent, get JSON back, edit an agent from a programAgents
Pick a model or provider, describe a private modelModels and providers
Fix the list of models a program may useAllowed models
Set reasoning, prompt caching or a service tierReasoning and caching
Let the model call my functions, ask for approval, add hooksTools
Stream the answer, steer a busy agent, make retries safeStreaming and steering
Hand work to helper agentsSub-agents
Run work later, once or on repeatScheduled actions
Save and resume chats, survive a crashSessions
Send images, audio, video and PDFsMedia input
See what a run costUsage and cost
Set limits, budgets, timeouts and retriesLimits and retries
Set options in code and choose what a user may changeSettings
Handle errors and watch what the SDK doesErrors and telemetry
Keep keys, files and URLs safeSecurity
Change the prompts the SDK sendsPrompts
Test my own agents with no network and no costTesting
Make pictures, edit them, or let an agent make themImages
Make video clipsVideos
Turn text, images or audio into vectors for searchEmbeddings
Get probabilities for yes/no, choice and rating questionsDecisions

More ​

Runnable demos live in examples/. They call real providers and cost real tokens, except the generator demos, which run offline by default.

Released under the MIT License.