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 |
|---|---|
| New | Getting started, then How it works |
| Looking something up | Reference |
| Upgrading | Migration |
| An AI agent writing code with the SDK | For 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…
| Goal | Read |
|---|---|
| Create an agent, get JSON back, edit an agent from a program | Agents |
| Pick a model or provider, describe a private model | Models and providers |
| Fix the list of models a program may use | Allowed models |
| Set reasoning, prompt caching or a service tier | Reasoning and caching |
| Let the model call my functions, ask for approval, add hooks | Tools |
| Stream the answer, steer a busy agent, make retries safe | Streaming and steering |
| Hand work to helper agents | Sub-agents |
| Run work later, once or on repeat | Scheduled actions |
| Save and resume chats, survive a crash | Sessions |
| Send images, audio, video and PDFs | Media input |
| See what a run cost | Usage and cost |
| Set limits, budgets, timeouts and retries | Limits and retries |
| Set options in code and choose what a user may change | Settings |
| Handle errors and watch what the SDK does | Errors and telemetry |
| Keep keys, files and URLs safe | Security |
| Change the prompts the SDK sends | Prompts |
| Test my own agents with no network and no cost | Testing |
| Make pictures, edit them, or let an agent make them | Images |
| Make video clips | Videos |
| Turn text, images or audio into vectors for search | Embeddings |
| Get probabilities for yes/no, choice and rating questions | Decisions |
More
- Reference lists every option, field, event, error and environment variable.
- Scheduled action files describes the files a scheduled action writes.
- Migration lists what was removed or renamed.
Runnable demos live in examples/. They call real providers and cost real tokens, except the generator demos, which run offline by default.