A Google ADK-based multi-agent system for IBM i system administration and performance monitoring. This implementation uses a coordinator pattern with specialized sub-agents for different IBM i operational domains.
The multi-agent system provides intelligent routing between specialized agents, allowing complex queries to be handled by the most appropriate agent. The coordinator analyzes user intent and delegates to sub-agents with relevant expertise.
The root agent acts as an intelligent router that delegates user queries to specialized sub-agents:
- Model: Gemini 2.0 Flash
- Planner: PlanReActPlanner for multi-step reasoning
- Plugins: ReflectAndRetryToolPlugin (max 3 retries)
- Performance Agent - Analyzes CPU, memory, I/O, and subsystem performance
- Security Agent - Analyzes security configurations, vulnerabilities, and compliance
- SysAdmin Discovery Agent - Lists and summarizes schemas, categories, and system organization
- SysAdmin Browse Agent - Navigates and explores libraries, schemas, and object hierarchies
- SysAdmin Search Agent - Finds objects, services, or SQL examples by name or keyword
- Python 3.13+
- Google ADK installed
- IBM i MCP Server running (default:
http://127.0.0.1:3010/mcp) - Valid IBM i MCP access token
- Google API key (from Google AI Studio)
pip install google-adk[eval]Ensure your IBM i MCP server is running:
# From the repository root
npx ibmi-mcp-server --transport http --tools ./tools Default URL: http://127.0.0.1:3010/mcp
Create a .env file in the adk_agents directory:
# Google AI Configuration
GOOGLE_API_KEY=your_google_api_key
IBMI_AGENT_MODEL=gemini-2.0-flash
# IBM i MCP Server
IBMI_MCP_ACCESS_TOKEN=your_bearer_token_here
IBMI_MCP_SERVER_URL=http://127.0.0.1:3010/mcpTip
Get your Google API key from Google AI Studio. See the parent README for detailed setup instructions.
The ADK Web UI provides an interactive interface for testing and debugging.
Navigate to the parent directory:
cd agents/frameworks/google_adk
adk webThis will:
- Start a local web server
- Open your browser to the ADK Web UI
- Load the multi-agent configuration from
adk_agents/
Interact with the agents:
Type queries in the chat interface:
Show me system CPU usage
What are the top 10 CPU consumers?
List all available schemas
Find services related to performance
The UI displays:
- Which sub-agent is handling the request
- Tool calls being made to the MCP server
- Responses and results
- Execution traces and logs
cd agents/frameworks/google_adk
adk run adk_agents"Show me system CPU usage"
"What are the top 10 CPU consumers?"
"Analyze memory pool utilization"
"Check HTTP server performance"
"Check system security configuration"
"Analyze user access controls"
"Review security vulnerabilities"
"Check compliance status"
"List all available schemas"
"Show me system categories"
"What services are available?"
"Navigate to QSYS2 library"
"Show objects in MYLIB"
"Explore database schemas"
"Find services related to performance"
"Search for SQL examples with 'CPU'"
"Locate objects named 'CUSTOMER'"
The coordinator uses intelligent routing:
- Understand Intent - Parse user query to determine domain
- Route to Correct Agent:
- Performance → CPU, jobs, memory, I/O, tuning
- Security → Security configs, vulnerabilities, compliance
- Discovery → Listing schemas, categories, organization
- Browse → Navigating libraries, schemas, hierarchies
- Search → Finding objects, services, SQL examples
- Combine Agents - Chain agents for multi-step goals
- Context Management - Preserve outputs when delegating
- Response Format - Explain routing, summarize results, suggest next steps
Set in your .env file:
IBMI_MCP_SERVER_URL=http://your-mcp-server:3010/mcpModify in agent.py:
plugins=[
ReflectAndRetryToolPlugin(max_retries=5), # Increase retries
]Update in agent.py:
root_agent = Agent(
model='gemini-2.0-pro-exp', # Use different model
...
)For available models, see Google ADK Models Documentation.
- Verify
IBMI_MCP_ACCESS_TOKENis set correctly - Ensure the token hasn't expired
- Check MCP server is running:
curl http://127.0.0.1:3010/mcp
- Confirm MCP server URL is correct
- Test connectivity:
curl http://127.0.0.1:3010/mcp - Check firewall rules if using remote MCP server
- Clear browser cache if UI doesn't load
- Check browser console for JavaScript errors (F12 → Console)
- Ensure
adk webcommand is running - Verify network connectivity
- Verify
GOOGLE_API_KEYis correct - Check API key is enabled in Google Cloud Console
- Ensure Gemini API is enabled for your project
For more troubleshooting, see Google ADK Troubleshooting.
- Create a new file in
sub_agents/ - Define the agent with appropriate tools and instructions
- Import and add to
root_agent.sub_agentslist inagent.py - Update the coordinator's delegation strategy
- Test with
adk webcommand
# Run with ADK CLI
adk run adk_agents
# Or use the Web UI
adk webADK tracks evaluation runs in .adk/eval_history/. Review these files to analyze agent performance and improve prompts.
Learn more: ADK Evaluation Framework
- Google ADK Documentation
- Google ADK Models Guide
- ADK Web Interface Guide
- ADK Evaluation Framework
- IBM i MCP Server Documentation
- MCP Protocol Specification
See repository root for license information.