Skip to main content

SDK Overview

Asymptote Observe instruments cloud-hosted agent applications and exports OpenTelemetry traces that remain compatible with Beacon’s normalized endpoint event model. Use it for servers, serverless functions, workers, and hosted agent platforms where installing the local Beacon endpoint agent is not the right fit. The open-source agent-beacon repository currently includes the TypeScript package @asymptote/sdk. It provides the Observe module for OpenTelemetry setup, common AI SDK instrumentation, manual span wrappers, lifecycle helpers, and Beacon compatibility attributes.

What Asymptote Captures

Asymptote Observe is OpenTelemetry-first. It records supported model calls, agent turns, tool calls, custom orchestration steps, errors, and Beacon compatibility attributes as spans that can be sent to hosted Observe or a customer-managed OTLP collector. Supported cloud SDK paths:
SDK or patternSupport path
AnthropicOpenLLMetry instrumentation for @anthropic-ai/sdk
Claude Agent SDKObserve.wrapClaudeAgentQuery() or Observe.observe() around the agent entrypoint
OpenAIOpenLLMetry instrumentation for the openai package
Vercel AI SDKPass Observe.getTracer() into experimental_telemetry
Custom orchestrationWrap functions with Observe.observe()

Quickstart

Install @asymptote/sdk, configure export, create a trace, and flush it.

Instrumentation

Configure Observe.initialize(), patch already-loaded modules, or plug into an existing OpenTelemetry provider.

Observe

Wrap custom agent steps, tool calls, and orchestration logic.

SDK Lifecycle

Flush or shut down tracing in scripts, jobs, serverless handlers, and long-running services.

Agent SDK Integrations

Capture Anthropic, Claude Agent SDK, OpenAI, Vercel AI SDK, and custom orchestration.

Reference

Review Observe APIs, export options, environment variables, and Beacon compatibility attributes.

Choose The Right Surface

Use the SDK when agent activity runs in application code you control. Use Beacon endpoint or CI collection when activity happens in a local harness or ephemeral build job.
EnvironmentRecommended surface
Node.js services, workers, and hosted agent appsAsymptote Observe SDK
Next.js and serverless functionsNext.js and serverless guide
Local coding and knowledge-worker harnessesBeacon endpoint agent
CI jobs running Claude Codebeacon ci

SDK And Beacon

The SDK and Beacon share an event contract, but they target different deployment surfaces.
SurfacePurpose
Asymptote Observe SDKCloud application telemetry exported as OpenTelemetry traces
Beacon endpoint agentLocal endpoint telemetry collected from supported agent harnesses
Beacon CIEphemeral CI telemetry captured for a single job
Beacon JSONL schemaNormalized event model used by local logs, dashboards, and downstream security pipelines
Cloud SDK spans set beacon.origin=cloud and can include Beacon compatibility attributes such as beacon.harness.name, beacon.event.action, beacon.tool.name, and beacon.prompt.text. The same attributes can be consumed by Beacon-compatible collectors or managed Observe ingest.