How does Vercel provider store data?

main
5ba82ecAdd `workflow health` CLI command and web functionality (#816)
This post might have stale content, as main is 108 commits ahead.

where does vercel provider store things? do they hardcode a redis URL or something? or is it via an environment variable? postgres? redis? what is it?

Avatar of anthropic/claude-opus-4.5
Claude Opus 4.5
commented

Now I have the full picture. Here's the answer:


##Vercel Provider Storage: It's a Remote API, Not Redis or Postgres

The world-vercel provider does NOT use Redis or Postgres directly. Instead, it makes HTTP API calls to Vercel's managed infrastructure.

###How it works:

  1. API Endpoints: All storage operations (runs, steps, events, hooks) are HTTP requests to:

    • Default (from Vercel runtime): https://vercel-workflow.com/api
    • Proxy (for CLI/web): https://api.vercel.com/v1/workflow
  2. Authentication: Uses Vercel's OIDC token system:

    const token = config?.token ?? (await getVercelOidcToken());
    

    The token is obtained via @vercel/oidc package when running in Vercel's environment.

  3. Configuration via environment: The APIConfig accepts:

    interface APIConfig {
      baseUrl?: string;        // Custom API URL (optional)
      token?: string;          // Auth token (optional, auto-obtained via OIDC)
      headers?: RequestInit['headers'];
      skipProxy?: boolean;
      projectConfig?: {
        projectId?: string;    // Vercel project ID
        teamId?: string;       // Vercel team ID  
        environment?: string;  // e.g., 'production'
      };
    }
    
  4. No hardcoded Redis/Postgres URLs: The actual database storage is managed by Vercel on their backend infrastructure. Your code just talks to their API - you don't configure or see the underlying storage.

###TL;DR

The Vercel provider is essentially an API client that talks to Vercel's managed workflow service. Vercel handles all the actual persistence (likely DynamoDB based on comments mentioning "scanning a dynamo table" in runs.ts). Authentication happens automatically via OIDC tokens when deployed on Vercel.

Avatar of julianbenegas
Julian Benegas
commented

perfect! so the hardcoded stuff is the https://vercel-workflow.com/api part. then @vercel/oidc gives me getVercelOidcToken ?

Avatar of anthropic/claude-opus-4.5
Claude Opus 4.5
commented

Exactly right!

  1. Hardcoded URLs in utils.ts:

    const defaultUrl = 'https://vercel-workflow.com/api';
    const defaultProxyUrl = 'https://api.vercel.com/v1/workflow';
    
  2. getVercelOidcToken comes from the @vercel/oidc package:

    import { getVercelOidcToken } from '@vercel/oidc';
    

    Used here:

    const token = config?.token ?? (await getVercelOidcToken());
    

So when your code runs on Vercel's infrastructure, getVercelOidcToken() automatically fetches a valid authentication token for you - no API keys or secrets to manage. The token gets added as a Bearer token in the Authorization header for all API requests.


END OF POST

How does Vercel provider store data? — vercel/workflow