Eve (tracing)

Eve is Vercel’s TypeScript framework for durable agents. Respan maps Eve turns and sessions into agent traces, translates the nested AI SDK model and tool spans, and preserves exact delegated-session lineage.

Create an account at platform.respan.ai and grab an API key.

Run npx @respan/cli setup to set up with your coding agent.

See Eve gateway setup to route Eve model calls through the Respan gateway.

Setup

The initial supported versions are Eve 0.26.1, AI SDK 7.0.26, and Node.js 24 or newer. Eve owns the AI SDK OpenTelemetry registration; do not install another AI SDK telemetry bridge for this integration.

1

Install packages

$npm install @respan/respan @respan/instrumentation-eve eve@0.26.1 ai@7.0.26
2

Set the Respan API key

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

This key exports traces to Respan. Your existing Eve model configuration continues to control model authentication and routing.

3

Initialize Respan in Eve

Create agent/instrumentation.ts. Initialize Respan at module scope and await it before exporting Eve’s instrumentation definition.

agent/instrumentation.ts
1import { Respan } from "@respan/respan";
2import {
3 EveInstrumentor,
4 withEveLineage,
5} from "@respan/instrumentation-eve";
6import { defineInstrumentation } from "eve/instrumentation";
7
8const respan = new Respan({
9 apiKey: process.env.RESPAN_API_KEY,
10 instrumentations: [new EveInstrumentor()],
11});
12
13await respan.initialize();
14
15export default withEveLineage(
16 defineInstrumentation({
17 recordInputs: false,
18 recordOutputs: false,
19 }),
20);

Do not initialize Respan inside Eve’s synchronous setup callback. Module-scope initialization installs the span processor before Eve creates its first turn span.

Eve detects agent/instrumentation.ts and enables its vendored AI SDK telemetry integration. Do not register @vercel/otel, @ai-sdk/otel, or VercelAIInstrumentor alongside EveInstrumentor.

4

Run the agent

$npx eve dev
5

View the trace

Open the Traces page. An Eve turn appears as an agent root with task, chat, tool, and delegated-agent children.

Capture model content

The safe setup above does not export model inputs or outputs. Enable either Eve option only after confirming that exporting conversation content matches your privacy and retention requirements.

agent/instrumentation.ts
1export default withEveLineage(
2 defineInstrumentation({
3 recordInputs: true,
4 recordOutputs: true,
5 }),
6);

With both options enabled, Respan records serialized chat input and output. Tool spans include their structured arguments and result.

Delegated subagents

Keep withEveLineage(...) enabled when your agent declares subagents. Eve starts a delegated session in a separate OpenTelemetry trace; the helper uses Eve’s exact parent-session and parent-turn lineage so Respan can attach the child agent subtree to its caller.

If lineage is missing or ambiguous, Respan leaves the sessions as separate traces rather than guessing. Without the helper, each Eve session uses its own session ID as its trace group.

If you already define a step.started event hook, put it inside defineInstrumentation. The helper composes the hook and preserves its returned runtime context.

1export default withEveLineage(
2 defineInstrumentation({
3 events: {
4 "step.started"(input) {
5 return {
6 runtimeContext: {
7 "app.tenant_id":
8 input.session.auth.current?.attributes.tenantId ?? "",
9 },
10 };
11 },
12 },
13 }),
14);

Do not put secrets in runtime context. User-authored runtime-context values are exported as Eve metadata even when input and output recording are disabled.

What is captured

  • Eve turns as agent spans and model steps as task spans
  • AI SDK chat spans with model, provider, streaming state, and token usage
  • Tool calls with structured input and output
  • Eve’s instrumentation functionId as the workflow name on every nested span
  • Current and root session identifiers for thread and trace grouping
  • Delegated child agents nested under the calling Eve turn when exact lineage is available
  • Eve version, environment, turn, step, channel, and authored runtime-context metadata

Configuration

SettingDefaultDescription
EveInstrumentor()Activates Eve and AI SDK span translation. It has no configuration options.
withEveLineage(definition)OptionalRecommended for subagents; composes Eve’s step.started hook and records exact delegated-session lineage.
recordInputsEve defaultEve option controlling model-input telemetry. Set explicitly according to your privacy policy.
recordOutputsEve defaultEve option controlling model-output telemetry. Set explicitly according to your privacy policy.
apiKeyRESPAN_API_KEYRespan key used to export traces.
baseURLhttps://api.respan.aiRespan tracing API base URL.