Submatter/plans/Plan-workspace-communications/Epic-agent-participation/Task-ai-assisted-agent-builder.md

2.8 KiB

kind slug title plan_slug epic_slug status priority tenant_id owner cursor_todo_id updated_at
task ai-assisted-agent-builder Generate structured agent drafts with AI workspace-communications agent-participation ready P1 global unassigned null 2026-09-25

Task summary

Use the Agents-tab composer to turn a natural-language request into a validated structured draft that can be refined conversationally or through direct field edits.

Description

In Agents mode, prompts such as “Create an agent that triages failed convoy runs and asks before retrying” start a builder conversation rather than a normal workspace chat. The server returns a typed agent-draft proposal: identity, purpose, instructions, capabilities, requested tools, invocation/context policy, model role, harness route, budget, and unresolved questions. Users can refine the draft conversationally, edit fields directly, and save a private draft. Permission approval, sandbox testing, installation, and activation are handled by a dependent review task. Generated configuration never silently grants tools, selects plaintext credentials, publishes, or activates an agent.

Subtasks

  • Define a versioned zod schema for agent-builder requests, clarifying questions, structured draft patches, warnings, and save readiness.
  • Add a workspace-authorized streaming builder endpoint/service that uses model routing rather than a hard-coded provider.
  • Reuse the shared composer shell with Agents-specific placeholder text, examples, attachments policy, and submit handling.
  • Add prompt-injection boundaries, requested-tool validation, budget caps, audit logging, and malformed-model-output tests.
  • Define the follow-on UI contract for transcript, structured editing, revision history, and private-draft save/resume without implementing persistence in this task.

Owner or assignee

unassigned

Status

ready

Estimation

L

Acceptance criteria

  • Natural-language requests produce zod-validated structured drafts or clarifying questions, never unvalidated persisted configuration.
  • The builder requests a model role/capability and works through the existing provider/harness abstraction.
  • Initial requests and conversational refinements produce ordered clarification/draft-patch events with deterministic base revisions.
  • Generated requested tools, activation, channel access, and workspace publication remain unapproved fields and cannot take effect in this task.
  • This service does not persist, publish, activate, or execute an agent; UI editing and private-draft persistence are a follow-on task.
  • pnpm lint && pnpm type-check && pnpm test pass.
  • Epic: ./Epic-agent-participation.md
  • Plan: ../Plan-workspace-communications.md