- Use original user request when research_needed is empty
- Process tool_calls iteratively for multiple tool usage
- Use groq_with_tools for tool_calls on re-invocation
- Add max iteration limit to prevent infinite loops
- Research Agent: Projects 관련 작업 시 /home/ubuntu/Projects 경로 명확히 사용
- Research Agent: Kubernetes 상태 분석을 kubectl로 자유롭게 수행하도록 강화
- Code Agents: 파일 수정 후 git add, commit, push까지 자동 수행 (ArgoCD 자동 배포)
- 모든 에이전트: Projects 관련 요청 시 자동 탐색은 유지하되 /home/ubuntu/Projects 경로 사용
- su ubuntu -c may not set env vars properly
- Change to su - ubuntu -c to use login shell environment
- Projects path is hardcoded to /home/ubuntu/Projects
- execute_host가 su ubuntu -c를 사용하도록 변경 (현재 디렉토리 유지)
- 모든 에이전트 프롬프트에 /home/ubuntu/Projects 경로 하드코딩
- tool_name에 따라 올바른 도구(execute_bash/execute_host) 선택하도록 수정
- Add execute_ssh tool for accessing host system (oracle-master)
- Update all agent prompts to explain container vs host environment
- Research Agent: Guide to use SSH for kubectl, Projects, PostgreSQL
- Code Agents: Guide to use SSH for file creation and Git operations
- Infrastructure Agent: Guide to use SSH for YAML files and kubectl
- Orchestrator: Add system environment context
This fixes:
- kubectl 'Exec format error' (now uses SSH with sudo)
- /app/repos/ not found (now uses /home/ubuntu/Projects/)
- PostgreSQL connection errors (now uses correct host address)
- Git repository access issues (now uses SSH to access host repos)
Example usage:
- execute_ssh('kubectl get pods -n mas', use_sudo=True)
- execute_ssh('ls -la /home/ubuntu/Projects')
- execute_ssh('cd /home/ubuntu/Projects/mas && git status')
- Add execute_bash tool to Orchestrator for direct command execution
- Add execute_bash tool to Review agent for running tests/linters
- Fix Dockerfile to copy agents/ and tools/ directories
- Add PERMISSIONS.md documenting agent write access
Fixes ModuleNotFoundError: No module named 'agents'
MAJOR SIMPLIFICATION:
- Removed 20+ specialized MCP tools
- Added 3 universal tools: bash_command, read_file, write_file
- All agents now use the same tools (behavior controlled by prompts)
Changes:
1. Added universal_tools (bash-centric approach):
- bash_command: Execute any bash command (kubectl, git, npm, python, etc.)
- read_file: Read files (convenience wrapper)
- write_file: Write files (convenience wrapper)
2. All agents now use universal_tools:
- orchestrator (Claude)
- backend_developer (Groq)
- frontend_developer (Groq)
- sre_specialist (Groq)
- yaml_manager (Groq)
3. Updated orchestrator prompt:
- Focus on bash_command usage
- Clear examples of bash commands
- Simpler, more powerful approach
4. Legacy tools kept for backward compatibility:
- Old specialized tools still available but not recommended
- Use bash_command instead
Benefits:
- Extreme simplicity: 3 tools vs 20+
- Complete autonomy: Agents can do anything via bash
- Maintainable: No need to add new tools, just use bash
Updated orchestrator prompt to include:
- Explicit /app/projects/ path information
- List of available repositories (11 repos)
- Instruction to use /app/projects when user asks about Projects folder
- Added git_read_file and git_show_file_changes to tool documentation
This fixes the issue where orchestrator tried to access 'Projects' instead of '/app/projects'.
Major changes:
- Kubernetes tools: Replace subprocess kubectl calls with kubernetes-client library
- Supports in-cluster config for pod execution
- Fallback to local kubeconfig for development
- All k8s tools (nodes, pods, deployments, logs, describe) now use Python API
- PostgreSQL tools: Replace kubectl exec psql with direct psycopg2 connection
- Connect via Kubernetes service DNS
- Support for environment-based configuration
- Improved error handling with proper pgcode/pgerror
- Prometheus tools: Replace kubectl exec wget with direct HTTP requests
- Use requests library to query Prometheus API
- Connect via Kubernetes service DNS
- Configurable via PROMETHEUS_URL env var
- Deployment updates: Add explicit PostgreSQL connection env vars
- POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER
- Already had POSTGRES_PASSWORD from secret
Benefits:
- No longer requires kubectl binary in container
- Faster execution (no subprocess overhead)
- Better error handling and type safety
- Works seamlessly in Kubernetes pods with RBAC
- ServiceAccount for mas pod
- ClusterRole with read-only permissions
- ClusterRoleBinding
- kubectl installed in Docker image
- Now mas can query Kubernetes API!
Orchestrator and SRE agents now:
- Don't guess cluster-specific information
- Explicitly state when real verification is needed
- Provide general best practices only
- Created mas database in PostgreSQL
- Changed from mas_user to bluemayne (existing user)
- Use postgresql-password secret (root password)
- Add CHAINLIT_DATABASE_URL for Chainlit compatibility
- Improved error handling in chainlit_app.py
- Create /root/.chainlit directory in Dockerfile to prevent FileExistsError
- Reduce replicas from 2 to 1 to conserve resources
- Lower CPU request from 500m to 100m (insufficient CPU on nodes)
- Lower memory request from 512Mi to 256Mi
- Remove health check probes (Chainlit doesn't have /health endpoint)