Repository navigation
feat(agentstudio): add agents commands via official SDK - #289
Merged
Merged
Conversation
Expose list/get/create/update/delete/publish/unpublish on algolia agents using algoliasearch-client-go v4.48.0 instead of a custom HTTP client. Co-authored-by: Cursor <cursoragent@cursor.com>
Use algolia agentstudio agents as the product slug, and pass create/update bodies as JSON strings instead of files. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid gosec G115 int-to-int32 conversions that failed CI lint. Co-authored-by: Cursor <cursoragent@cursor.com>
Help copied agt_1/prv_123 which the API rejects as 422, and flag create cannot be published. Point examples at UUID placeholders and the --json providerId+model path. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Oct 15, 2026
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 101 |
| Duplication | 53 |
TIP This summary will be updated as you push new changes.
CI lint timed out on a cold cache with the default 1m limit. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Status: 🟢 pass · 🔴 fail · 🟡 inconclusive (unable to test full functionality due to missing required data) Personal QA Agent — retest of #289 with a real providerVerdict: merge-ready. Previously 🟡 publish/unpublish is now 🟢. Retested the agents command surface (from the stacked Results
QA agent Non-blocking nits (unchanged)
— Personal QA Agent |
This was referenced Oct 15, 2026
LorrisSaintGenez
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What
Adds
algolia agentstudio agentsso you can list, get, create, update, delete, publish, and unpublish Agent Studio agents through the official Go SDK.🤷 Why
#212 covered the full Agent Studio API with a custom
api/agentstudioclient and was too large to review. This PR is the Agents resource only, usingalgoliasearch-client-go(already a CLI dependency) so the slice can merge.agentstudiois the product slug so later modules (conversations, providers) can sit besideagents.🔍 How
algoliasearch-client-gofrom v4.43.1 to v4.48.0.AgentStudioClientbesideCompositionClient(app ID, API key, CLI user agent).algolia agentstudio agentswith list/get/create/update/delete/publish/unpublish calling the matching SDK methods.create/updatetake--name/--instructionsor an inline--jsonobject; no file reads.deleterequires--confirmoff TTY.Flag create is a draft with no provider. The API returns 409 on
publishuntil the agent hasproviderIdandmodel(set via--json). This PR does not list providers.🧪 Testing
Reads need an API key with
settings. Writes neededitSettings. Replace<APP_ID>with an app that has Agent Studio. If the selected profile app does not resolve, pass--application-id— ACL lookup runs first. Replace<provider-id>with a provider UUID from the Agent Studio dashboard (or fromgeton an existing agent). Agent IDs are UUIDs.Quick checks
task build go test ./pkg/cmd/agentstudio ./pkg/cmd/agents/... ./pkg/cmd/factory ./pkg/cmd/root -count=1 ./algolia agentstudio --help ./algolia agentstudio agents --help ./algolia agentstudio agents publish --helpExpect tests green, a fresh
./algoliabinary,agentstudioon the root command, andagentswith subcommandslist,get,create,update,delete,publish,unpublish.publish --helpstates 409 without provider/model. Examples use UUID-shaped IDs, notagt_1.Scenario 1 — flag-based draft
Action: create from flags, then list/get, then publish.
Expectation:
createprints JSON withid,status: "draft", andproviderId: null.listincludes that agent (pagination.page/limitare1/20).getmatches the sameid.publishfails with 409Cannot publish an agent without a model or provider.Scenario 2 —
--jsonwith provider, then publishAction: create with
providerIdandmodel, update, publish, unpublish.Expectation: create stores name, instructions, description,
providerId, andmodel. update PATCH-es the text fields;getshows the new name.publishreturnsstatus: "published";unpublishreturnsdraft.Scenario 3 — delete confirmation (failure mode)
Action: delete without
--confirmin a non-TTY, then with--confirm.Expectation: the first command errors with
--confirm required when non-interactive shell is detectedand the agent still exists. The second exits 0.getthen fails because the agent is gone.algoliasearch-client-goto v4.48.0.providersis a later module.DuplicateAgent; that endpoint is out of scope.Made with Cursor