Connect to Vercel

Before an agent can reply, it needs a model credential. Studio walks you through getting one from Vercel. No keys to copy, no CLI to install.

Why it's needed

An Eve agent's default model routes through the Vercel AI Gateway. The Gateway is what actually calls the model provider, so the agent needs a credential proving it's allowed to use it. Studio obtains a VERCEL_OIDC_TOKEN, a short-lived token tied to a linked Vercel project, and writes it to the agent's .env.local.

Until that credential exists, the model can't run. In Chat (and at the top of the Environment tab), an agent with no credential shows a Not connected to Vercel banner instead of replying. It reads Sign in to Vercel when you aren't signed in yet.

The flow

  1. Sign in with Vercel (if you aren't already). Studio starts the Vercel CLI's device sign-in and opens the approval page in your browser. Approve it there; the banner updates automatically. Nothing to paste back, no email step.

  2. Pick a team. If your account belongs to more than one Vercel team, a team selector appears in the banner. The model bills the chosen team's AI Gateway, so pick a team with billing set up. A team without billing links fine but the first message fails in Chat with a Gateway credit-card error; if that happens, relink against the right team.

  3. Connect to Vercel. Studio links the agent's folder to a Vercel project (creating one when needed) and pulls the environment, which includes the AI Gateway token:

    vercel link --yes [--team <id>]
    vercel env pull .env.local --yes
    

The console shows the output as it runs. When it's done, the banner turns into Connected to Vercel: the model can run now. If the dev server was running, Studio restarts it; otherwise hit Start, then chat. The Environment tab refreshes itself once the link lands, and the header's Vercel segment switches to linked.

The app runs the Vercel CLI with npx vercel@latest, so there's nothing to install globally, the same way it provisions the Node runtime and Eve. If you prefer the terminal, eve link does the same job: it links the directory to a Vercel project and pulls the environment so the Gateway credential lands in .env.local. A running eve dev reloads env files automatically after the pull.

eve link
eve link --non-interactive --project <name-or-id> [--team <team-id-or-slug>]

Alternative: an API key

VERCEL_OIDC_TOKEN is scoped to a linked project and refreshes as needed, which is why Studio prefers it. If you'd rather use a standalone credential, for example for an agent you don't want tied to a specific project, you can instead set AI_GATEWAY_API_KEY in the agent's environment. Either credential satisfies the Gateway; you don't need both. Studio also treats a direct-provider key (ANTHROPIC_API_KEY, OPENAI_API_KEY) as a credential for agents whose agent.ts calls a provider SDK directly. You manage environment variables from the Deploy → Environment tab.

Next

  • Chat: talk to the agent now that the model can run.
  • Deploy to Vercel: ship the linked project to production.
  • The workspace: where the banner and Environment tab live.