|
2 | 2 |
|
3 | 3 | # NOTE: SWITCH TO ADK WEB or COMMENT OUT FOR ADK RUN |
4 | 4 |
|
| 5 | +import logging |
| 6 | + |
5 | 7 | from google.adk.agents import Agent |
6 | 8 |
|
7 | 9 | # from google.adk.runtime.executors import SequentialExecutor |
8 | 10 | # from google.adk.runtime.planner import SequentialPlanner |
9 | 11 | # Use relative imports from the 'software_engineer' sibling directory |
10 | 12 | from . import prompt |
| 13 | +from .sub_agents.code_quality.agent import code_quality_agent |
11 | 14 | from .sub_agents.code_review.agent import code_review_agent |
12 | 15 | from .sub_agents.debugging.agent import debugging_agent |
13 | 16 | from .sub_agents.design_pattern.agent import design_pattern_agent |
14 | 17 | from .sub_agents.devops.agent import devops_agent |
15 | 18 | from .sub_agents.documentation.agent import documentation_agent |
16 | 19 | from .sub_agents.testing.agent import testing_agent |
| 20 | + |
| 21 | +# Import the code search tool from the new location |
| 22 | +from .tools import codebase_search_tool |
| 23 | +from .tools.filesystem import ( |
| 24 | + configure_approval_tool as configure_edit_approval_tool, |
| 25 | +) |
17 | 26 | from .tools.filesystem import ( |
18 | | - configure_approval_tool, |
19 | 27 | edit_file_tool, |
20 | 28 | list_dir_tool, |
21 | 29 | read_file_tool, |
22 | 30 | ) |
| 31 | + |
| 32 | +# Import memory tools |
| 33 | +# from .tools.memory import forget_tool, memorize_list_tool, memorize_tool |
23 | 34 | from .tools.project_context import load_project_context |
24 | 35 | from .tools.search import google_search_grounding |
25 | 36 |
|
26 | 37 | # Updated import for shell command tools |
27 | 38 | from .tools.shell_command import ( |
28 | | - check_shell_command_safety, |
29 | | - configure_shell_approval, |
30 | | - configure_shell_whitelist, |
31 | | - execute_vetted_shell_command, |
| 39 | + check_command_exists_tool, |
| 40 | + check_shell_command_safety_tool, |
| 41 | + configure_shell_approval_tool, |
| 42 | + configure_shell_whitelist_tool, |
| 43 | + execute_vetted_shell_command_tool, |
32 | 44 | ) |
33 | | -from .tools.system_info import check_command_exists, get_os_info |
| 45 | +from .tools.system_info import get_os_info_tool |
| 46 | + |
| 47 | +logger = logging.getLogger(__name__) |
| 48 | + |
| 49 | +# Note: Using custom ripgrep-based codebase search in tools/code_search.py |
34 | 50 |
|
35 | 51 | # REF: https://ai.google.dev/gemini-api/docs/rate-limits |
36 | 52 | root_agent = Agent( |
37 | | - model="gemini-2.5-flash-preview-04-17", # "gemini-2.5-pro-exp-03-25", #"gemini-2.0-flash-001", |
| 53 | + model="gemini-2.5-flash-preview-04-17", |
38 | 54 | name="root_agent", |
39 | 55 | description="An AI software engineer assistant that helps with various software development tasks", |
40 | 56 | instruction=prompt.ROOT_AGENT_INSTR, |
|
45 | 61 | debugging_agent, |
46 | 62 | documentation_agent, |
47 | 63 | devops_agent, |
| 64 | + code_quality_agent, |
48 | 65 | ], |
49 | 66 | tools=[ |
50 | | - google_search_grounding, |
51 | 67 | read_file_tool, |
52 | 68 | list_dir_tool, |
53 | 69 | edit_file_tool, |
54 | | - configure_approval_tool, |
55 | | - get_os_info, |
56 | | - check_command_exists, |
57 | | - configure_shell_approval, |
58 | | - configure_shell_whitelist, |
59 | | - check_shell_command_safety, |
60 | | - execute_vetted_shell_command, |
| 70 | + configure_edit_approval_tool, |
| 71 | + check_command_exists_tool, |
| 72 | + check_shell_command_safety_tool, |
| 73 | + configure_shell_approval_tool, |
| 74 | + configure_shell_whitelist_tool, |
| 75 | + execute_vetted_shell_command_tool, |
| 76 | + google_search_grounding, |
| 77 | + codebase_search_tool, |
| 78 | + get_os_info_tool, |
| 79 | + # memorize_tool, |
| 80 | + # memorize_list_tool, |
| 81 | + # forget_tool, |
61 | 82 | ], |
62 | 83 | before_agent_callback=load_project_context, |
| 84 | + output_key="software_engineer", |
63 | 85 | ) |
0 commit comments