TypeScript SDK
@blazing-agents/sdk is the resource-style TypeScript client for /v1. Use it from Node.js backend code for resource management and AI SDK-native streaming. Its public contract mirrors the REST resources and streaming helpers documented below.
Requirements and installation
- Node.js 24 or newer
ai7.0.32 as the peer dependency- A tenant API key
Install both packages with npm install @blazing-agents/sdk ai@7.0.32.
Keep credentials on the backend
A tenant API key can access every resource in its Tenant. Never expose it to browser or End-user code; put your own authenticated backend in front of the SDK.
Create a client
import { BlazingAgents } from "@blazing-agents/sdk";
const client = new BlazingAgents({
apiKey: process.env.BLAZING_AGENTS_API_KEY!,
});
const { agents } = await client.agents.list();The default baseUrl is http://localhost:8787. See Client for custom URLs and transports.
Generation helpers
| Method | Result |
|---|---|
chat() | Stateful Session stream and server-minted or resumed Session ID |
completion() | Stateless text stream and final text |
object() | Stateless partial-object stream and final JSON value |
Resources
| Property | Operations |
|---|---|
agents | Configuration, lifecycle, Versions, avatars, and MCP Attachments |
sessions | Session lists, transcripts, deletion, and Tool approvals |
sandboxes | Durable Sandbox CRUD |
skills | Tenant Skill uploads and catalog reads |
providers | Provider CRUD and credential tests |
mcpConnections | MCP Connection CRUD, tests, OAuth, and reconnect |
memories | Agent-owned Memory CRUD and search |
artifacts | Artifact listing, raw download, and deletion |
tasks | Tasks, Task runs, transcripts, and cancellation |
prompts | Reusable Prompt CRUD |
apiKeys | API key creation, listing, and revocation |
usage | Tenant and Agent usage rollups |
tenant | Tenant settings and quota |
Errors
HTTP, transport, and SDK stream failures use BlazingAgentsError; successful JSON resource responses are checked against shared Zod schemas. See Errors.
Find a method
Resource pages use stable kebab-case method anchors, such as agents.restoreVersion(). For raw requests, use the matching REST API.