agent/ directory and Eve compiles it into an app that runs on Vercel Functions. Eve emits Vercel AI SDK OpenTelemetry spans for every turn, model call, and tool execution. Phoenix captures them with a single @arizeai/phoenix-otel register() call in Eve’s agent/instrumentation.ts.
Prerequisites
- Node.js 24+ (Eve’s CLI requires it)
- An Eve agent project (
npx eve@latest init my-agent) - A self-hosted Phoenix instance
Install
In your Eve project, install@arizeai/phoenix-otel and the OpenInference span processor for the AI SDK:
Connect to Phoenix
Run a self-hosted Phoenix instance. A local Phoenix athttp://localhost:6006 needs no configuration; otherwise set:
.local.env
Setup tracing
Eve auto-discoversagent/instrumentation.ts and runs it once at server startup. Call register() in the setup callback:
agent/instrumentation.ts
What the spanFilter and reparentOrphanedSpans options do
What the spanFilter and reparentOrphanedSpans options do
spanFilter: isOpenInferenceSpankeeps only the AI spans, dropping the raw HTTP/fetch spans and Eve’s workflow-engine spans.reparentOrphanedSpans: truere-roots the AI spans left orphaned by the filter and promotes Eve’sai.eve.turnwrapper to an agent root, so each turn is one clean trace.
This setup is runnable end to end as the eve-agent example in the Phoenix repo.
Run Eve
Start the Eve dev server:http://127.0.0.1:2000 by default (pass --port to change it). Open a session against the built-in HTTP channel:
continuationToken in the body and an x-eve-session-id header. Stream the session’s lifecycle events to watch the turn complete:
Expected output
Observe in Phoenix
- Open your project. Go to localhost:6006 and click the project named
weather-agent(or whatever you set inPHOENIX_PROJECT_NAME). New spans show up within ~30 seconds of a turn. - Open a trace. Navigate to the “Traces” tab — each row is one full agent turn, from the incoming message to the final reply. Click a row to open the span tree; each span is one unit of work (a model call, a tool run), nested to show what ran inside what.
- Read a span by its name and its kind. Eve registers the AI SDK’s
@ai-sdk/oteltelemetry adapter, which names spans per OpenTelemetry’s GenAI conventions —invoke_agent gpt-4o-mini,step 1,chat gpt-4o-mini,execute_tool get_weather— and the OpenInference span processor translates their attributes to OpenInference on export. Alongside the name, each span carries a span kind, a colored label Phoenix adds to denote what it is:- agent a step of the agent’s turn (its reasoning and orchestration).
- llm a model request (the
chatspan). Open it to see the prompt, the response, and token usage. - tool a tool execution (the
execute_toolspan), carrying atool.nameattribute such asget_weather.
- Find the session context. Click any span and open its Attributes panel. Eve attaches session identifiers under the
ai.settings.context.eve.*prefix —ai.settings.context.eve.session.id,ai.settings.context.eve.turn.id,ai.settings.context.eve.step.index, andai.settings.context.eve.channel.kind— so you can trace any span back to the session and turn it came from. - Read the tree top-down. At the top sits Eve’s
ai.eve.turnspan, an agent root, one per turn. Beneath it sits oneinvoke_agentspan (kind agent) per step Eve took, each wrapping astep 1span (kind chain) that holds the model request — achatspan of kind llm. If the step ran a tool, anexecute_toolspan of kind tool carriestool.name. - If no traces appear at all, see Troubleshooting.

A Vercel Eve turn trace in Phoenix: the ai.eve.turn agent root over the per-step agent, llm, and tool spans.
Troubleshooting
- No traces in Phoenix. Confirm the file is exactly
agent/instrumentation.ts(Eve discovers it by path), and thatPHOENIX_COLLECTOR_ENDPOINTpoints at your Phoenix (it defaults tohttp://localhost:6006in the snippet above). If your Phoenix has auth enabled, also setPHOENIX_API_KEY. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. - Traces land in the wrong project. Phoenix routes spans to a project by the project-name resource attribute. Set
PHOENIX_PROJECT_NAME(or rely on the agent-name fallback above); without it, spans land in Phoenix’sdefaultproject. - Model auth errors. Eve routes models through AI Gateway, so set
AI_GATEWAY_API_KEY, or runvercel linkto use aVERCEL_OIDC_TOKEN. To skip the gateway, switch the agent to a direct provider model (e.g.@ai-sdk/openaiwithOPENAI_API_KEY). A brand-new AI Gateway key also fails until you add a payment method. The turn errors withGatewayInternalServerError: AI Gateway requires a valid credit card on file to service requests, even if you only plan to use the free credits. Add a card in your Vercel AI Gateway dashboard to unlock them.

