Prerequisites:
- Node.js 20 or higher
- pnpm installed globally
- A local clone of
agentlabwith dependencies installed (pnpm install)
Everyday commands
All development commands run throughpnpm.
1
Start the dev server
tsx watch and serves the Vite React client. The server restarts on file changes.2
Type-check the project
tsc --noEmit across the client, server, and shared code. Use this before opening a pull request.3
Run tests
--watch locally when iterating on a single test file.4
Build for production
dist/.Repository layout
Database migrations
The database is managed with Drizzle ORM. Schema and generated SQL migrations live underdrizzle/. To generate a new migration from schema changes and apply it locally, run:
drizzle-kit generate followed by drizzle-kit migrate.
Change control
Agent Lab tracks meaningful changes to operating materials indocs/operations/change-control-register.md. Log an entry whenever you change:
- workflow packages under
workflows/ - operating docs under
docs/operations/ - agent prompts
- tracker schemas
- kit manifests
scripts/verify-change-control.mjs, which fails if a tracked change is missing from the register. Fix any reported gaps before shipping.
Formatting
The repo uses Prettier. Format the whole tree with:Troubleshooting
`pnpm dev` fails with a Node version error
`pnpm dev` fails with a Node version error
Agent Lab targets Node.js 20 or higher. Check your version with
node --version and upgrade if needed. Tools like nvm or fnm make it easy to switch versions per project.`pnpm change-control:check` reports an unlogged change
`pnpm change-control:check` reports an unlogged change
Add an entry describing the change to
docs/operations/change-control-register.md, then rerun the command. If the change should be deferred, move it to docs/operations/scheduled-change-queue.md instead.Drizzle migration fails to apply
Drizzle migration fails to apply
Confirm your database connection settings match
drizzle.config.ts and that no earlier migration is pending. Regenerate with pnpm db:push after fixing the schema.
