Build and deploy an AI agent with eve
Build an AI agent with Vercel's eve framework that posts a news digest to Slack each weekday morning, then deploy it, in 30 minutes.

What you need
Step 1: Create the project
3 minOne command builds the folders, installs what the agent needs and opens a chat with it.
- In a terminal, run the command below. Swap
my-agentfor your project's name. - If eve asks you to connect a model, pick one in the
/loginmenu: a ChatGPT subscription, your Vercel account or an API key. - Type a short hello in the chat to check that the agent answers.
Run thisnpx eve@latest init my-agent
You should see a new
my-agentfolder with anagent/folder inside, and a chat open in your terminal.The command fails on your Node.js version?
eve needs Node.js 24 or newer. Run
node -vto check, install a newer release, then run the command again.To get back to this chat later, run
npx eve devin the project folder. It reloads as you edit files.- In a terminal, run the command below. Swap
Step 2: Give the agent its job
4 minThe instructions file is the agent's standing brief, and eve sends it with every model call.
- Open
agent/instructions.mdand replace its text with the brief below. Fill in your team and topic. - To pick a model, type
/modelin the chat and choose one, such asanthropic/claude-opus-5.5.
Your instructionsYou are the news scout for [YOUR TEAM]. Each time you run, get the top Hacker News stories with the get_top_stories tool. Pick the 5 stories that matter most to people who work on [YOUR TOPIC]. For each one, write one plain sentence on why it matters, then its link. If nothing fits, say so in one line. Never make up a story or a link.
You should see the agent describing its new role when you ask what it does.
The agent still acts as before?
Check the file is saved as
agent/instructions.md. Then type/newin the chat to start a fresh session and ask again.With no
agent/agent.tsfile, eve usesopenai/gpt-6-luna-fast. A model ID likeanthropic/claude-opus-5.5runs through AI Gateway.- Open
Step 3: Add a tool
7 minA tool is a TypeScript function the agent can call, and its file name becomes the tool's name.
- Create the file
agent/tools/get_top_stories.tsand paste in the code below. - Save it. eve picks up the new tool on its own.
- In the chat, ask: What are the top stories right now?
Your toolimport { defineTool } from "eve/tools"; import { z } from "zod"; const HN = "https://hacker-news.firebaseio.com/v0"; export default defineTool({ description: "Get the current top Hacker News stories, with title, link and score.", inputSchema: z.object({ limit: z.number().int().min(1).max(30).default(20) }), async execute({ limit }) { const ids: number[] = await fetch(`${HN}/topstories.json`).then((r) => r.json()); const stories = await Promise.all( ids.slice(0, limit).map((id) => fetch(`${HN}/item/${id}.json`).then((r) => r.json())), ); return stories.map((s) => ({ title: s.title, url: s.url ?? `https://news.ycombinator.com/item?id=${s.id}`, score: s.score, })); }, });You should see a call to
get_top_storiesin the chat, then a short list of real headlines with links.The agent answers without calling the tool?
Name the tool in your instructions, as the brief in step 2 does. Make sure its
descriptionsays exactly what it returns.Tools run without asking by default. For a tool that sends, deletes or buys something, add
approval: always()fromeve/tools/approval, so a person approves each call.- Create the file
Step 4: Connect Slack
6 minA channel is where people reach the agent and where its replies land.
- In the chat, type
/add channel/slack. - Follow the setup. It signs you in to Vercel, links a project and creates a Slack app.
- Install the app in your workspace when Slack asks. Then invite it to the channel where it should post.
You should see a new file,
agent/channels/slack.ts, in your project.Setup stopped halfway?
Run
npx eve add channel/slackin the project folder. It runs only the steps that are still missing.With this setup, Vercel keeps the Slack bot token for you. Never paste tokens into files you commit.
- In the chat, type
Step 5: Schedule a morning post
5 minA schedule wakes the agent on a timer, with no one asking, and sends its reply to Slack.
- In Slack, open the channel's details and copy its channel ID. It looks like
C0123ABC. - Create
agent/schedules/morning-news.ts, paste the code below and put in your channel ID. - Run
npx eve infoto check that eve found the schedule.
Your scheduleimport { defineSchedule } from "eve/schedules"; import slack from "../channels/slack"; export default defineSchedule({ cron: "0 9 * * 1-5", async run({ to, waitUntil, appAuth }) { waitUntil( to(slack, { channelId: "[YOUR CHANNEL ID]" }).send( "Post this morning's top 5 stories for the team.", { auth: appAuth }, ), ); }, });You should see
morning-newslisted among the agent's files, with no errors.Nothing ever posts in the channel?
eve devnever runs schedules on their timer, so they start firing once you deploy. Also check that the Slack app is a member of the channel.0 9 * * 1-5means 9:00 on weekdays. On Vercel, schedules run on UTC time, so shift the hour to match yours.- In Slack, open the channel's details and copy its channel ID. It looks like
Step 6: Deploy and watch it run
5 minDeploying puts the agent, its schedule and its Slack channel on Vercel, so it runs while your laptop is off.
- In the chat, type
/deploy. Or runnpx eve deployin the project folder. - Open the project on Vercel and check that Settings > Cron Jobs lists your schedule.
- Mention the agent in Slack to test it. Then find the session under Observability > Agent Runs.
You should see your schedule under Settings > Cron Jobs, and a reply in a Slack thread when you mention the agent.
There's no Agent Runs tab?
Agent Runs is in beta and has to be on for your Vercel team. Until then, read each run's logs under Observability > Logs.
Keep API keys in the Vercel project's environment settings, never in files you commit.
- In the chat, type
You get
An AI agent on Vercel that reads the news each weekday morning, posts a short digest to Slack and answers when someone mentions it
Try next
Did this guide work for you?
Thanks. It helps us fix the steps.
Sources
0 of 6Next: Create the project


