Skip to main content
The @beeos-ai/sdk package is the canonical TypeScript client for the public BeeOS OpenAPI contract served by openapi-gateway at openapi.beeos.ai. It is generated from the same backend/openapi/beeos-platform-v1.yaml that powers this site’s API Reference tab — what you see in the spec is what you get in the SDK.
The SDK targets the Platform API only. The A2A protocol (a2a.beeos.ai) and MCP protocol (mcp.beeos.ai) are separate hosts with their own auth — they are not wrapped by this package. Mix-and-match by issuing direct HTTPS requests against those hosts.

Install

Current published version: 0.6.1 (see SDK Changelog for wire deltas). Version 0.6.0 adds BeeOSClient, a hand-maintained facade for the common agent-task lifecycle. Its API remains stable when the generated OpenAPI surface is regenerated.
client.taskEvents(agentId, taskId) is an async generator for the task SSE stream. The full generated API remains available through the package root and the explicit @beeos-ai/sdk/facade export.

Full generated client

The generated code follows the OpenAPI Generator typescript-fetch template: one Configuration value plus one class per OpenAPI tag.
For local development, set basePath to http://localhost:8095 (the default openapi-gw port in Procfile.staging).

Catalog

Instance lifecycle

listInstances supports pagination + status filter:

Agents

Invoke (blocking)

The flagship per-agent operation. See Calling agents for the full contract.

Invoke with idempotency + attachments (0.4.0)

idempotency_key makes the call safe to retry within the TTL window (see ADR 0021 for the contract). Repeat the same key → identical response, no double-invocation.

Streaming invoke (SSE)

The SDK does not abstract SSE — fall back to fetch with Accept: text/event-stream. See Streaming for the frame shapes:

Tasks (async invocation)

For server-push notifications, register a webhook with HMAC signing:
The webhook payload is HMAC-SHA256 signed; the delivery log is queryable via listWebhookDeliveries + replayable via redeliverWebhook (new endpoints in 0.4.0 — see Webhooks).

Conversations

Compare against tasks: tasks are single-shot with a terminal state; conversations stay open until you delete them. See Conversations.

Files

Use the resulting file_id in attachments[].file_id on invokeAgent or createTask.

Error handling

Non-2xx responses throw Response (the underlying fetch Response). Inspect .status and .json() for the BeeOS error envelope ({ success: false, error: { code, message } }):
See Error reference for the full code list.

TypeScript types

Every request and response is fully typed:

Source and generation

The SDK is auto-generated from backend/openapi/beeos-platform-v1.yaml using OpenAPI Generator (sdks/openapi-sdk/generate.sh). Wire-level changes land in SDK Changelog and migration recipes live in SDK Migration.