Skip to content

feat(arize): add Browserbase × Arize AX integration#86

Open
Nancy-Chauhan wants to merge 1 commit into
browserbase:mainfrom
Nancy-Chauhan:arize-integration
Open

feat(arize): add Browserbase × Arize AX integration#86
Nancy-Chauhan wants to merge 1 commit into
browserbase:mainfrom
Nancy-Chauhan:arize-integration

Conversation

@Nancy-Chauhan

@Nancy-Chauhan Nancy-Chauhan commented Jul 7, 2026

Copy link
Copy Markdown

Adds a Browserbase × Arize AX integration example under examples/integrations/arize/.

Use Browserbase as a load_page tool for a tool-calling agent, traced end to end with Arize AX via OpenTelemetry + OpenInference. The model calls the Browserbase tool to browse a page and answer; the run is exported to AX as a CHAIN → LLM → TOOL trace with tokens and cost.

This makes Browserbase a tool an agent can call.

Files

  • src/agent.ts — tool-calling agent with manual CHAIN/TOOL spans
  • src/instrumentation.ts — Arize AX / OTel setup + OpenAI auto-instrumentation
  • src/register-prompt.ts — optional: publish the load_page tool to the AX Prompt Hub via @arizeai/ax-client

Verification — verified end to end against live Arize AX, Browserbase, and OpenAI (gpt-5.4): correct CHAIN → LLM → TOOL trace on the happy path, ERROR-marked spans on the failure path, and idempotent prompt registration.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Note

Low Risk
Additive documentation and example code only; no changes to shared packages or production services. Demo uses external API keys and sends traces to Arize when configured.

Overview
Adds a new Arize AX example under examples/integrations/arize/ and lists it in the root monorepo README.

The sample is a Node/TypeScript tool-calling agent that exposes Browserbase Fetch API as a load_page tool (markdown page content, no full browser session). An OpenAI loop answers user prompts (CLI or default question) by calling that tool when needed.

Observability is wired via OpenTelemetry + OpenInference: instrumentation.ts exports OTLP traces to Arize (https://otlp.arize.com/v1/traces) with space/API headers, auto-instruments OpenAI for LLM spans, and agent.ts adds manual CHAIN / TOOL spans around the agent run and each fetch. Spans are flushed on shutdown via provider.shutdown().

Also included: .env.example, integration README, package.json / lockfile, and tsconfig.json for npm start / npm run build.

Reviewed by Cursor Bugbot for commit d2999b1. Bugbot is set up for automated code reviews on this repo. Configure here.

@Nancy-Chauhan Nancy-Chauhan requested a review from a team as a code owner July 7, 2026 02:58
Comment thread examples/integrations/arize/src/agent.ts
Comment thread examples/integrations/arize/src/agent.ts
@Nancy-Chauhan Nancy-Chauhan force-pushed the arize-integration branch 2 times, most recently from dda9851 to a128101 Compare July 7, 2026 04:41
Comment thread examples/integrations/arize/src/agent.ts Outdated
Comment thread examples/integrations/arize/src/agent.ts
Comment thread examples/integrations/arize/package.json Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d85b139. Configure here.

Comment thread examples/integrations/arize/package.json Outdated
Use Browserbase as a load_page tool for a tool-calling agent, traced end to
end with Arize AX via OpenTelemetry + OpenInference. The model calls the
Browserbase tool to browse a page and answer; the run is exported to AX as a
CHAIN → LLM → TOOL trace with tokens and cost.

- src/agent.ts: tool-calling agent with manual CHAIN/TOOL spans
- src/instrumentation.ts: Arize AX / OTel setup + OpenAI auto-instrumentation
- src/register-prompt.ts: optional — publish the load_page tool to the AX
  Prompt Hub via @arizeai/ax-client

Verified end to end against live Arize AX, Browserbase, and OpenAI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants