Skip to content

feat(tools): add lkr tools agents commands for multi-engine Gemini Enterprise agent management - #50

Merged
bwebs merged 5 commits into
mainfrom
bryan/multiple-ge-agent-publish
Sep 28, 2026
Merged

bwebs merged 5 commits into
mainfrom
bryan/multiple-ge-agent-publish

Conversation

@bwebs

@bwebs bwebs commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ExtendedLooker40SDK Gemini Enterprise Agent Methods:
    • Added GeminiEnterpriseAgentRequest with numeric validation on ge_gcp_project_number (ensuring a numeric GCP project number is passed and stored as a str).
    • Added publish_agent, get_published_agent, update_published_agent, unpublish_agent, validate_gemini_enterprise_metadata, and get_gemini_enablement.
  • lkr tools agents CLI (publish, list, delete):
    • lkr tools agents publish: Publishes a Looker Conversational Analytics (CA) agent to the default or a secondary Gemini Enterprise app (--project-number, --location, --engine-id, --validate), records publication state in Looker's Artifact Store (lkr-dev-cli-tools-agents), and catches "Failed to register agent with GE" to fetch ai_ge_service_account_email and instruct the user to assign a Gemini Enterprise user license in Gemini Enterprise > Manage Users.
    • lkr tools agents list: Merges and deduplicates records across Looker Artifacts, live Discovery Engine A2A agent cards (when --gcp-token is provided), and Looker's singleton configuration, reconciling UI deletions back to Looker Artifacts by default (--update-artifact / --no-update-artifact).
    • lkr tools agents delete: Unpublishes agents from the default Looker-configured Gemini Enterprise app or deletes them directly from secondary Discovery Engine apps and updates the Looker Artifact Store.
  • Documentation & Tests:
    • Documented uv tool install / uv tool upgrade and lkr tools agents in README.md and regenerated lkr.md.
    • Added unit test coverage in tests/test_agents_tools.py and tests/test_extended_sdk_methods.py.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new set of CLI tools and SDK methods for managing Looker Conversational Analytics (CA) agents with Gemini Enterprise. It adds the lkr tools agents command group with subcommands to publish, delete, and list agents, supported by new endpoints in ExtendedLooker40SDK and tracked via Looker Artifacts. Additionally, it updates documentation, pre-commit hooks, and adds comprehensive tests. The review feedback highlights several robustness improvements in lkr/tools/agents.py, specifically handling potential AttributeErrors when parsing API responses or metadata, and wrapping SDK calls in try...except blocks to prevent unhandled exceptions from crashing the CLI. All review comments are valid and should be addressed to ensure the stability of the CLI.

Comment thread lkr/tools/agents.py Outdated
Comment thread lkr/tools/agents.py
Comment thread lkr/tools/agents.py Outdated
Comment thread lkr/tools/agents.py Outdated
@bwebs

bwebs commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new agents command group under lkr tools to manage Looker Conversational Analytics (CA) and Gemini Enterprise agents, including commands for publishing, deleting, and listing agents. It also adds corresponding extended SDK methods, CLI documentation, and comprehensive unit tests. The feedback highlights a potential AttributeError in lkr/tools/agents.py when retrieving nested dictionary keys if a parent key is explicitly set to None, and suggests using pydash.get to safely resolve the path.

Comment thread lkr/tools/agents.py Outdated
@bwebs
bwebs merged commit 9bdfbcd into main Sep 28, 2026
1 check passed
@bwebs
bwebs deleted the bryan/multiple-ge-agent-publish branch September 28, 2026 21:15
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