Observe API
UseObserve.observe() to create spans for custom agent orchestration: planning, tool execution, policy checks, handoffs, retrieval, and other work that provider SDKs do not expose.
Wrap A Function
Wrap a tool call
Observe Options
| Option | Purpose |
|---|---|
name | Span name |
spanKind | Optional OpenTelemetry span kind |
attributes | Span attributes, including Beacon compatibility attributes |
ignoreInput | Do not record asymptote.observe.input.count |
ignoreOutput | Do not record asymptote.observe.output.type |
Avoid Sensitive Metadata
SetignoreInput or ignoreOutput when wrapper metadata should avoid recording argument counts or output type.
Ignore input and output 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

