Use Vercel AI SDK with Swytchcode tool execution

Connect Vercel AI SDK models to Swytchcode toolsets.

Book a demo

5

Quickstart steps

1

SDK flow

Integrated

Tools

Safe

Execution

CLI

Ship in one command.

Pull the manifest, set your policy, execute. No SDK sprawl, no boilerplate. Just the tool you need, right now.

npm install @swytchcode/runtime ai @ai-sdk/openai dotenv
swytchcode login
swytchcode get github

How it connects

Connect Vercel AI SDK in minutes

Follow these steps to connect your agent, load a toolkit, and start executing tools through Swytchcode.

  1. 1

    Install the packages

    Install Swytchcode runtime and the Vercel AI SDK packages.

    npm install @swytchcode/runtime ai @ai-sdk/openai dotenv
  2. 2

    Sign in

    Authenticate with Swytchcode so your model can fetch tools.

    swytchcode login
  3. 3

    Create the tool set

    Initialize the Vercel provider and load the tools.

    import { openai } from '@ai-sdk/openai'
    import { generateText } from 'ai'
    import { Swytchcode } from '@swytchcode/runtime'
    import { VercelProvider } from '@swytchcode/runtime/providers/vercel'
    const swx = new Swytchcode(new VercelProvider())
    const tools = await swx.tools.get({ toolkits: ['github'] })
  4. 4

    Run the prompt

    Send a prompt through the Vercel AI SDK with Swytchcode-controlled tools.

    const result = await generateText({
      model: openai('gpt-4.1'),
      tools,
      prompt: 'Summarize my open pull requests from GitHub.',
    })
  5. 5

    Execute the file

    Run your app and let Swytchcode handle the runtime execution layer.

    node main.js

Works with

APIs your team already uses

GitHub
Notion

Ready to ship vercel ai sdk integrations?

Install the CLI and pull your first manifest in under a minute. No account required.

Book a demo