Create the "Spawn Agent" form page and POST handler.
Spawn Form (GET /agents/new)
- Prompt: Large textarea for the initial prompt/task
- Name: Optional text input for a human-readable run name
- Task: Optional dropdown/text input to associate with a task ID (typeahead from task DB)
- Model: Dropdown with available models (default: claude-sonnet-4-5). Pull list from
Omni.Agent.Models. - Workspace:
- Default: auto-create in daemon's workspace root
- Option: specify existing path (e.g., repo root for worktree creation)
- Checkbox: "Create git worktree" (default on when workspace is a git repo)
- Submit: "Launch Agent" button
POST Handler (POST /agents/spawn)
- Validate form inputs
- Call Agentd daemon
POST /agents with SpawnRequest JSON:
json
{
"prompt": "...",
"name": "...",
"workspace": "/path/to/repo",
"model": "claude-sonnet-4-5-20250514"
}
- On success: redirect to
/agents/:runId (the new agent's detail page) - On error: re-render form with error message
HTMX
- Form submission via htmx:
hx-post="/agents/spawn" with redirect on success - Or: standard form POST with 303 redirect
Mobile
- Form should be usable on phone (large touch targets, appropriate input types)
- Textarea should be tall enough for multi-line prompts
Ava verified: shipped as part of commit b05c4976 'agents web ui: interactive agent interface'. /agents endpoint live on beryllium and returns 200. Moving to Verified.