Draft
Conversation
Vendor the Agent Studio OpenAPI 3.1 spec, extend gen_flags.go to flatten AgentConfigCreate and AgentCompletionRequest into Cobra flags, and add a hand-written client plus an `agentstudio` command tree covering agent CRUD, publish/unpublish/duplicate, completions, and conversation management. Reuses the existing app ID + admin key for auth; host derives from the app ID per the spec.
…e compatibility-mode
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 211 |
| Duplication | 107 |
TIP This summary will be updated as you push new changes.
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.
Summary
algolia agentstudiocommand tree backed by a hand-written client atapi/agentstudio/. Surface covers agent CRUD + lifecycle (list,get,create,update,delete,duplicate,publish,unpublish,complete) and conversations (list,get,deletesingle/--all,export).https://agent-studio.eu.algolia.com/rag-openapi.json(RAG API v0.1.0, OpenAPI 3.1) intoapi/specs/agent-studio.json. Extends the existing flag-codegen (pkg/gen/gen_flags.go) to flattenAgentConfigCreateandAgentCompletionRequestinto Cobra flags — the same pipeline that producescmdutil/spec_flags.gofor the search API. Bumpskin-openapito v0.135.0 for OpenAPI 3.1 support and adds anunwrapNullablehelper for the 3.1anyOf:[T, null]idiom.X-Algolia-Application-Id+X-Algolia-API-Key); the host derives from the app ID per the spec's declared server (https://{APP_ID}.algolia.net/agent-studio/), so no region knob is needed.Test plan
go generate ./...regenerates bothpkg/cmdutil/spec_flags.go(search) andpkg/cmdutil/agent_studio_flags.go(new, agents studio)go build -o algolia cmd/algolia/main.goproduces a working binary;./algolia agentstudio --helpand./algolia agentstudio agents create --helpshow the expected command tree and generated flags.agents list(table +--output jsonwith pagination)agents getagents create→agents duplicate→agents update→agents delete(both originals 404 after delete)conversations list. Completion call returns the upstream