A powerful command-line tool for managing ADK (Agent Development Kit) agents in Google Cloud's Gemini Enterprise platform. This tool provides an easy-to-use interface for creating, listing, updating, and deleting agents without the need to manually construct complex API calls.
Install and run with a single command:
curl -sSL https://raw.githubusercontent.com/florianchrometz/agent-manager-for-gemini-enterprise/refs/heads/main/gemini-agent-manager.sh -o agent-manager-for-gemini-enterprise.sh && chmod +x agent-manager-for-gemini-enterprise.sh && ./agent-manager-for-gemini-enterprise.shBefore using this tool, ensure you have:
-
Google Cloud CLI (gcloud) installed and configured
# Install gcloud CLI curl https://sdk.cloud.google.com | bash exec -l $SHELL gcloud init
-
Authentication: You must be authenticated with gcloud
gcloud auth login gcloud config set project YOUR_PROJECT_ID -
Required permissions: Your account needs the following IAM roles:
- Discovery Engine Admin (includes
agents.managepermission) - Vertex AI User or Vertex AI Viewer (for the discoveryengine service account)
- Discovery Engine Admin (includes
-
Additional tools (usually pre-installed):
curl- for API callsjq- for JSON processing (install via package manager if missing)
curl -sSL https://raw.githubusercontent.com/florianchrometz/agent-manager-for-gemini-enterprise/main/agent-manager-for-gemini-enterprise.sh -o agent-manager-for-gemini-enterprise.sh
chmod +x agent-manager-for-gemini-enterprise.sh
./agent-manager-for-gemini-enterprise.shgit clone https://github.com/florianchrometz/agent-manager-for-gemini-enterprise.git
cd agent-manager-for-gemini-enterprise
chmod +x agent-manager-for-gemini-enterprise.sh
./agent-manager-for-gemini-enterprise.shcurl -sSL https://raw.githubusercontent.com/florianchrometz/agent-manager-for-gemini-enterprise/main/agent-manager-for-gemini-enterprise.sh -o /usr/local/bin/gemini-agent-manager
chmod +x /usr/local/bin/gemini-agent-manager
# Now you can run 'gemini-agent-manager' from anywhereSimply run the script without arguments to enter interactive mode:
./agent-manager-for-gemini-enterprise.shThe tool will guide you through:
- Initial setup (if needed)
- Main menu with all available operations
- Step-by-step prompts for each action
Use specific commands for automation and scripting:
# Show help
./agent-manager-for-gemini-enterprise.sh help
# Interactive setup
./agent-manager-for-gemini-enterprise.sh setup
# List all agents
./agent-manager-for-gemini-enterprise.sh list --project-id my-project --app-id my-app --location eu
# Add a new agent
./agent-manager-for-gemini-enterprise.sh add --project-id my-project --app-id my-app --location eu
# View agent details
./agent-manager-for-gemini-enterprise.sh view --project-id my-project --app-id my-app --location eu
# Update an agent
./agent-manager-for-gemini-enterprise.sh update --project-id my-project --app-id my-app --location eu
# Remove an agent
./agent-manager-for-gemini-enterprise.sh remove --project-id my-project --app-id my-app --location euThe tool supports all major Google Cloud regions:
| Location Code | Region | Discovery Engine Endpoint |
|---|---|---|
eu |
Europe | eu-discoveryengine.googleapis.com |
us |
United States | discoveryengine.googleapis.com |
de |
Germany | eu-discoveryengine.googleapis.com |
au |
Australia | discoveryengine.googleapis.com |
in |
India | discoveryengine.googleapis.com |
ca |
Canada | discoveryengine.googleapis.com |
The tool automatically maps these to the correct Reasoning Engine locations and Discovery Engine endpoints.
- Project ID: Your Google Cloud Project ID
- App ID: Your Gemini Enterprise Application ID
- Location: The region where your Gemini Enterprise is deployed
- Interactive Setup: Run
./agent-manager-for-gemini-enterprise.sh setup - Command Line Options: Use
--project-id,--app-id, and--locationflags - Environment Variables: The tool will detect the current gcloud project automatically
Your App ID can be found in:
- The Gemini Enterprise console URL
- The engines list in Google Cloud Console β Discovery Engine
- Previous API responses from agent operations
- List Agents: View all agents with their details
- View Agent: Get detailed information about a specific agent
- Add Agent: Create new ADK agents with guided prompts
- Update Agent: Modify existing agent properties
- Remove Agent: Delete agents with confirmation prompts
- Interactive Mode: Guided menus and prompts
- Command Line Mode: Perfect for scripting and automation
- Colored Output: Clear visual feedback with color-coded messages
- Error Handling: Comprehensive error checking and user-friendly messages
- Validation: Automatic validation of configuration and inputs
- gcloud Integration: Automatic project detection and authentication
- Regional Support: Smart endpoint selection based on location
- Reasoning Engine Mapping: Automatic location mapping for ADK deployments
- JSON Processing: Clean output formatting and data extraction
# 1. Run interactive setup
./agent-manager-for-gemini-enterprise.sh setup
# 2. List current agents
./agent-manager-for-gemini-enterprise.sh list
# 3. Add a new agent (will prompt for details)
./agent-manager-for-gemini-enterprise.sh add#!/bin/bash
PROJECT_ID="my-gcp-project"
APP_ID="my-gemini-enterprise-app"
LOCATION="eu"
# List all agents
./agent-manager-for-gemini-enterprise.sh list \
--project-id "$PROJECT_ID" \
--app-id "$APP_ID" \
--location "$LOCATION"
# View specific agent
./agent-manager-for-gemini-enterprise.sh view \
--project-id "$PROJECT_ID" \
--app-id "$APP_ID" \
--location "$LOCATION" \
"agent_id_here"# GitHub Actions example
- name: List Gemini Agents
run: |
curl -sSL https://raw.githubusercontent.com/florianchrometz/agent-manager-for-gemini-enterprise/main/agent-manager-for-gemini-enterprise.sh -o agent-manager-for-gemini-enterprise.sh
chmod +x agent-manager-for-gemini-enterprise.sh
./agent-manager-for-gemini-enterprise.sh list \
--project-id ${{ secrets.GCP_PROJECT_ID }} \
--app-id ${{ secrets.GEMINI_ENTERPRISE_APP_ID }} \
--location eu \
--non-interactive- Authentication: Uses your existing gcloud authentication
- Permissions: Requires Discovery Engine Admin role
- No Secrets: No API keys or secrets are stored in the script
- Audit Trail: All operations are logged through Google Cloud's audit system
-
"Not authenticated with gcloud"
gcloud auth login gcloud auth application-default login
-
"Could not retrieve project number"
gcloud config set project YOUR_PROJECT_ID # Ensure you have access to the project
-
"API Error: Permission denied"
- Verify you have Discovery Engine Admin role
- Check that the discoveryengine service account has Vertex AI permissions
-
"jq: command not found"
# Ubuntu/Debian sudo apt-get install jq # macOS brew install jq # CentOS/RHEL sudo yum install jq
-
"Agent not found" when listing
- Verify your App ID is correct
- Ensure you're using the right location/region
- Check that the Gemini Enterprise app exists
For additional debugging information, you can modify the script to add:
set -x # Add after the initial set -e line for verbose outputContributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
git clone https://github.com/florianchrometz/agent-manager-for-gemini-enterprise.git
cd agent-manager-for-gemini-enterprise
chmod +x agent-manager-for-gemini-enterprise.sh
# Test the script
./agent-manager-for-gemini-enterprise.sh helpThis project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs and request features via GitHub Issues
- Google Cloud Documentation: Gemini Enterprise Documentation
Made with β€οΈ for the Google Cloud and Gemini Enterprise community