eve / eve-data-analyst-template
AGENTS.md5.9k starsChanged 2 days agoApache-2.0View on GitHub
This repository is a reusable Slack-based data analyst built on eve. It answers questions by exploring a Postgres database, applying the team's metric definitions, and running read-only SQL as the asking person's database role. Use Node.js 24 and pnpm. These instructions are for agents maintaining the repository. The analyst's behavior is defined in agent/instructions.md, the skills under agent/skills/, and the dynamic instructions under agent/instructions/. Keep the template focused on answering questions from Postgres. Optional integrations, such as Stripe or PostHog…
- Reads credentials
Trending
More talk lately.about the whole repository
Who's talking about vercel/eve
- @qdrddr.bsky.social“@vercel.com Eve #Agentic #framework uses #filesystem as interface for tools, just drop a #TypeScript code …”Bluesky · Oct 16, 2026 · 8 likes
- @projectnothing.bsky.social“When frameworks like eve break out, it’s a sign: AI agents are no longer side projects—they’re becoming a …”Bluesky · Jun 17, 2026 · 3 likes
- @github-trending-js.bsky.social“📦 vercel / eve ⭐ 5,184 (+40) 🗒 TypeScript The Open Framework for Building Agents”Bluesky · Sep 17, 2026 · 2 likes
- DataDog/dd-trace-js“feat(llmobs): add external experiment recorder”GitHub · Jul 31, 2026 · 2 reactions
- ComposioHQ/composio“chore(deps-dev): bump the npm-development group across 1 directory with 9 updates”GitHub · Nov 6, 2026 · 1 reactions
The biggest 5 of 56 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 56
Talked about on GitHub and Bluesky (56 times).
On GitHub · 49
- Jul 31, 2026feat(llmobs): add external experiment recorder — DataDog/dd-trace-js2 reactions · 5 comments
- Nov 6, 2026chore(deps-dev): bump the npm-development group across 1 directory with 9 updates — ComposioHQ/composio1 reaction · 5 comments
- Nov 3, 2026chore(deps-dev): bump the npm-development group across 1 directory with 8 updates — ComposioHQ/composio1 reaction · 6 comments
- Oct 30, 2026Bump the production-dependencies group across 1 directory with 11 updates — byronwade/rebuzzle.byronwade.com1 reaction · 6 comments
- Oct 30, 2026chore(deps-dev): bump the npm-development group with 7 updates — ComposioHQ/composio1 reaction · 6 comments
44 more on GitHub
- Oct 16, 2026chore(deps-dev): bump the npm-development group across 1 directory with 8 updates — ComposioHQ/composio1 reaction · 6 comments
- Oct 16, 2026chore(deps-dev): bump the npm-development group with 4 updates — ComposioHQ/composio1 reaction · 6 comments
- Oct 13, 2026chore(deps-dev): bump the npm-development group with 3 updates — ComposioHQ/composio1 reaction · 5 comments
- Oct 9, 2026chore(deps-dev): bump the npm-development group across 1 directory with 7 updates — ComposioHQ/composio1 reaction · 6 comments
- Sep 25, 2026chore(deps-dev): bump the npm-development group with 8 updates — ComposioHQ/composio1 reaction · 4 comments
- Sep 14, 2026chore(deps): bump the production-dependencies group across 1 directory with 13 updates — byronwade/rebuzzle.byronwade.com1 reaction · 5 comments
- Sep 11, 2026chore(deps-dev): bump the npm-development group with 5 updates — ComposioHQ/composio1 reaction · 4 comments
- Sep 7, 2026chore(deps): bump the production-dependencies group across 1 directory with 12 updates — byronwade/rebuzzle.byronwade.com1 reaction · 4 comments
- Sep 1, 2026@nuxt/kit missing @nuxt/schema dependency breaks TypeScript with pnpm 12 GVS — nuxt/nuxt1 reaction
- Aug 31, 2026chore(deps): bump the production-dependencies group with 11 updates — byronwade/rebuzzle.byronwade.com1 reaction · 4 comments
- Aug 13, 2026基于 vercel/eve 实现 agents demo 切片 — SawanaLabs/agent-demos1 reaction · 3 comments
- Jul 28, 2026fix(nitro): vercel function rules - preserve relative symlinks — nitrojs/nitro1 reaction · 4 comments
- Jul 3, 2026Add Eve adapter (eve_gateway + eve_local) — paperclipai/paperclip1 reaction · 6 comments
- Jun 30, 2026Install eve skill from vercel/eve — TommyBez/evex1 reaction · 2 comments
- Jun 19, 2026[codex] Read downloads from the sandbox stream — remiconnesson/eve-single-user-agent-starter1 reaction · 1 comment
- Nov 3, 2026[ARCHITECTURE ASSESSMENT] Eve.dev adoption — no control-plane replacement; bounded comparative pilot — mastermindx-market-intelligence/Mastermind0 reactions
- Nov 2, 2026Broken links report — Li-Evan/awesome-jev0 reactions
- Oct 27, 2026Telegram HITL: при нажатии кнопки подтверждения теряется нажавший (auth: null) — в вендоренном eve 0.51.1 нет фикса vercel/eve#4241 — smixs/iva-agent0 reactions · 1 comment
- Oct 26, 2026Broken links report — Li-Evan/awesome-jev0 reactions
- Oct 19, 2026Broken links report — Li-Evan/awesome-jev0 reactions
- Oct 18, 2026T2: Preserve authenticated attachments when continuing copied history — FranciscoMoretti/chat-js0 reactions
- Oct 18, 2026T1/T2: Adopt upstream structured history imports with completed tools and attachments — FranciscoMoretti/chat-js0 reactions
- Oct 17, 2026Research: Eve project primer — setup, models via AI Gateway, approvals, subagents, Next.js mount, deploy — rymanacevedo/business-wiki-agent0 reactions · 2 comments
- Oct 12, 2026Broken links report — Li-Evan/awesome-jev0 reactions
- Oct 11, 2026`vercel dev` stalls silently (no port, no error) when the Next.js dev-manifest config loader exits non-zero — vercel/vercel0 reactions
- Oct 6, 2026Research: custom SPARQL-generation model + separate review layer (prior art: eve + Qwen + Jev data analyst) — wazootech/wazoo-memorybench0 reactions
- Oct 3, 2026[Add] eve (vercel/eve) — PyTorchKR/landscape0 reactions
- Sep 30, 2026Research report - numbered build order, hackathon checklist, runtime pick — VasuBansal7576/return-intelligence-voice0 reactions
- Sep 19, 2026未対応のカードの効果の翻訳を、会話の中で Pull Request として足せるようにする — mokosystem/pokemon-tcg-buddy0 reactions
- Sep 1, 2026sep 2026 — kimtth/azure-openai-llm-notes0 reactions
- Aug 12, 2026Ship an eve and AI SDK memory integration guide — Studio-Moser/Advisaur-MCP0 reactions
- Aug 12, 2026Evaluate eve as a seventh distribution channel — tartinerlabs/skills0 reactions · 2 comments
- Aug 10, 2026epic(ai): the agent harness -- vision, prior art, and the plan to stand behind "or the agent harness itself" — routecraftjs/routecraft0 reactions · 4 comments
- Jul 14, 2026Epic: publish TypeScript SDK and durable Eve approval channel — asiraky/mayi0 reactions · 2 comments
- Jul 13, 2026@ai-sdk/openai: support ordered additional_tools after a normal tool result — vercel/ai0 reactions · 4 comments
- Jul 4, 2026feat(eve): import Agent Runs and OpenTelemetry evidence into fak session ledgers — anthony-chaudhary/fak0 reactions
- Jul 4, 2026test(eve): run eve evals as fak parity and regression witnesses — anthony-chaudhary/fak0 reactions · 7 comments
- Jul 4, 2026feat(eve): lease-gate shared-sandbox subagent fan-out from child session streams — anthony-chaudhary/fak0 reactions · 1 comment
- Jul 4, 2026feat(eve): preflight MCP/OpenAPI connections for scoped auth, allowlists, and approval gates — anthony-chaudhary/fak0 reactions · 1 comment
- Jul 4, 2026feat(eve): compile agent/ directories into fak policy and mount manifests — anthony-chaudhary/fak0 reactions · 1 comment
- Jul 4, 2026epic(eve): Vercel eve integration bridge - filesystem agents, policy lint, evals, and observability — anthony-chaudhary/fak0 reactions
- Jun 23, 2026@vercel/connect/eve: support context-aware Slack installation selection — vercel/vercel0 reactions
- Jun 19, 2026Remove sandbox stream compatibility fix after Eve #117 is released — remiconnesson/eve-single-user-agent-starter0 reactions
- Jun 19, 2026Add Vercel Eve sandbox backend adapter support — sandbox0-ai/sandbox00 reactions
On Bluesky · 7
- Oct 16, 2026@vercel.com Eve #Agentic #framework uses #filesystem as interface for tools, just drop a #TypeScript code into a folder, the filename… — @qdrddr.bsky.social8 likes and reposts · 1 reply
- Jun 17, 2026When frameworks like eve break out, it’s a sign: AI agents are no longer side projects—they’re becoming a new pillar of mainstream software… — @projectnothing.bsky.social3 likes and reposts
- Sep 17, 2026📦 vercel / eve ⭐ 5,184 (+40) 🗒 TypeScript The Open Framework for Building Agents — @github-trending-js.bsky.social2 likes and reposts
- Sep 20, 2026github.com/vercel/eve GitHub - vercel/eve: The Open Framework for Building Agents — @technews4869.bsky.social1 likes and repost
- Aug 11, 2026Cloudflare OS blog: blog.cloudflare.com/cloudflare-os/, github.com/cloudflare/cloudflare-os Vercel eve: vercel.com/blog/introducing-eve ·… — @akash-bhatia.bsky.social1 likes and repost
2 more on Bluesky
- Jul 2, 2026Vercel's eve is a filesystem-first framework for durable AI agents: an agent is a directory of instructions, tools, skills, channels, and… — @agentpalisade.bsky.social1 likes and repost
- Jun 17, 2026The Framework for Building Agents https://github.com/vercel/eve — @laxima-tech.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository115 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apps/docs/AGENTS.mdAGENTS.md
- apps/templates/eve-agent-python-template/AGENTS.mdAGENTS.md
- apps/templates/eve-agent-python-template/apps/web/AGENTS.mdAGENTS.md
- apps/templates/eve-chat-template/AGENTS.mdAGENTS.md
- apps/templates/eve-coding-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-content-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-contentful-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-discord-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-llm-council-template/AGENTS.mdAGENTS.md
- apps/templates/eve-mem0-template/AGENTS.mdAGENTS.md
- apps/templates/eve-memory-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-slack-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-software-factory-template/AGENTS.mdAGENTS.md
- apps/templates/eve-sre-agent-template/AGENTS.mdAGENTS.md
- apps/templates/eve-tanstack-start-template/AGENTS.mdAGENTS.md
- apps/templates/eve-vercel-drives-starter/AGENTS.mdAGENTS.md
- apps/templates/eve-voice-template/AGENTS.mdAGENTS.md
- apps/templates/kody-eve-template/AGENTS.mdAGENTS.md
- apps/templates/marketing-team-eve-template/AGENTS.mdAGENTS.md
- apps/templates/openinstinct/AGENTS.mdAGENTS.md
- apps/templates/personal-agent-template/AGENTS.mdAGENTS.md
- apps/templates/sanity-copilot-eve-template/AGENTS.mdAGENTS.md
- apps/templates/slack-company-brain-template/AGENTS.mdAGENTS.md
- packages/eve-agent-desktop/AGENTS.mdAGENTS.md
- packages/eve-code/AGENTS.mdAGENTS.md
- packages/eve-computer-use/AGENTS.mdAGENTS.md
- packages/eve-custom-skills/AGENTS.mdAGENTS.md
- packages/eve-git/AGENTS.mdAGENTS.md
- packages/eve/src/internal/nitro/AGENTS.mdAGENTS.md
- apps/templates/eve-agent-python-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-chat-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-coding-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-content-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-contentful-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-data-analyst-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-discord-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-llm-council-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-mem0-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-memory-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-slack-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-software-factory-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-sre-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-tanstack-start-template/CLAUDE.mdCLAUDE.md
- apps/templates/eve-vercel-drives-starter/CLAUDE.mdCLAUDE.md
- apps/templates/eve-voice-template/CLAUDE.mdCLAUDE.md
- apps/templates/kody-eve-template/CLAUDE.mdCLAUDE.md
- apps/templates/marketing-team-eve-template/CLAUDE.mdCLAUDE.md
- apps/templates/openinstinct/CLAUDE.mdCLAUDE.md
- apps/templates/personal-agent-template/CLAUDE.mdCLAUDE.md
- apps/templates/sanity-copilot-eve-template/CLAUDE.mdCLAUDE.md
- apps/templates/slack-company-brain-template/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- gh-pr-descriptionSkill
- pr-shepherdSkill
- technical-writingSkill
- test-auditSkill
- create-payment-credentialSkill
- dashboard-chat-best-practicesSkill
- eve-chat-template-eveSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 0 are common, 6 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Keep the template focused on answering questions from Postgres.
- Distinctive: line 38
Keep discovery focused: read the routed documentation and the files the change needs, then implement.
- Very specific: line 49
Prefer native integrations.
- Very specific: line 53
Keep files in agent/tools/ to one-line re-exports, with behavior in agent/lib/.
- Very specific: line 59
Keep the strict TypeScript and Ultracite configuration, and change the code to satisfy its rules.
- Very specific: line 61
Add useful TSDoc when introducing or changing exported helpers, tools, channels, scopes, or configuration types.
- Very specific: line 63
Document new configuration in .env.example and CUSTOMIZATION.md without credentials, and add it to the Zod schema in …
- Very specific: line 95
Keep code, messages, and test fixtures provider-neutral, with generic wording and example.com hosts.
- Very specific: line 110
Use the Vercel CLI for project configuration and deployment instructions, including vercel deploy --prod and vercel env add.
- Very specific: line 114
Keep README.md short, with the deployment flow, the technology and customization tables, and brief summaries that link to CUSTOMIZATION.md …
- Distinctive: line 116
Write for a person using the template:
- Distinctive: line 121
Keep sentences short, with one idea each, and keep introductions to the essentials.
- Distinctive: line 123
Keep code comments, messages, and docs provider-neutral, and describe databases as Postgres.
- Distinctive: line 126
Keep commands usable in context.
- Distinctive: line 128
Verify behavior against code and current CLI help, and reread each section as a whole for contradictions and repetition.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
eve Data Analyst
This repository is a reusable Slack-based data analyst built on eve. It answers questions by exploring a Postgres database, applying the team's metric definitions, and running read-only SQL as the asking person's database role. Use Node.js 24 and pnpm.
These instructions are for agents maintaining the repository. The analyst's behavior is defined in agent/instructions.md, the skills under agent/skills/, and the dynamic instructions under agent/instructions/.
Project map
| Change | Location |
| Analyst behavior, answer format, visualization rules, memory rules, and response style | agent/instructions.md |
| Metric definitions and SQL conventions | agent/skills/metric-definitions.md and agent/skills/sql-style.md |
| Current time and reporting time zone context | agent/instructions/current-time.ts |
| Model and session limits | agent/agent.ts |
| Warehouse tools | agent/tools/run_sql.ts and agent/tools/describe_schema.ts, implemented in agent/lib/tools/ |
| Configuration, role resolution, SQL safety, and Postgres access | agent/lib/analyst/ |
| Cost-based approval and its Slack card | agent/lib/analyst/approval.ts and agent/lib/analyst/approval-card.ts |
| Thread role guard, which keeps query results with the role that fetched them | agent/hooks/thread-role-guard.ts, implemented in agent/lib/analyst/thread-role-guard.ts and agent/lib/analyst/thread-roles.ts, with the Slack notice in agent/lib/integrations/slack/replies.ts |
| Slack charts and tables | agent/tools/post_slack_*.ts, implemented in agent/lib/tools/ and agent/lib/integrations/slack/visualizations/ |
| Folded "SQL query" section on Slack answers | agent/lib/analyst/query-log.ts and agent/lib/analyst/sql-attachment.ts, attached by agent/lib/integrations/slack/replies.ts and visualizations/post.ts |
| Memory slots and scopes | agent/memory/ and agent/lib/memory/scope.ts |
| Slack channel, sender auth, profile lookups, and input requests | agent/channels/slack.ts and agent/lib/integrations/slack/ |
| HTTP channel and caller auth | agent/channels/eve.ts |
| Built-in tool overrides | agent/tools/web_fetch.ts and agent/tools/web_search.ts |
| Local and hosted sandbox selection | agent/sandbox.ts |
Deploy-time database setup (vercel-build and pnpm db:setup) | scripts/setup-on-deploy.ts and scripts/setup-on-deploy/plan.ts |
| Demo data, manual role setup, and health checks | scripts/seed.ts, scripts/seed/, scripts/setup-sql.ts, and scripts/doctor.ts |
| Model-in-the-loop evals | evals/ |
| Shared test fixtures | agent/lib/testing/ |
| Setup and customization guidance | README.md, CUSTOMIZATION.md, and .env.example |
Keep the template focused on answering questions from Postgres. Optional integrations, such as Stripe or PostHog connections, are documented in CUSTOMIZATION.md and not installed by default.
Before implementing changes
Inspect the relevant implementation and nearby tests. For eve API changes, start with the installed documentation index, then read the page it identifies for the task. Use eve's published documentation if the installed docs are unavailable. Verify third-party APIs, including pg, against the installed package or current official documentation rather than relying on recalled signatures.
Keep discovery focused: read the routed documentation and the files the change needs, then implement.
Content-only changes to the instructions or skills need no framework research. Preserve the configured model unless changing it is part of the request.
For a new external integration, check the eve registry before writing one from scratch:
pnpm exec eve registry search <query> --json
pnpm exec eve registry view <item>Prefer native integrations. When installation is part of the task, use pnpm exec eve add <item> --non-interactive. Exit code 2 means setup needs an answer or a prerequisite, so read the final NDJSON event and follow its next command. Pass secrets as environment variables, keeping --answer for non-secret values.
Implementation conventions
Keep files in agent/tools/ to one-line re-exports, with behavior in agent/lib/. The filename exemption for agent/tools/*.ts in lint.config.ts exists because eve names tools after their files.
Modules the setup scripts import run under Node's built-in type stripping, so they and everything they import must use #lib/... or #scripts/... imports and erasable TypeScript syntax only. This covers agent/lib/analyst/ (except approval*.ts and thread-role*.ts), agent/lib/json.ts, agent/lib/slack-ids.ts, agent/lib/slack-text.ts, agent/lib/values.ts, and scripts/. Eval files follow eve's docs and use .js specifiers for relative imports.
Parse database rows at the boundary with Zod before using them, as agent/lib/analyst/postgres.ts does, and test Postgres behavior through the postgres.connect seam with the fake client in agent/lib/testing/postgres.ts.
Keep the strict TypeScript and Ultracite configuration, and change the code to satisfy its rules. The only override beyond the tool filenames allows sequential awaits in scripts/, where statements must run in order.
Add useful TSDoc when introducing or changing exported helpers, tools, channels, scopes, or configuration types. Document parameters with @param name - description, type parameters with @typeParam, and meaningful return values with @returns. Use @remarks for behavior callers need to know.
Document new configuration in .env.example and CUSTOMIZATION.md without credentials, and add it to the Zod schema in agent/lib/analyst/config.ts so every problem is reported at once.
SQL safety to preserve
Each layer below works on its own, so keep every one of them complete:
withReadOnlyopensBEGIN TRANSACTION READ ONLY, then setsstatement_timeout,ROLE,search_path, andTIME ZONEwithSET LOCAL, and always rolls back. It destroys the connection when the rollback fails. Connections are pooled, so every setting staysSET LOCAL.- Model-authored SQL only runs through
wrapQuery, asSELECT * FROM (<sql>) AS eve_q LIMIT n, withqueryMode: "extended". The wrapper rejects writes and data-modifying CTEs, and the extended protocol rejects stacked statements. normalizeSqlremoves only a final semicolon and the whitespace and comments after it. The plan check and the run both wrap the same normalized text, so every other layer still applies to exactly what runs.- The approval policy and
runReadOnlySqlboth plan the exact wrapped query withEXPLAIN (VERBOSE, FORMAT JSON)and refuse plans that callset_configor functions that run SQL text. Those are the*_to_xmlfamily,ts_stat,ts_rewrite,dblink, and the contrib functionscrosstab,connectby, andxpath_table. A psql check confirmed that, without this, a role could read another granted role's tables throughset_config('role', ...)plusquery_to_xml. The SQL text these functions run can be assembled at runtime, so only the function names can be matched. The same check refuses session-level advisory locks, which would outlive the rollback on a pooled connection,pg_sleep, and the functions that cancel or end other sessions. Keep both checks and extendFORBIDDEN_CALLinagent/lib/analyst/sql.tswhen Postgres or an installed extension adds similar functions. The list can't cover user-defined functions that run dynamic SQL, so separate logins per role, or revokingset_configfromPUBLIC, remain the complete fix. - Only validated values are interpolated into SQL: role names through
identifierSchema, schema names throughschemaNameSchema, integers from the config schema, and time zones throughisTimeZone. Everything else is a bind parameter.schemaNameSchemadiffers only by allowingpublic, which stays reserved as a role name.db:seedstill refusespublic, because it replaces the schema it loads. resolveAnalystRolereadsANALYST_ROLE_MAPwithObject.hasOwnon a null-prototype map. Keys are full principal IDs, bare Slack member IDs, or Slack channel IDs, taken only from the verified Slack webhook attributes of a Slack user principal. Precedence is a personal denial under either the full principal ID or the bare Slack user ID, then the current channel's role, then the personal role, where the full principal ID wins over the bare ID, then the default. Principal IDs shaped like bare Slack user or channel IDs are never looked up directly. Service, runtime, and anonymous callers get access only through an entry for their own principal ID, and channel roles apply to people only. Updateaccess.test.tswith any change.- The thread role guard records the caller's role in session state after every successful
run_sqlordescribe_schemaresult. Itsturn.startedhook cancels a turn whose caller resolves to a different role or to no access. The Slackturn.settledrenderer for cancelled turns inreplies.tsruns the same check and posts the "start a new thread" notice. It can't rely on a marker from the hook, because state a hook writes just beforectx.cancel()isn't kept. Roles are recorded by tool name throughROLE_SCOPED_TOOLSinthread-roles.ts, so renaming either tool file without updating that list silently turns the guard off.local-devand callers who share a role are never blocked. Updatethread-roles.test.tsandthread-role-guard.test.tswith any change. run_sqlkeepsapproval: { request: requestRunSqlApproval, response: respondToRunSqlApproval }as an inline object literal, because eve compiles theapprovalproperty from source and treats a bare identifier as a policy function. The request policy fails closed with a denial carrying the Postgres error. Errors thatisWarehouseUnavailablerecognizes, such as a failed connection, a failedSET LOCAL ROLE, or a server shutdown, tell the model to stop and tell the person. Every other error tells it to fix the SQL. The response policy admits only the asking principal when it is a person orlocal-dev.- The agent always queries as the read-only login. It reads
DATABASE_URLonly to derive theeve_analystlogin's connection withderiveAnalystUrl, and only whenANALYST_DATABASE_URLis unset. KeepderivePassword,loginUrl, and the login name inagent/lib/analyst/derived-login.tsshared between the deploy step,scripts/setup-sql.ts, and the agent.derivePassworduses only the owner's password and refuses aDATABASE_URLwithout one.scripts/seed.tsrefuses to run againstANALYST_DATABASE_URL. Every tool stays read-only. web_fetchandweb_searchstay disabled, andagent/sandbox.tsblocks outbound network access when deployed, so query results stay in the conversation.
SQL attachment behavior to preserve
- The SQL shown in Slack comes from
recordQueryinrun_sql'sexecute, after the query succeeded, so the section always matches what ran. - The instructions tell the model that the section is attached for it, so its replies leave out SQL. Change the two together.
- The attachment keeps the reply's fallbacks:
replies.tsposts throughpostCompletedSlackReplywith the SQL repeated in the Markdown fallback, andvisualizations/post.tsadds it to the text fallback when it fits. That fallback comes fromsqlAttachmentMrkdwn, which usesescapeMrkdwnCodefromagent/lib/slack-text.tsto escape mrkdwn and break runs of three or more backticks with zero-width spaces so the SQL can't close its code block. After a block rejection,post.tsretries with the SQL as plain blocks fromsqlAttachmentPlainBlocks, skipping that step for size errors, then posts the visualization alone, then text only. Whenever the delivered message can't show the SQL, it posts the SQL as its own text message and ignores that message's failure, because the tool ends the turn and no final reply follows. A renderer that takes over the final reply owns its delivery, so let errors propagate to eve's delivery notice and post each reply once.
Deploy-time setup to preserve
vercel-buildrunsscripts/setup-on-deploy.tsbeforeeve build. It does nothing whenANALYST_DATABASE_URLis set, or whenDATABASE_URLis unset or has no password. Otherwise it loads demo data only whenANALYST_SEED_DEMO_DATAis on and the demo schema is missing or older than a week, and replaces only schemas the seed created.- A failed demo reload is logged, and the role setup still runs.
- It catches every error and exits successfully, so deploys always complete and the agent reports unfinished setup in Slack.
- Setup grants the base role
USAGE,SELECTon existing tables, and default privileges only inANALYST_SHARED_SCHEMAS, which defaults toANALYST_SCHEMASand must be a subset of it. It grants and revokes nothing in the otherANALYST_SCHEMASschemas, because team roles inherit the base role. Discovery inagent/lib/analyst/postgres.tsfilters onhas_schema_privilegeandhas_table_privilege, so each person sees only tables their role can query.resolveSchemaListsinagent/lib/analyst/schemas.tsresolves the two lists, including the demo schema, forparseAnalystConfig,planDeploySetup, andscripts/setup-sql.ts, so keep all three using it. Each caller validates the names itself. loadDemoDatabuilds the new data, grants, and planner statistics ineve_demo_staginginside one transaction. It then drops the seed's own tables by name and the live schema with the defaultRESTRICT, and renames the staging schema into place underlock_timeout, retrying from a savepoint. Postgres checks dependencies under the drop's locks, so anything added to the schema or depending on it during the load stops the swap.replacementBlockeronly refuses early with a clearer reason. Onlydb:seed --forcedrops withCASCADE. Live demo tables stay readable during the load. The marker table and schema comment move with the rename, soreplacementBlockerkeeps working. When a table leavesDEMO_TABLES, keep its name in the lists thatinspectDemoSchemaanddropDemoSchemaStatementsuse, or existing demo schemas refuse every reload until someone runsdb:seed --force.pnpm db:doctorjudges demo data freshness by_eve_demo_seed.anchor_atandDEMO_DATA_MAX_AGE_MSfromscripts/setup-on-deploy/plan.ts, the same rule the deploy uses to reload it.- The deploy step creates the pg
Clientinside thetry, withconnectionTimeoutMillisand anerrorlistener, because its constructor parsesDATABASE_URLand reads certificate files.scripts/setup-on-deploy.test.tsruns the script as a child process and checks that it exits successfully. - Keep code, messages, and test fixtures provider-neutral, with generic wording and
example.comhosts.
Metric and memory behavior to preserve
agent/skills/metric-definitions.mddefines the metrics. The instructions and both memory descriptions tell the agent to keep metric definitions and SQL in the skill, and to follow the skill when memory disagrees with it.scripts/seed/sql.tsmirrors the skill's MRR and traffic SQL for the seed summary and eval ground truth. Keep the three in sync.- Memory scopes come only from authenticated session details.
bySlackChannelaccepts only Slack webhook user principals with aslack:<team>issuer and a public or private channel ID, andbyHumanPrincipaldisables user memory for service principals. Returnnullwhen a caller doesn't qualify. - Renaming a memory slot file or changing a scope's tuple shape orphans existing memories. Keep the old namespace with
defaultNamespace({ ...ctx, slot: "<old-name>" })fromeve/memorywhen renaming.
Local and hosted behavior
pnpm dev opens eve's terminal chat as the local-dev principal, which gets ANALYST_DEFAULT_ROLE and can answer its own approval prompts. Local sessions use just-bash, skip Slack profile lookups, and keep memory while the server runs. Slack tables and charts post in Slack threads.
The hosted agent uses Vercel Sandbox and stores memory in a private Vercel Blob store. The Slack channel uses SLACK_CONNECTOR, falling back to slack/placeholder so compilation works before Slack is configured. Slack delivery still needs a real connector. Database settings are validated when a tool first runs, so builds succeed before the database is configured.
Use the Vercel CLI for project configuration and deployment instructions, including vercel deploy --prod and vercel env add. Provisioning services or deploying the agent is separate from checking code and documentation.
Documentation standards
Keep README.md short, with the deployment flow, the technology and customization tables, and brief summaries that link to CUSTOMIZATION.md for detailed steps.
Write for a person using the template:
- Name the kind of thing on first use, such as "the
ANALYST_SCHEMASenvironment variable" or "thepnpm db:setupscript", and say what it controls before showing it. State the default, and what happens when a value is unset. - Explain terms on first use, such as role, schema, and memory. Prefer everyday words, such as "database user" over "principal".
- Frame guidance positively. Say what to do and what happens, such as "Deploy with
vercel deploy --prod, which keeps your.env.localfile as it is." - Keep sentences short, with one idea each, and keep introductions to the essentials.
- Write the way a teammate would explain it. Leave out filler and stock phrases such as "seamless", "robust", "leverage", and "source of truth", along with em dashes, "not just X but Y", forced groups of three, parenthetical asides, bold lead-ins, colons joining two sentences, and sentences beginning with "A" or "An".
- Keep code comments, messages, and docs provider-neutral, and describe databases as Postgres.
- Say which memory a statement applies to, user memory or channel memory, when the difference matters.
- Lowercase Vercel environment names mid-sentence, such as "preview" and "production".
- Keep commands usable in context. Identify required input and explain how to recognize success.
Verify behavior against code and current CLI help, and reread each section as a whole for contradictions and repetition.
Validation
pnpm check and pnpm fix use lint.config.ts explicitly to keep its Ultracite rules separate from monorepo linting. .oxfmtrc.json contains the resolved Ultracite formatting preset so root tooling needs no template dependencies. Keep it in sync when upgrading Ultracite. Git hooks are opt-in: run pnpm exec lefthook install only from a standalone checkout, never from the eve monorepo.
Choose checks that establish the changed behavior. Tests live beside their implementations under agent/ and scripts/.
| Command | Purpose |
pnpm check | Formatting and lint rules |
pnpm fix | Apply formatting and lint fixes |
pnpm typecheck | TypeScript checks |
pnpm exec vitest run <test-file> | Tests for the changed behavior |
pnpm validate | Formatting, lint, types, all tests, and unused-code checks |
pnpm exec eve info | Agent diagnostics |
pnpm build | Production compilation |
pnpm db:setup and pnpm db:doctor | Deploy-time setup and database lockdown checks against a real Postgres |
pnpm eval | Model-in-the-loop evals against the seeded demo database |
For changes to agent/lib/analyst/, run its tests and, when the SQL itself changes, exercise it against a real Postgres with pnpm db:setup and pnpm db:doctor. Run pnpm build when changing tools, channels, memory slots, the sandbox, or other framework registration. Run pnpm eval after changing instructions or skills. State which checks ran and distinguish unit tests from behavior tested against a live database or model.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

