Example: a stale issue triager with eve
Build a stale issue triager with eve
A maintainer agent that runs on a schedule, finds issues with no activity in 30 days, posts a comment asking the author for an update, and closes the ones that get no response. Built on the eve extension with the issue-triage preset and a Vercel Connect connector for the token.
Files
You are a maintenance agent for this repository. Your only job is triaging stale issues.
When asked to sweep for stale issues:
- Use listIssues to find open issues with no activity in the last 30 days
- Post one comment per stale issue asking the author to confirm it's still relevant
- If an issue already has a "stale" label and still has no response, close it with a short, polite explanation
- Never close an issue that has had any comment or label change in the last 30 days
- Report a short summary of what you did at the end
import { defineAgent } from 'eve'
export default defineAgent({
model: 'anthropic/claude-sonnet-5',
})
import githubExtension from '@github-tools/eve-extension'
export default githubExtension({
connector: 'github/my-connector',
preset: 'issue-triage',
requireApproval: {
addIssueComment: false, // low-risk, let the agent nudge authors unattended
closeIssue: true, // always ask before actually closing something
},
})
# Vercel Connect OIDC token, required by the "github/my-connector" connector.
# From this directory: vercel link && vercel env pull
VERCEL_OIDC_TOKEN=
Install
pnpm add @github-tools/eve-extension @vercel/connect eve
npm install @github-tools/eve-extension @vercel/connect eve
yarn add @github-tools/eve-extension @vercel/connect eve
bun add @github-tools/eve-extension @vercel/connect eve
eve is a required peer (itself requiring ai v7). See Install optional workflow dependencies for the full peer chart.
Set up the connector
Create a GitHub connector
Create a connector named github/my-connector from the Vercel dashboard, then install it on the org or repos this agent should triage. Full checklist: Vercel Connect.
Pull a local OIDC token
vercel link
vercel env pull
This writes VERCEL_OIDC_TOKEN into .env. Re-run vercel env pull when it expires.
Run it
npx eve dev
Ask it to "sweep for stale issues on my-org/my-repo". It reads the issue list, comments on anything inactive, and asks for approval before closing.
connector for token: process.env.GITHUB_TOKEN if you'd rather manage a PAT directly, see Tokens & Auth for the required scopes for issue-triage.Schedule it
To run this sweep automatically instead of on demand, add an eve schedule that triggers the same prompt on a cron. See the bundled node_modules/eve/docs/schedules.mdx for the schedule file format.
Next steps
- Widen the preset to
maintainerif the agent should also label and re-triage new issues, see Scope with Presets - Add a
createIssuestep to file a weekly stale-issue digest, gated the same way ascloseIssue - See the manager agent example to pair this triager with a code-review specialist behind one entry point
Overview
Complete, copy-pasteable GitHub agents for every framework, eve, the AI SDK, Vercel Workflow, and Chat SDK, plus a manager agent that delegates to scoped sub-agents.
Release notes generator
A standalone AI SDK script that drafts release notes from merged pull requests since the last tag, using the release-manager preset and Vercel Connect.