Skip to content

feat(agentstudio): read agent creation JSON from file - #299

Closed
leonardocuco wants to merge 1 commit into
mainfrom
fix/cec-1883-agent-create-json-file
Closed

leonardocuco wants to merge 1 commit into
mainfrom
fix/cec-1883-agent-create-json-file

Conversation

@leonardocuco

@leonardocuco leonardocuco commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Creating an Agent Studio agent from a reusable JSON configuration currently requires placing the entire payload in --json. This makes file-based and piped automation awkward.

Change

  • Add agents create --json-file <path> and support --json-file - for stdin, reusing the existing JSON validation and request path.
  • Reject combinations with --json, --name, or --instructions before reading or creating a client, including explicitly empty flags. Reject empty, malformed, missing, or incomplete files before creating a client.
  • Preserve existing --json and flag workflows. The pinned SDK still determines which fields are supported; this does not implement AlgoBot templates or variable substitution.

Overlap: #291 is already open and proposes --file / -f for this and other commands. This narrower draft implements the requested --json-file on agents create only. Reconcile the flag naming and ownership with #291 before merging; do not merge both independently.

Validation

  • go test ./pkg/cmd/agents/create -count=1 (file and stdin payloads, preserved provider/model/config, invalid input and conflicting flags).
  • go test ./... passed with localhost access; no E2E build tags or real API calls.
  • go generate ./..., go build ./..., gofmt, and git diff --check passed. gofumpt was not installed locally.
  • No deployment or release; draft during the code freeze.

Related: CEC-1883.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant