Repository navigation
feat(agentstudio): add conversations commands via official SDK - #287
cmarguta-alg wants to merge 6 commits into
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>
…fficial SDK Sibling module under agentstudio: list, get, export, delete, and a date-bounded purge. Co-authored-by: Cursor <cursoragent@cursor.com>
CI lint timed out on a cold cache with the default 1m limit. Co-authored-by: Cursor <cursoragent@cursor.com>
Personal QA Agent — functional retest of #287Verdict: merge-ready, with an environment skip for get/delete of a real conversation. Retested Executed
Skip (environment, not a CLI defect)This app has no stored conversations, and this slice cannot create them (no completion command; the only agent has
Happy-path get/delete still needs an agent that already has conversations. Non-blocking nits
— Personal QA Agent |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 159 |
| Duplication | 107 |
TIP This summary will be updated as you push new changes.
|
Moved to a same-repo stack on algolia/cli: #288 (base |
🤔 What
Adds
algolia agentstudio conversationsso you can list, get, export, delete, and purge Agent Studio conversations through the official Go SDK.🤷 Why
#286 shipped the Agents resource. Conversations is the next sibling module under
agentstudio(not nested underagents), using the same SDK client.🔍 How
algolia agentstudio conversationswith list/get/export/delete/purge calling the matching SDK methods.deleteandpurgerequire--confirmoff TTY.purgealso requires--start-dateand/or--end-dateso the delete is bounded.list/get/exportprint JSON. Dates areYYYY-MM-DD. IDs in examples are UUID-shaped. No file reads or writes.🧪 Testing
Stacked on #286. Merge that first, or check out this branch which includes it.
Reads and deletes need an API key with
logs(admin keys skip the CLI ACL check). Replace<APP_ID>and<agent-id>with an Agent Studio app that already has conversations. Agent and conversation IDs are UUIDs. Pass--application-idif the selected profile app does not resolve.Quick checks
task build go test ./pkg/cmd/conversations/... ./pkg/cmd/agentstudio ./pkg/cmd/root -count=1 ./algolia agentstudio conversations --help ./algolia agentstudio conversations list --help ./algolia agentstudio conversations purge --helpExpect tests green,
conversationsbesideagentsunderagentstudio, and subcommandslist,get,export,delete,purge.purge --helpstates a date bound is required.Scenario 1 — list, get, export
Action: list conversations, get one, export a date range.
Expectation:
listreturnsdata[]andpagination.getreturns that conversation with amessagesarray.exportprints a JSON array of full conversations.Scenario 2 — 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 conversation still exists. The second exits 0.getthen fails because the conversation is gone.Scenario 3 — purge requires a date bound (failure mode)
Action: purge without a date, then with
--end-dateand--confirm.Expectation: the first command errors with
`--start-date` or `--end-date` is requiredand does not call the API. The second exits 0 (may delete nothing if no conversations match).lw-oct-agent-studio-1).logsACL.Made with Cursor