Dashboard: agents CRUD — list, create, edit, delete instances #53
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As an operator, I want an
/agentspage on the dashboard where I can see every instance, its type, its overrides, and its live state (idle / busy / queued), and where I can create / edit / delete instances without touching JSON or restarting the service.Context
All the plumbing is landed by A1 (SQLite), A2 (pool scheduler state), A3 (match_labels), A4 (prompt appendix), A5 (container reconcile). A6 exposes it as a web form.
Acceptance criteria
API
GET /agents→ returns every SQLite row + type defaults + live state (idle/busy/queue-depth) merged.POST /agentsbody{name, type, model?, prompt_appendix?, match_labels?, notes?}→ insert, reconcile container, return the full row. 400 on duplicate name, invalid type, malformedmatch_labelsJSON.PATCH /agents/:namebody of any subset of{model, prompt_appendix, match_labels, notes}→ update, reconcile container if image-relevant fields changed, return the updated row.DELETE /agents/:name→ remove from SQLite, stop + remove container, drop in-memoryWorker, release worktrees, drop sessions keyed on any (type, repo, issueOrPr) this instance was mid-processing. Volume survives by default (see A5).DELETE /agents/:name?wipe=true→ additionally remove the state volume. Require a second confirmation query param (?wipe=true&confirm=<name>) to avoid fat-finger.UI
/agentspage listing instances in a table: name, type, model (resolved, showing override if any),match_labels, queue depth, status pill (idle / busy / stopped).agents.jsontype keys), name input (validated: lowercase, hyphens, no collision), model dropdown (from a static list of Claude model IDs), prompt appendix textarea, match_labels tag-input, notes textarea.?wipe=trueflag.implement,review, etc.) showing the file content from disk. Next to it, a textarea for the instance'sprompt_appendixwith live char count. This is the "edit skill through UI" surface the milestone intentionally limits — base skills are immutable here, only the appendix is writable.Live state
/eventsalready carries queue depth and task transitions. The/agentspage subscribes and updates rows in place — no full reload.Cleanup on delete
POST /cancel), wait up to 15 s, then force-remove.Tests
?wipe=true&confirm=<wrong>→ 400.Out of scope
config/agents.jsonis the type-defaults contract in git.References
src/dashboard.html./healthand/eventsendpoints.Dependencies
main(after A5 lands).