Skip to main content
eve is Vercel’s framework for durable backend agents. It emits OpenTelemetry spans for every agent turn, model call, and tool call, using the GenAI semantic conventions Agnost AI reads. You add one exporter file to the agent. You don’t need the Agnost AI SDK, and you don’t change any agent code. The exporter applies to the whole agent, whichever channel starts the work: the HTTP API, a chat channel such as Slack, a schedule, or the MCP channel when you publish the agent or its tools as an MCP server.

Manual setup: OpenTelemetry

1. Install the exporter

2. Add the Agnost AI destination

Create agent/instrumentation/agnost.ts. eve loads every file in agent/instrumentation/ on its own, so you don’t need to import this one anywhere.
agent/instrumentation/agnost.ts
runtimeContext adds userId to every model span, and Agnost AI uses it for user-level analytics. principalId is the caller your channel’s auth accepted, such as the subject of an OAuth token. To use your own ID instead, read it from caller.attributes.

3. Record inputs and outputs in production

In preview and production, eve sends only metadata unless the channel marks the conversation public. Without message and tool content, Agnost AI can’t classify intents, sentiment, or failures. Create agent/instrumentation/otel.ts to send it:
agent/instrumentation/otel.ts
This policy applies to every OpenTelemetry destination in the process, and it also decides whether eve keeps completed run data. To keep some content out, return recordInputs: false or recordOutputs: false for the channel, audience, or environment the policy receives, or redact individual attributes with an exportPolicy.attribute callback in agnost.ts.

4. Set your org ID and redeploy

Paste your Agnost AI org ID, then redeploy. Vercel applies environment variables to new deployments only. For local runs, put AGNOST_ORG_ID in .env.local.

What appears in Agnost AI

  • Conversations are grouped by eve’s session ID (gen_ai.conversation.id), so every turn in one eve session lands in the same conversation.
  • Users come from the userId that runtimeContext sets.

MCP servers built with eve

With mcpChannel({ tools: true }), an MCP client can call the agent’s tools directly. Each direct tools/call runs outside a conversation, so it appears in Agnost AI as its own session with one tool event, including arguments, result, and latency. These calls don’t run a model, so runtimeContext doesn’t apply and the event has no user. Work started through agent_start runs a full agent turn and appears like any other conversation.

Verify

  1. Start the agent with AGNOST_ORG_ID set, for example with eve dev.
  2. Send one message that makes the agent call a tool.
  3. Open Events in Agnost AI. You should see the turn, the model call, and the tool call with its arguments.
  4. Open Conversations to check that the turn is grouped under the eve session and attributed to the caller.
To compare with what eve exported, run eve traces show for the most recent local trace.

Troubleshooting

  • No events: confirm AGNOST_ORG_ID is set in the environment the deployment runs in, and redeploy after adding it. The URL must be the full trace endpoint, https://otel.agnost.ai/v1/traces.
  • Events without message or tool content: the default trace policy drops content in preview and production. Add the otel.ts policy from step 3.
  • Many workflow.* events in separate sessions: the exportPolicy filter is missing from agnost.ts.
  • Every user is anonymous: confirm runtimeContext returns userId, and that the channel’s auth identifies callers. Direct MCP tool calls have no user, as described above.

References

Next steps

  • Conversations: review complete eve sessions.
  • Tool calls: track tool reliability and latency.
  • Patterns: organize production conversations by what users wanted.