Skip to content

Feature/analytics agent cli#13

Open
zhaxinmeng wants to merge 3 commits into
mainfrom
feature/analytics-agent-cli
Open

Feature/analytics agent cli#13
zhaxinmeng wants to merge 3 commits into
mainfrom
feature/analytics-agent-cli

Conversation

@zhaxinmeng

Copy link
Copy Markdown
Collaborator

Issue for this PR

Closes #

Type of change

  • New feature

What does this PR do?

Adds a new analytics-agent CLI command group that exposes the Analytics Agent (DataGPT) REST APIs via cz-cli.

The new command covers:

  • Datasource management — list, create, update, delete datasources; browse schema, search/show tables, load data
  • Domain management — list, create, update, delete domains; add/remove tables from a domain
  • Session operations — list sessions, create a session (requires --domain-id), run a natural-language query (requires --question-id), poll for results, stop a query

Key implementation details:

  • Session creation requires domainId; in-session queries require questionId — these constraints are enforced at the CLI argument level
  • Session-related routes use a separate openSessionAuth token distinct from the standard API auth
  • Route paths are constructed dynamically from CLI args with proper URL encoding
  • Profile store extended to read agentEndpoint for routing analytics-agent requests separately from the main Lakehouse endpoint

How did you verify your code works?

  • Added e2e command surface test covering all new subcommands (test/e2e-command-surface.ts)
  • Added profile-store.test.ts to cover agentEndpoint read logic
  • Manually tested against a running Analytics Agent service

Screenshots / recordings

N/A — CLI-only change

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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