Blazing Agents

Ship production agents without building the infrastructure behind them.

Blazing Agents runs the production infrastructure for your AI agents, so you can ship agent features without building a backend for them.

You write the agent logic: instructions, the model it uses, and the tools it can call. Blazing Agents runs everything around it. Conversations are stored, files survive between sessions, background tasks keep running after your request returns, and every turn's token usage is tracked. You call it from your backend with an SDK or plain HTTP. Read why teams use Blazing Agents for the longer case.

See it work

A typical integration is one chat route on your backend. Your frontend posts the user's message to it, and the route streams the agent's reply back. Set BLAZING_AGENTS_API_KEY from your dashboard and OPENROUTER_API_KEY from OpenRouter.

Run once: create the agent

Save a model provider and an agent that uses it. Run this script one time and keep the printed agent ID. Agent names are unique, so a second run fails; reuse the agent you already have.

import { BlazingAgents } from "@blazingagents/sdk";

const client = new BlazingAgents({
  apiKey: process.env.BLAZING_AGENTS_API_KEY!,
});

const provider = await client.providers.create({
  name: "OpenRouter",
  providerType: "openrouter",
  baseUrl: null,
  apiKey: process.env.OPENROUTER_API_KEY!,
});

const agent = await client.agents.create({
  name: "Support agent",
  instructions: "Answer clearly and briefly.",
  providerId: provider.id,
  model: "openai/gpt-6-luna",
});

console.log(`BLAZING_AGENTS_AGENT_ID=${agent.id}`);

Add the chat route

Set BLAZING_AGENTS_AGENT_ID to the printed ID. The route starts a new conversation when the request has no sessionId, and continues that conversation when it does.

import { BlazingAgents, type UIMessage } from "@blazingagents/sdk";

const client = new BlazingAgents({
  apiKey: process.env.BLAZING_AGENTS_API_KEY!,
});

export async function POST(request: Request): Promise<Response> {
  const { message, sessionId } = await request.json();
  const result = await client.chat({
    agentId: process.env.BLAZING_AGENTS_AGENT_ID!,
    message,
    sessionId,
  });
  return result.toResponse();
}

On the frontend, useChat with BlazingAgentsChatTransport renders the streamed reply and sends the session ID back on the next message; see Build a chatbot. Keep your API key on the backend, and before you continue a session, check that it belongs to the signed-in user. Connect Blazing Agents to your app covers that check.

What you can build

Start here

New to Blazing Agents:

  1. Set up your API key and install an SDK.
  2. Run your first agent.
  3. Browse complete apps in the examples repository.

Find a task

I want toGo to
Save a provider and choose a modelProviders and models
Stream chat through my backendChat endpoint pattern
Build a chat UI with stop, edit, and regenerateBuild a chatbot
Get structured JSON backStructured output
Teach an agent a reusable skillSkills
Connect an MCP serverMCP tools
Approve tool calls before they runTool approvals
Run a background taskTask runs
Run a task on a scheduleSchedules
Put an agent in Slack or TelegramSlack and Telegram
Track usage and set monthly limitsUsage and quotas

Choose an interface

InterfaceUse it when
TypeScript SDKYour backend runs TypeScript and you want AI SDK streaming.
Python SDKYour backend runs Python, sync or async.
REST APIYou work in another language or want direct HTTP control.
CLIYou want to chat with agents or script one-off runs from a terminal.

On this page