Starter project for Vercel Ship "Building agents with the AI SDK". This coding agent is built with AI SDK 5, Vercel AI Gateway, and Vercel Sandbox. It can read and modify GitHub repositories.
- Install the Vercel CLI:
npm i -g vercel
- Deploy this repo with the button above.
- Clone the new repo locally.
- Link to Vercel project:
vercel link
- Pull environment variables:
vercel env pull
(may need team/project IDs too) - Install dependencies:
pnpm install
- Start dev server:
vercel dev
VERCEL_OIDC_TOKEN
- For AI Gateway and Sandbox (this will be automatically added when you runvercel dev
)GITHUB_TOKEN
- GitHub personal access token
To create a GitHub Personal Access Token (PAT):
- Go to https://github.com/settings/personal-access-tokens
- Click "Generate new token"
- Give it a descriptive name
- Set repository access to "All repositories"
- Add the following repository permissions:
- Issues: Read and write
- Pull requests: Read and write
- Click "Generate token"
- Copy the token immediately (you won't be able to see it again)
- Add it to your
.env.local
file asGITHUB_TOKEN
curl -X POST https://your-deployment.vercel.app/api/agent \
-H "Content-Type: application/json" \
-d '{
"prompt": "update readme to say hey were so back",
"repoUrl": "https://github.com/nicoalbanese/ai-sdk-langgraph/"
}'
Parameters:
prompt
- What you want the agent to dorepoUrl
- GitHub repository URL