Protocols and contracts
These pages define rules shared by multiple SDK methods and REST endpoints. Use them when you need the exact wire behavior or data contract rather than one operation's signature.
Contract
SDK and REST pages own individual operations. This section owns the contracts those operations reuse.
Streaming protocol
Choose the correct stream, headers, consumption model, and failure handling.
Objects and schemas
Look up public resource shapes, mutability, nullability, and status values.
Errors
Handle REST envelopes, SDK errors, and failures after streaming begins.
Resource IDs
Recognize public ID formats while treating identifiers as opaque values.
Pagination and filtering
Traverse keyset pages, poll transcripts, and apply resource-specific filters.
Service limits
Design around enforced resource, payload, query, and execution bounds.
Examples
An SDK stream uses the streaming contract and the shared error contract:
const result = await client.completion({ agentId, prompt: "Summarize this." });
for await (const delta of result.textStream) {
process.stdout.write(delta);
}A REST list operation combines IDs, pagination, returned objects, errors, and limits:
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/$AGENT_ID/sessions?limit=50" \
-H "Authorization: Bearer $BLAZING_AGENTS_API_KEY"Used by
Source of truth
packages/sdk/src/index.tspackages/sdk/src/client.tspackages/sdk/src/types.tsservers/api/src/routes/index.tspackages/core/src/api.tspackages/core/src/entities/agents.tspackages/core/src/entities/apikeys.tspackages/core/src/entities/artifacts.tspackages/core/src/entities/attribution.tspackages/core/src/entities/chat.tspackages/core/src/entities/mcp-connections.tspackages/core/src/entities/memories.tspackages/core/src/entities/prompts.tspackages/core/src/entities/providers.tspackages/core/src/entities/sandboxes.tspackages/core/src/entities/sessions.tspackages/core/src/entities/skills.tspackages/core/src/entities/tasks.tspackages/core/src/entities/tenants.tspackages/core/src/entities/usage.tspackages/sdk/src/index.test.tsservers/api/src/app.test.ts
Related guides
See the capability and guide links under Used by.
Reference
See the implementation inventory under Source of truth.