Python SDK

Python SDK

Install the typed sync and async Python clients and call every Blazing Agents API from your backend.

Call Blazing Agents from Python with typed responses, sync and async clients, lazy pagination, and streaming. Install blazing-agents from PyPI and import it as blazing_agents. It supports Python 3.11 and newer.

Server-side only

A tenant API key can reach everything in your tenant. Keep it in backend code and never ship it to a browser or mobile app.

Install

pip install blazing-agents

Create a client

Set BLAZING_AGENTS_API_KEY in your environment, or pass api_key to the constructor. The client talks to https://api.blazingagents.com by default.

from blazing_agents import BlazingAgents

with BlazingAgents() as client:
    tenant = client.tenant.get()
    print(tenant.name)

For async code, use AsyncBlazingAgents. It has the same method names; you await them, and use async with and async for where the sync client uses with and for. There is no achat() or other a-prefixed alias.

from blazing_agents import AsyncBlazingAgents

async def show_tenant() -> None:
    async with AsyncBlazingAgents() as client:
        tenant = await client.tenant.get()
        print(tenant.name)

Client objects

AttributeWhat you manage
BlazingAgentsClient options, errors, and the chat(), completion(), and object() generation methods
agentsAgents, their versions, avatars, and MCP settings
workspacesPersistent file systems your agents share
agent(agent_id).skillsSkills owned by one agent
sessionsConversations, transcripts, and tool approvals
providersModel provider keys and model lists
mcp_connectionsRemote MCP servers your agents can call
memoriesNotes an agent remembers across sessions
artifactsFiles your agents publish
tasksBackground and scheduled agent work
promptsReusable message templates
usageToken and request usage
tenantTenant name and quota
chat_connectionsSlack and Telegram bots
chat_deliveriesFailed and ambiguous deliveries across your Slack and Telegram bots

Conventions

  • Arguments use snake case and are keyword-only, except leading resource IDs such as agent_id in client.agents.get(agent_id).
  • Omitting an argument sends nothing, so the server keeps its default or current value. Passing None sends JSON null, which clears a nullable field.
  • Responses are Pydantic v2 models with snake-case fields. Unknown server fields stay in model_extra, so a newer API does not break your code.
  • Every response model carries the server request ID in _request_id. Keep it when you contact support.

Next

On this page