---
title: Vercel AI SDK
description: >-
  Use the Vercel AI SDK integration to monitor, troubleshoot, and evaluate your
  applications that use the Vercel AI SDK.
breadcrumbs: Docs > Integrations > Vercel AI SDK
---

# Vercel AI SDK
Supported OS Integration version1.0.0Example LLM Observability trace for Vercel AI SDK usage
## Overview{% #overview %}

Use the Vercel AI SDK integration to monitor, troubleshoot, and evaluate your applications that use the [Vercel AI SDK](https://ai-sdk.dev/docs/introduction).

The Vercel AI SDK auto-instrumentation allows you to:

- Visualize LLM calls with their associated token usage and costs
- See tool calls made by your application, with their respective inputs and outputs
- See embedded calls made by your application and their associated token usage and costs
- See the flow of handoffs between LLMs and the tools they call, allowing you to identify LLM retries and infinite tool calling loops

## Setup{% #setup %}

1. Install the `dd-trace` package:

```shell
npm install dd-trace
```
Run your application using the following Node options to initialize the LLM Observability auto-instrumentation:
```shell
DD_API_KEY=<YOUR_DD_API_KEY> DD_SITE=<YOUR_DD_SITE> DD_LLMOBS_ENABLED=true DD_LLMOBS_AGENTLESS_ENABLED=true DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> node --import dd-trace/initialize.mjs <YOUR-APP>.js
```
(Optional) If using the Datadog Agent, ensure it is running with the following command:
```shell
docker run -d \
    --cgroupns host \
    --pid host \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v /proc/:/host/proc/:ro \
    -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
    -e DD_API_KEY=<DATADOG_API_KEY> \
    -p 127.0.0.1:8126:8126/tcp \
    -p 127.0.0.1:8125:8125/udp \
    -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
    -e DD_APM_ENABLED=true \
    gcr.io/datadoghq/agent:latest
```
Before running your application with the Agent, unset the `DD_LLMOBS_AGENTLESS_ENABLED`, `DD_SITE`, and `DD_API_KEY` environment variables.
## Uninstallation{% #uninstallation %}

Unset the `DD_` environment variables, and remove the `--import dd-trace/initialize.mjs` from the command line for your deployment using the Vercel AI SDK.

## Support{% #support %}

Need help? Contact [Datadog Support](https://app.datadoghq.com/help).

## Further Reading{% #further-reading %}

- [Automatic Instrumentation for LLM Observability](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=nodejs#vercel-ai-sdk)
