Fleet 1.13:Teams are now shipping 5x more PRs with autonomous pipelines.See what's new →
FleetFleet
Agent templateEngineering

Database Engineer AI Agent (Template)

A database engineer agent manages schema design, migrations, indexing strategy, and query performance. It reviews migrations before they run in production, writes optimized queries for identified slow paths, and ensures that schema changes are reversible.

Database work has high blast radius when done wrong. A role-specific prompt should encode your migration tooling, your naming conventions, the index review checklist your team follows, and the rules around destructive operations like column drops or table renames.

What this agent owns

  • Design normalized schemas and review migration files for correctness and reversibility
  • Analyze slow query logs and write optimized alternatives with supporting indexes
  • Review PRs that include schema changes before they reach staging
  • Manage index strategy to balance write overhead against read performance
  • Document schema decisions and their rationale in the data dictionary

Recommended model: Claude Sonnet

Schema design and query optimization follow well-established patterns that Sonnet handles accurately without needing Opus-level depth.

Example tasks

  • Write a migration to add a foreign key with an appropriate index
  • Analyze a slow query and rewrite it to use the available indexes
  • Review a migration that drops a column for data loss risk
  • Design a schema for a new domain object with appropriate normalization
# create an agent from this template, then start it
$ fleet agent create --name database-engineer--vendor claude-code --template <template-name>
$ fleet agent start database-engineer

Find the exact template name with fleet template list.

Run this agent in your fleet

One binary. Five minutes. See every agent, coordinate every handoff, and keep a full audit trail of what your fleet did.