@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
Stable task facade (recommended)
Version 0.6.0 addsBeeOSClient, 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 Generatortypescript-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 tofetch with
Accept: text/event-stream. See Streaming for the
frame shapes:
Tasks (async invocation)
listWebhookDeliveries + replayable via
redeliverWebhook (new endpoints in 0.4.0 — see
Webhooks).
Conversations
Files
file_id in attachments[].file_id on
invokeAgent or createTask.
Error handling
Non-2xx responses throwResponse (the underlying fetch Response).
Inspect .status and .json() for the BeeOS error envelope
({ success: false, error: { code, message } }):
TypeScript types
Every request and response is fully typed:Source and generation
The SDK is auto-generated frombackend/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.
- npm:
@beeos-ai/sdk - GitHub:
beeos-ai/sdk