- Define agents table with id, name (unique), taskId, sessionId, worktreeId, status - Status enum: idle, running, waiting_for_input, stopped, crashed - Foreign key to tasks with onDelete: 'set null' (agent may outlive task) - Add agentsRelations linking to tasks - Export Agent and NewAgent types