Live preview
EveOutput will stream here when you run the agent.
Summary
The Chat with Database Agent answers questions about your data in plain English. It introspects the schema, writes the SQL, runs it read-only, and explains the results. Reach for it to give non-SQL users a safe way to query a database, or to prototype analytics without hand-writing queries.
Install
$ pnpm dlx shadcn@latest add https://agentcn.vercel.app/r/eve/text-to-sql.json
Composition
agent/
├── agent.ts # Agent definition (model + config)
├── instructions.md # Introspect → SQL → execute instructions
├── lib/
│ └── db.ts # Database client (SQLite by default)
└── tools/
├── introspect_schema.ts # Lists tables and columns
└── run_query.ts # Runs a read-only SELECTCustomization
- Swap the database. Replace the client in
lib/db.tswith Postgres or MySQL. - Allow writes (carefully). The
run_querytool blocks non-SELECTSQL by default — relax that only behind explicit confirmation. - Add row limits. Cap result size in
run_queryto protect against huge scans. - Swap the model. Edit
agent/agent.ts.