An Eve-native Slack analyst for a single Postgres database. It answers Slack mentions and DMs, inspects schema metadata, and runs bounded read-only SQL through authored tools.
Postgres Data Analyst is an eve agent that lives in your Slack workspace and answers questions about a single Postgres database. Mention it in a channel or send it a DM, ask something like show total signups by month for the last 6 months, and it inspects the schema, writes one read-only SQL query, runs it, and replies with an interpreted answer rather than a raw row dump.
Safety is layered rather than assumed. Every query is parsed into an AST with pgsql-ast-parser and rejected unless it is a single SELECT or WITH statement over allowed schemas; INSERT, UPDATE, DELETE, DDL, SET, and transaction control are all blocked before anything reaches the database. Execution then happens inside a READ ONLY transaction with a statement timeout and a hard row cap, and the docs walk you through creating a dedicated read-only Postgres role as the real enforcement boundary.
It works with any Postgres you can reach with a connection string, including Neon branches and Supabase, and connects to Slack through Vercel Connect so you never handle bot tokens or signing secrets yourself. Schema allowlists and a blocked-tables list let you keep sensitive tables out of both query results and schema listings.
Let product managers and founders ask signups by month, active users last week, or revenue by plan directly in a channel, without writing SQL or waiting on a data team, while the agent explains the query assumptions it made.
Point the agent at a reporting schema and let anyone ask what schemas and tables can you see. describe_schema exposes only allowed schemas and hides blocked tables, so exploration stays inside boundaries you define.
Connect a Neon reporting branch or a dedicated read-only Supabase role and get conversational analytics without granting the service role. The AST validator plus the read-only role means no write path exists.
Debug a spike or verify a customer claim with bounded queries: a 10 second default statement timeout and a 200 row default cap keep exploratory SQL from hammering production, and the agent labels truncated results.
Run npx shadcn@latest add @evex/postgres-data-analyst inside an existing eve app, install the listed dependencies (eve, pg, pgsql-ast-parser, zod, @vercel/connect), fill in the DATA_ANALYST_* environment variables, deploy, then connect Slack with vercel connect create slack --triggers.
No. Every query is parsed into an AST and rejected unless it is a single SELECT or WITH statement; INSERT, UPDATE, DELETE, TRUNCATE, DDL, and SET are blocked. Execution runs in a READ ONLY transaction, and the recommended setup uses a Postgres role with SELECT-only grants. A dedicated eval verifies the agent refuses mutation requests.
The agent ships with zai/glm-5.2 configured in agent/agent.ts. The files install into your codebase, so edit that one line to switch to any model the eve framework supports.
Restrict DATA_ANALYST_ALLOWED_SCHEMAS to reporting schemas, list sensitive tables in DATA_ANALYST_BLOCKED_TABLES, and grant the database role SELECT only on safe tables. Blocked tables are hidden from schema listings and rejected in queries, but remember anything the role can read could surface in a channel.
One statement per request, SELECT or WITH only, at most 1000 rows (200 by default), a statement timeout capped at 60 seconds (10 by default), and a connection pool of 3. run_sql blocks unqualified pg_catalog tables and labels truncated results.
npx shadcn@latest add @evex/postgres-data-analyst