Skip to content

Commit c24d412

Browse files
taruntarun
authored andcommitted
pushing minmal AI changes
1 parent e570e56 commit c24d412

2 files changed

Lines changed: 22 additions & 10 deletions

File tree

Sources/FatherOfGeorge/FoG.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
#!/usr/bin/env python3
2-
"""
3-
Father of George, and thus George the negative First.
4-
L0 Root Manager Agent - Orchestrates Code Analysis and Program Building
5-
"""
2+
3+
64

75
from smolagents import LiteLLMModel, ToolCallingAgent
86
from BaseAgent import Agent, get_manager_tools, get_code_analysis_tools, get_program_builder_tools, get_retrieval_tools, get_v8_search_tools
97
from GeorgeForeman import George
8+
from pathlib import Path
109

1110

1211
class Father(Agent):
13-
"""Init code analysis and program builder."""
14-
1512
def setup_agents(self):
13+
1614
# L2 Worker: George Foreman
15+
1716
self.agents['george_foreman'] = George(
1817
model=self.model,
1918
api_key=self.api_key,
2019
anthropic_api_key=self.anthropic_api_key
2120
)
2221

23-
# L2 Worker: Retriever of Code (under CodeAnalyzer)
24-
self.agents['retriever_of_code'] = ToolCallingAgent(
25-
name="RetrieverOfCode",
26-
description="L2 Worker responsible for retrieving code from various sources using RAG database",
22+
# L2 Worker: Reviwer of Code (under CodeAnalyzer)
23+
24+
self.agents['reviewer_of_code'] = ToolCallingAgent(
25+
name="ReviewerOfCode",
26+
description="L2 Worker responsible for reviewing code from various sources using RAG database",
2727
tools=get_retrieval_tools(),
2828
model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key),
2929
managed_agents=[
3030
self.agents['george_foreman']
3131
],
3232
max_steps=10,
3333
planning_interval=None,
34+
system_prompt=self.get_prompt('reviewer_of_code.txt'),
3435
)
3536

3637
# L2 Worker: V8 Search (under CodeAnalyzer)
38+
3739
self.agents['v8_search'] = ToolCallingAgent(
3840
name="V8Search",
3941
description="L2 Worker responsible for searching V8 source code using fuzzy find, regex, and compilation tools",
@@ -45,6 +47,7 @@ def setup_agents(self):
4547
)
4648

4749
# L1 Manager: Code Analysis Agent
50+
4851
self.agents['code_analyzer'] = ToolCallingAgent(
4952
name="CodeAnalyzer",
5053
description="L1 Manager responsible for analyzing code and coordinating retrieval and V8 search operations",
@@ -84,6 +87,13 @@ def setup_agents(self):
8487
max_steps=20,
8588
planning_interval=None,
8689
)
90+
91+
92+
def get_prompt(self, prompt_name: str) -> str:
93+
f = open(Path(__file__).parent / "prompts" / prompt_name, 'r')
94+
prompt = f.read()
95+
f.close()
96+
return prompt
8797

8898

8999
def run_task(self, task_description: str, context: dict = None) -> dict:
@@ -96,6 +106,8 @@ def run_task(self, task_description: str, context: dict = None) -> dict:
96106
return results
97107

98108

109+
110+
99111
def main():
100112
# Init model
101113
model = LiteLLMModel(

Sources/FatherOfGeorge/prompts/root.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)