-
Notifications
You must be signed in to change notification settings - Fork 79
(WiP) Restructure ADK agent architecture and add comprehensive documentation #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
dandye
wants to merge
9
commits into
main
Choose a base branch
from
agentspace_deploy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Reorganize directory structure with agents/, scripts/, ui/, and libs/ directories - Add new Google ADK documentation section with quickstart guides - Create Makefile with comprehensive deployment and management commands - Add OAuth, AgentSpace, and Cloud Run integration scripts - Restructure agents into logical groupings (google_mcp_security_agent, sample_agents) - Move UI components to dedicated ui/ directory - Create libs/adk_utils for shared utilities - Add deployment scripts for agentspace, oauth, and environment management - Include testing scripts for deployed agents - Update documentation table of contents with new ADK section
- Add env-setup target to Makefile for creating .env from .env.example - Update .env.example with optimized model and timeout settings - Enhance env_manager.py with better validation for UUIDs and URLs - Fix server name reference from 'soar' to 'secops_soar' in env_manager
- Update .gitignore to exclude markdown library files - Improve adk-deploy target in Makefile with better lib handling and bucket generation - Fix agent.py initialization to avoid global variable issues - Streamline env_manager.py by removing unnecessary agent_engine requirements - Add automatic cleanup of copied libs after deployment
This commit fixes multiple deployment issues that prevented MCP tools from loading properly: **Cloud Run Deployment:** - Fixed cloudrun_deploy.py to point to correct agents directory structure - Added Python path configuration for libs imports - Updated cloudrun_deploy_run.sh to handle correct file paths and cleanup - Fixed Makefile to read environment variables from .env file for deployment **ADK Local Testing:** - Updated run-adk-agent.sh to specify agents directory for adk web - Added automatic libs copying for local testing - Fixed Python path in agent.py to find local libs directory **MCP Server Loading:** - Fixed environment variable mapping for all MCP servers (secops, gti, soar, scc) - Added proper server entry point handling (scc uses scc_mcp.py, others use server.py) - Added comprehensive logging for debugging MCP server initialization - Fixed BASE_DIR and SERVER_DIR path detection for both local and Cloud Run environments **Agent Configuration:** - Added default values for GOOGLE_MODEL and DEFAULT_PROMPT to prevent validation errors - Improved .env file path detection for different deployment environments - Added flexible path handling for both local development and container deployment **Makefile Improvements:** - Fixed cloudrun-logs target to properly read project/region from .env - Updated adk-deploy target to read environment variables correctly - Removed dangerous server directory cleanup that could delete original files All MCP tools (SCC, SecOps, GTI, SOAR) now load correctly in both local and Cloud Run deployments.
Test branch for agentspace deployment
Replace custom MCPToolSetWithSchemaAccess with standard MCPToolset to resolve 'TypeError: coroutine object is not callable' error. The custom extensions were workarounds for ADK 1.3 issues that are now fixed in ADK 1.5.0+.
- Add comprehensive .env file validation in ae_deploy_run.sh - Enhanced error reporting in ae_remote_deployment_sec.py - Improved MCP server status logging and validation - Added server directory copying to Makefile for ADK deployments - Enhanced agent response handling in test_deployed_agent.py These changes provide better visibility into deployment issues and ensure proper environment configuration for ADK agents.
- Add uv to requirements.txt for Agent Engine runtime - Remove .venv directories from server copies to prevent architecture conflicts - Clean up unused tool_set_name parameter - Fixes 'Exec format error' caused by copying architecture-specific binaries
- Add agentspace_app_setup.md: Complete guide for creating and configuring Agentspace applications, including API enablement, IAM setup, and environment configuration - Add oauth_agentspace_setup.md: Detailed OAuth setup guide with step-by-step instructions for client creation, authorization flow, and AgentSpace integration - Fix Path object issue in env_manager.py: Convert string to Path object to resolve AttributeError in oauth_manager.py - Update agentspace_manager.py: Improve force flag handling in agent registration The documentation provides clear workflows for users to set up AgentSpace apps and OAuth authentication, addressing the missing prerequisite steps for OAuth integration. Includes troubleshooting, security best practices, and complete environment variable reference.
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
This PR introduces a major restructuring of the ADK (Agent Development Kit) agent architecture to improve organization, maintainability, and user experience:
agents/
,scripts/
,ui/
, andlibs/
directoriesKey Changes
Directory Structure
agents/
- Contains agent implementations (google_mcp_security_agent, sample_agents)scripts/
- Deployment and management scriptsui/
- Web UI componentslibs/adk_utils/
- Shared utility functionsDocumentation
Automation
Test Plan
This restructuring provides a solid foundation for the ADK agent ecosystem while maintaining all existing functionality.
ToDo
Blocked on the scope:
https://www.googleapis.com/auth/generative-language.retriever
inoauth_manager.py
. ToDo: test without that scope.Consider incorporating VeerMuchandi's tools from https://github.com/VeerMuchandi/agent_registration_tool
3.1 Create Makefile targets for those tools
Document the complete workflow:
This is a first draft (needs review):
Each step should indicate which env vars are required as input (in .env and/or in make command) and which are created. Indicate where the created ones should are required in the next step. If there are alternatives to using the make approach, (like cloud console clicking), then note that and point to relevant docs with screenshots.