Skip to content

BYO agents Phase 2: bbox agents add / agents init scaffolding #201

Description

@JAORMX

Follow-up to #191 (epic). Phase 1 landed declarative custom agents + bbox agents list|inspect|doctor in #200. This issue adds the remaining Phase 2 CLI for authoring a custom agent without hand-editing YAML.

Scope

  • bbox agents add NAME --image IMAGE --command CMD [--env PATTERN ...] [--memory 4g] [--cpus 4] [--egress-profile standard] [--mcp] [--mcp-authz-profile safe-tools] — appends a validated custom agent to the global config file (~/.config/broodbox/config.yaml), then runs the existing ValidateCustomAgent checks and prints the result. Refuses to overwrite a built-in or an existing custom agent unless --force.
  • bbox agents init [NAME] — writes a commented starter agents: stanza (or a standalone manifest, see #(Phase 4)) the user can fill in. Should reuse the documentation already in internal/infra/config/writer.go's default template.

Notes / constraints

  • Pure mapping (config.AgentFromOverride) and validation (config.ValidateCustomAgent) already exist from Add declarative bring-your-own agent support (#191 Phase 1) #200 — reuse them; the new code is just CLI + a config-file mutation in internal/infra/config.
  • Writing config is I/O → lives in internal/infra/config + cmd/bbox; keep the domain pure.
  • Must preserve existing comments/formatting on rewrite as much as practical (or document that it normalizes).
  • Custom agents remain global-only; agents add must never target a workspace .broodbox.yaml.

Acceptance criteria

bbox agents add aider --image ghcr.io/acme/aider-bbox:latest --command aider --env OPENAI_API_KEY --mcp
bbox agents doctor aider   # PASS
bbox aider

with no manual YAML editing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageIssue needs initial triage by a maintainer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions