Repository navigation
docs: add self-improving agent guide - #264
Merged
Merged
Conversation
Add a guide that connects the examples/eve agent to the Vercel MCP so it reads its own Agent Runs, with a weekly review schedule, a daily failure check, and a self-review skill. Add the page to the sidebar and the guides index, with a refresh-2 Nucleo icon.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
Rework the guide so the weekly review opens draft pull requests on the agent's own repository through an editFiles approval override limited to scheduled turns, the agent's repository and agent/ branches. Add a figure that shows the weekly runs getting faster with each merged pull request. Correct facts against the sources: the connector needs --connection-method mcp, Agent Runs needs a trace sampling rule, Slack thread replies need a mention, and Evi lives in evloghq/evlog.
vercel
Bot
temporarily deployed
to
Preview – github-tools-test-agent
November 12, 2026 16:57
Inactive
Present draft pull requests as the default and add four levels, from a report to an agent that merges its own changes, with the auto-merge and merge approval overrides and what each level trades.
vercel
Bot
temporarily deployed
to
Preview – github-tools-test-agent
November 16, 2026 08:57
Inactive
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Description
Adds a guide, Self-improving agent (
/guides/self-improving-agent). It extends theexamples/eveagent so that once a week the agent reads its own production runs and opens pull requests on its own repository to fix what slowed it down. A person reviews and merges each one, and the agent can't merge.The guide adds four files to the agent and changes one:
Two pieces decide what the agent may do without a person:
list_agent_runs,get_agent_run,get_agent_run_trace,get_runtime_errors,get_runtime_logs). It fills inteamIdandprojectIditself, and hands out a token only to schedule sessions (isScheduleAuth) and the principals inMAINTAINERS.requireApproval: 'auto'and adds one override.editFilesruns without approval only when the turn is the schedule, the target isAGENT_REPOSITORY, and the branch starts withagent/. Every other write keeps asking,mergePullRequestincluded.guardrailsdoesn't fit here. It applies to every call, so limiting repositories would stop the agent from working anywhere else, and limiting branches toagent/*would also block merges intomain.The figure at the top (
SelfImprovingLoop.vue) shows four example weeks. Each week the agent opens a pull request on its own, a person merges it, and the next week's average run time drops. In week 4 nothing repeats, so it opens nothing. Every pull request in the figure names a real tool:getCiFailureContext,getPullRequestContext,searchIssues.The page is also added to the guides index and to the sidebar list in
app/utils/docs-sidebar.ts, with a newrefresh-2Nucleo icon.Evidence
Fact check
Every claim was checked against its source, and these corrections came out of it:
vercel connect create vercelasks whether to connect the REST API or the MCP. The guide passes--connection-method mcp, fromvercel connect create vercel --helpon CLI 65.14.0.eve deployadds one for projects it creates, but a project from the Deploy button needs one added under Settings → Tracing. Sources: vercel.com/docs/agent-runs and eve'sguides/instrumentation/agent-runs.mdx.channels/slack/index.mdx). Replies go to the deployed agent, not toeve dev, so the guide says to deploy before answering.latercursor.slack:<team>:<user>comes from eve's Slack reference.requireApproval: 'auto'evaluates onlyAUTO_APPROVAL_TOOLS, soeditFilesandmergePullRequestalways ask without the override. A predicate returning'not-applicable'or'user-approval'is passed to eve as the approval policy (mapEveApprovalValue). Tools thatpreset: 'auto'didn't route stay reachable asdeferred.pr-authorrow on/auth.evloghq/evlog.HugoRCD/evlogonly worked through a redirect.Checks
examples/eveand type-checked against the released@github-tools/eve-extension@0.13.0,eve@1.0.0-rc.6and@vercel/connect@2.7.0.tscexited 0. This caught two bugs:providedArgumentscallbacks must return a JSON value, andtoolInputcan beundefinedin an approval policy. The scratch files were removed afterwards.pnpm lintinapps/docspasses. The docs app has no type check.#anchorexists on its page.No changeset: this change touches only
apps/docs.📝 Checklist
ELI5
Every Monday, the agent reads its own activity log and finds what made it slow, without anyone asking. It writes a small fix to its own instructions and opens a pull request for it. A person reads the fix and decides whether to accept it, so each week the agent gets a little faster.