Vercel
Let an agent watch your deployments and act on them without the run of your team. It reads deployments, build logs, aliases and domains, and redeploying, promoting, rolling back, cancelling or deleting a deployment can wait for a person.
- host
- api.vercel.com
- connect
- API key, per user
Redeploy
vercel-redeploy
Promote deployment
vercel-promote-deployment
Rollback deployment
vercel-rollback-deployment
Cancel deployment
vercel-cancel-deployment
Reads and writes in Vercel. Writes are off until you switch them on.
Each one is a named operation from the pack. Reads change nothing.
Writes
Redeploy
read backvercel-redeploy
Start a new build of an existing deployment, with the project's current settings and environment variables. Pass target=production to build it for production; without it the new deployment is a preview. Returns the new deployment with its id and readyState.
Promote deployment
read backvercel-promote-deployment
Point a project's production domains at an existing production deployment, without rebuilding it: a staged build that has not served production yet, or, after a rollback, the deployment to restore. Promoting after a rollback undoes it and turns Vercel's assignment of production domains to new builds back on. To put a preview build in production, use redeploy with target=production.
Rollback deployment
read backvercel-rollback-deployment
Instant Rollback: point a project's production domains back at an earlier deployment that served production before. It does not rebuild, so that deployment keeps the environment variables it was built with. On the Hobby plan, the target must be the deployment just before the current one.
Cancel deployment
read backvercel-cancel-deployment
Cancel a deployment that is queued or building. Vercel refuses one that has already finished.
Delete deployment
acknowledgedvercel-delete-deployment
Delete one deployment. Its URLs stop serving it, and it cannot be restored. Returns the deployment's uid and state DELETED.
Reads
List teams
vercel-list-teams
List the teams the token can reach, 20 per page, with each team's id, slug and name. Every other action needs a team id from here; a Hobby account is listed as a team too. Vercel returns pagination.next when there are more; pass it as until for the next page.
List deployments
vercel-list-deployments
List a team's deployments, newest first, 20 per page: uid, name (the project), url, state, target, projectId, created time, creator and Git metadata. Filter by project, target, state, branch or commit. Vercel returns pagination.next when there are more; pass it as until for the next page.
Get deployment
vercel-get-deployment
Get one deployment: readyState, target, url, aliases, the error code and message of a failed build, the Git source, creator, regions and timings. It lists the names of the environment variables the build had, never their values. A deployment with a very large route table can be cut at 64 KB.
List deployment events
vercel-list-deployment-events
Read a deployment's build log: up to 50 events, oldest first, or newest first with direction=backward. Each event has a type, a created time in milliseconds and its text. For the next page, pass the last event's created time as since (oldest first) or until (newest first). It never follows a live build: call it again for new lines.
List deployment aliases
vercel-list-deployment-aliases
List the aliases assigned to one deployment: each hostname (custom domains and vercel.app URLs), its uid and when it was created.
List project domains
vercel-list-project-domains
List a project's domains, 20 per page: name, Git branch, redirect, whether it is verified, and the TXT records still needed to verify it. Pass production=true for production domains only. Vercel returns pagination.next when there are more; pass it as until for the next page.
Get domain config
vercel-get-domain-config
Check how a domain is set up for Vercel: misconfigured (true when its DNS does not point at Vercel), configuredBy (A, CNAME, http or dns-01), and the recommended CNAME and A records.
Get alias
vercel-get-alias
Get one alias by its hostname (www.example.com) or its uid: the deployment it serves (deploymentId), its project and when it was created. Use it on a production domain to see which deployment is live.
List promote aliases
vercel-list-promote-aliases
List the aliases of a project's latest promote, 20 per page, with each alias's status. Use it after promote-deployment to see which domains have moved. Pass failed_only=true for the ones that failed. Vercel returns pagination.next when there are more; pass it as until for the next page.
How do users connect? Each one brings their own Vercel.
- 1.Call for the userYour server invokes the action for the signed-in user. Without a Vercel connection, the SDK throws EndUserNotConnectedError with a connect link.
- 2.The user pastes a keyThe link opens a form that shows where in Vercel's settings to create the key. The link lasts 10 minutes and works once.
- 3.Anlyon checks itThe key is checked with Vercel before it is kept, and bound to api.vercel.com. It is never shown back.
- 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.
Guardrails. Suggested limits and approvals, for you to review.
Suggested limits
- 20 redeploys a day
- 10 promotions a day
- 10 rollbacks a day
- 20 cancellations a day
- 20 deployments deleted a day
Suggested approvals
- A person approves redeploying
- A person approves promoting a deployment to production
- A person approves rolling back production
- A person approves cancelling a deployment
- A person approves deleting a deployment
What the key must allow
- A token you create, scoped to one team, with an expiration
- It acts as you in that team
Good to know
- A build log holds whatever the build printed, so a build that prints a secret shows it.
- A redeploy's read-back shows the deployment exists, not that its build finished.
For your own account
- 1.In Vercel, open Account Settings, Tokens, and create a token scoped to the team your agent works in.
- 2.In Anlyon, open Actions, then Integrations, choose Vercel and paste the token.
- 3.Anlyon checks the token with Vercel before storing it. It becomes a secret named VERCEL, bound to api.vercel.com.
Vercel in your code. For one of your users, or for your own account.
Act for one of your users from your server, or connect your company's own Vercel with the CLI.
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try { const { data } = await anlyon .forUser(session.userId) .actions.invoke("vercel-redeploy", { team_id: "team_a1b2c3d4e5f6g7h8i9j0k1l2", project_name: "acme-web", deployment_id: "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ" }); return { status: "done", grade: data.grade };} catch (error) { if (error instanceof EndUserNotConnectedError) { // The user connects their own Vercel, then you call again. return { status: "connect_required", url: error.connectUrl }; } throw error;}Other integrations. Under the same limits, approvals and receipts.
Available
Stripe
Payments · API key
Refunds under a money ceiling, and every customer, payment and invoice to read.
Available
GitHub
Code · API key
Issues, pull requests and code, in the repositories you choose.
Available
HubSpot
CRM · Sign in
Contacts, companies and deals: search them and change them.
- Anlyon app
- Available
- Your own app
- Recommended for production
