Custom Step Tracking
UseObserve.observe() for orchestration steps, tool execution, policy checks, and handoffs that provider SDKs do not expose.
Overview
Custom agent steps are the fallback integration path for frameworks, internal tools, and orchestration code without a dedicated adapter. Wrap the function you control and add Beacon compatibility attributes that describe what happened.What Asymptote Captures
- A span for each wrapped function call.
- Input count and output type unless disabled.
- Errors recorded on failed spans.
- Beacon compatibility attributes such as
beacon.event.action,beacon.tool.name,beacon.mcp.server, andbeacon.approval.decision.
Prerequisites
- Node.js 20 or newer.
@asymptote/sdkinstalled.- The agent framework, tool client, or internal orchestration code you want to wrap.
ASYMPTOTE_API_KEYset for hosted Observe, orOTEL_EXPORTER_OTLP_ENDPOINTset for customer-managed OTLP export.
Install the SDK
Set the hosted Observe API key
Getting Started
Wrap a custom tool step
Avoid Sensitive Metadata
SetignoreInput or ignoreOutput when wrapper metadata should avoid recording argument counts or output type.
Redact sensitive step metadata
Common Beacon Actions
Use Beacon compatibility attributes when a custom step should normalize into a known event category.| Action | Typical category | Example use |
|---|---|---|
prompt.submitted | prompt | User prompt or agent turn |
tool.invoked | tool | Function call, retrieval step, or external API call |
command.executed | command | Shell command or build step |
file.modified | file | Agent-created or edited file |
mcp.tool_invoked | mcp | MCP server tool call |
approval.requested | approval | Human review or policy gate |
Wrap an MCP tool call
Troubleshooting
- Confirm
Observe.initialize()runs before wrapped functions are called. - Confirm the wrapped function returned by
Observe.observe()is the function your application invokes. - Use
ignoreInputorignoreOutputfor sensitive steps. - Call
Observe.flush()before short-lived scripts or jobs exit.
What’s Next
Observe
Review the full manual span wrapper reference.
SDK Reference
Review supported Beacon compatibility attributes.

