Skip to content

feat(agentstudio): add Agent Studio commands#211

Draft
tkrugg wants to merge 6 commits intomainfrom
feat/agent-studio
Draft

feat(agentstudio): add Agent Studio commands#211
tkrugg wants to merge 6 commits intomainfrom
feat/agent-studio

Conversation

@tkrugg
Copy link
Copy Markdown
Collaborator

@tkrugg tkrugg commented May 5, 2026

Summary

  • Adds an algolia agentstudio command tree backed by a hand-written client at api/agentstudio/. Surface covers agent CRUD + lifecycle (list, get, create, update, delete, duplicate, publish, unpublish, complete) and conversations (list, get, delete single/--all, export).
  • Vendors the live https://agent-studio.eu.algolia.com/rag-openapi.json (RAG API v0.1.0, OpenAPI 3.1) into api/specs/agent-studio.json. Extends the existing flag-codegen (pkg/gen/gen_flags.go) to flatten AgentConfigCreate and AgentCompletionRequest into Cobra flags — the same pipeline that produces cmdutil/spec_flags.go for the search API. Bumps kin-openapi to v0.135.0 for OpenAPI 3.1 support and adds an unwrapNullable helper for the 3.1 anyOf:[T, null] idiom.
  • Reuses the existing app-credentials profile (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 both pkg/cmdutil/spec_flags.go (search) and pkg/cmdutil/agent_studio_flags.go (new, agents studio)
  • go build -o algolia cmd/algolia/main.go produces a working binary;
  • [x]./algolia agentstudio --help and ./algolia agentstudio agents create --help show the expected command tree and generated flags.
  • Live smoke against a real Algolia app:
    • agents list (table + --output json with pagination)
    • agents get
    • agents createagents duplicateagents updateagents delete (both originals 404 after delete)
    • conversations list. Completion call returns the upstream

tkrugg added 5 commits May 4, 2026 20:00
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.
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 5, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 211 complexity · 107 duplication

Metric Results
Complexity 211
Duplication 107

View in Codacy

TIP This summary will be updated as you push new changes.

@tkrugg tkrugg changed the title feat(agentstudio): add Agent Studio (RAG API) commands feat(agentstudio): add Agent Studio commands May 5, 2026
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