From 79886c0e5429c111a88e19afee9bb69699439128 Mon Sep 17 00:00:00 2001 From: Zia-Rashid Date: Tue, 21 Oct 2025 20:39:30 -0400 Subject: [PATCH 1/2] renamed GeorgeForeman, started prompts, got rid of stupid tool funcitons --- Sources/Dumpling/dumpling_fuzzilli.patch | 1 - Sources/FatherOfGeorge/BaseAgent.py | 84 ------------------- .../{GeorgeForeman.py => EBG.py} | 19 +++-- Sources/FatherOfGeorge/FoG.py | 30 +++---- Sources/FatherOfGeorge/prompts/FoG_prompt.txt | 9 ++ Sources/FatherOfGeorge/prompts/ebg_promp | 8 ++ Sources/FatherOfGeorge/prompts/root.txt | 0 7 files changed, 43 insertions(+), 108 deletions(-) rename Sources/FatherOfGeorge/{GeorgeForeman.py => EBG.py} (89%) create mode 100644 Sources/FatherOfGeorge/prompts/FoG_prompt.txt create mode 100644 Sources/FatherOfGeorge/prompts/ebg_promp delete mode 100644 Sources/FatherOfGeorge/prompts/root.txt diff --git a/Sources/Dumpling/dumpling_fuzzilli.patch b/Sources/Dumpling/dumpling_fuzzilli.patch index deb0b6770..b0e1bfa88 100644 --- a/Sources/Dumpling/dumpling_fuzzilli.patch +++ b/Sources/Dumpling/dumpling_fuzzilli.patch @@ -14,7 +14,6 @@ index 05e5dc1..540b552 100644 .target(name: "FuzzilliCli", dependencies: ["Fuzzilli"]), -- - .target(name: "FuzzILTool", + + .target(name: "RelateTool", diff --git a/Sources/FatherOfGeorge/BaseAgent.py b/Sources/FatherOfGeorge/BaseAgent.py index ff1976621..50f297a79 100644 --- a/Sources/FatherOfGeorge/BaseAgent.py +++ b/Sources/FatherOfGeorge/BaseAgent.py @@ -115,87 +115,3 @@ def _create_task_prompt(self, task_description: str, context: dict = None) -> st prompt += "\n" return prompt - - -# Tool definitions for different agent types -def get_manager_tools(): - """Tools available to manager agents.""" - return [ - # TODO: Add manager-specific tools - # - orchestrate_subagents - # - collect_results - # - make_decisions - # - validate_outputs - ] - -def get_code_analysis_tools(): - """Tools available to code analysis agents.""" - return [ - # TODO: Add code analysis tools - # - analyze_syntax - # - analyze_semantics - # - extract_patterns - # - identify_vulnerabilities - ] - -def get_retrieval_tools(): - """Tools available to retrieval agents.""" - return [ - # TODO: Add retrieval tools - # - query_rag_db - # - search_vector_db - # - retrieve_context - # - validate_information - ] - -def get_v8_search_tools(): - """Tools available to V8 search agents.""" - return [ - # TODO: Add V8 search tools - # - fuzzy_find - # - regex_search - # - compile_with_clang - # - test_with_python - # - view_call_graph - # - web_search - ] - -def get_program_builder_tools(): - """Tools available to program builder agents.""" - return [ - # TODO: Add program builder tools - # - query_postgres_db - # - generate_seed_program - # - combine_contexts - # - validate_syntax - ] - -def get_corpus_generation_tools(): - """Tools available to corpus generation agents.""" - return [ - # TODO: Add corpus generation tools - # - validate_syntax - # - validate_semantics - # - test_program - # - evaluate_interestingness - ] - -def get_runtime_analysis_tools(): - """Tools available to runtime analysis agents.""" - return [ - # TODO: Add runtime analysis tools - # - analyze_execution_state - # - check_coverage - # - evaluate_flags - # - determine_seed_quality - ] - -def get_validation_tools(): - """Tools available to validation agents.""" - return [ - # TODO: Add validation tools - # - validate_corpus - # - check_db_integrity - # - verify_results - # - quality_assurance - ] diff --git a/Sources/FatherOfGeorge/GeorgeForeman.py b/Sources/FatherOfGeorge/EBG.py similarity index 89% rename from Sources/FatherOfGeorge/GeorgeForeman.py rename to Sources/FatherOfGeorge/EBG.py index 055e408b8..42bcd1844 100644 --- a/Sources/FatherOfGeorge/GeorgeForeman.py +++ b/Sources/FatherOfGeorge/EBG.py @@ -1,14 +1,14 @@ #!/usr/bin/env python3 ''' -Child of the Father of George. Thus, George. +Ethiopian BG L1 Manager Agent - Verification and Testing Coordinator ''' from smolagents import LiteLLMModel, ToolCallingAgent -from BaseAgent import Agent, get_manager_tools, get_corpus_generation_tools, get_runtime_analysis_tools, get_validation_tools, get_code_analysis_tools +from BaseAgent import Agent -class George(Agent): +class EBG(Agent): """Verify and test seeds.""" def setup_agents(self): @@ -16,18 +16,19 @@ def setup_agents(self): self.agents['code_analyzer'] = ToolCallingAgent( name="CodeAnalyzer", description="L3 Worker responsible for analyzing code patterns, vulnerabilities, and specific components for runtime analysis", - tools=get_code_analysis_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[], max_steps=8, # Fewer steps than L1 CodeAnalyzer planning_interval=None, ) + #self.agents['vuln_analysis_agent'].prompt_templates["system_prompt"] = self.get_prompt("code_analysis_prompt") # and similar for other agents # L2 Worker: Corpus Generator (under George) self.agents['corpus_generator'] = ToolCallingAgent( name="CorpusGenerator", description="L2 Worker responsible for generating seeds from the corpus and validating syntax/semantics", - tools=get_corpus_generation_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[], max_steps=10, @@ -38,7 +39,7 @@ def setup_agents(self): self.agents['runtime_analyzer'] = ToolCallingAgent( name="RuntimeAnalyzer", description="L2 Manager responsible for analyzing program runtime, coverage, and execution state", - tools=get_runtime_analysis_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[ self.agents['code_analyzer'] @@ -51,7 +52,7 @@ def setup_agents(self): self.agents['corpus_validator'] = ToolCallingAgent( name="CorpusValidator", description="L2 Worker responsible for validating corpus integrity and quality", - tools=get_validation_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[], max_steps=8, @@ -62,7 +63,7 @@ def setup_agents(self): self.agents['db_analyzer'] = ToolCallingAgent( name="DBAnalyzer", description="L2 Worker responsible for analyzing PostgreSQL database for corpus, flags, coverage, and execution state", - tools=get_validation_tools(), # Reusing validation tools for DB analysis + tools=[], # Reusing validation tools for DB analysis model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[], max_steps=8, @@ -73,7 +74,7 @@ def setup_agents(self): self.agents['george_foreman'] = ToolCallingAgent( name="GeorgeForeman", description="L1 Manager responsible for verifying JavaScript programs for correctness and testing them to evaluate interestingness", - tools=get_manager_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5-mini", api_key=self.api_key), managed_agents=[ self.agents['corpus_generator'], diff --git a/Sources/FatherOfGeorge/FoG.py b/Sources/FatherOfGeorge/FoG.py index 4c07c14e6..773cfdfb3 100644 --- a/Sources/FatherOfGeorge/FoG.py +++ b/Sources/FatherOfGeorge/FoG.py @@ -3,20 +3,22 @@ from smolagents import LiteLLMModel, ToolCallingAgent -from BaseAgent import Agent, get_manager_tools, get_code_analysis_tools, get_program_builder_tools, get_retrieval_tools, get_v8_search_tools -from GeorgeForeman import George +from BaseAgent import Agent +from EBG import EBG from pathlib import Path class Father(Agent): def setup_agents(self): - - # L2 Worker: George Foreman - - self.agents['george_foreman'] = George( - model=self.model, - api_key=self.api_key, - anthropic_api_key=self.anthropic_api_key + # L2 Worker: EBG + self.agents['george_foreman'] = ToolCallingAgent( + name="GeorgeForeman", + description="L2 Worker responsible for generating JavaScript programs and fuzzing corpus", + tools=[], + model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), + managed_agents=[], + max_steps=10, + planning_interval=None, ) # L2 Worker: Reviwer of Code (under CodeAnalyzer) @@ -24,7 +26,7 @@ def setup_agents(self): self.agents['reviewer_of_code'] = ToolCallingAgent( name="ReviewerOfCode", description="L2 Worker responsible for reviewing code from various sources using RAG database", - tools=get_retrieval_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[ self.agents['george_foreman'] @@ -39,7 +41,7 @@ def setup_agents(self): self.agents['v8_search'] = ToolCallingAgent( name="V8Search", description="L2 Worker responsible for searching V8 source code using fuzzy find, regex, and compilation tools", - tools=get_v8_search_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[], max_steps=10, @@ -51,7 +53,7 @@ def setup_agents(self): self.agents['code_analyzer'] = ToolCallingAgent( name="CodeAnalyzer", description="L1 Manager responsible for analyzing code and coordinating retrieval and V8 search operations", - tools=get_code_analysis_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[ self.agents['retriever_of_code'], @@ -65,7 +67,7 @@ def setup_agents(self): self.agents['program_builder'] = ToolCallingAgent( name="ProgramBuilder", description="L1 Manager responsible for building program templates using corpus and context", - tools=get_program_builder_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5", api_key=self.api_key), managed_agents=[ self.agents['george_foreman'] @@ -78,7 +80,7 @@ def setup_agents(self): self.agents['father_of_george'] = ToolCallingAgent( name="FatherOfGeorge", description="L0 Root Manager responsible for orchestrating code analysis and program building operations", - tools=get_manager_tools(), + tools=[], model=LiteLLMModel(model_id="gpt-5-mini", api_key=self.api_key), managed_agents=[ self.agents['code_analyzer'], diff --git a/Sources/FatherOfGeorge/prompts/FoG_prompt.txt b/Sources/FatherOfGeorge/prompts/FoG_prompt.txt new file mode 100644 index 000000000..3e442c253 --- /dev/null +++ b/Sources/FatherOfGeorge/prompts/FoG_prompt.txt @@ -0,0 +1,9 @@ +# Role and Objective + +# Instructions + STAGE 1 + ... +CRITICAL RULES: + +CORRECT WORKFLOW: + diff --git a/Sources/FatherOfGeorge/prompts/ebg_promp b/Sources/FatherOfGeorge/prompts/ebg_promp new file mode 100644 index 000000000..8b68c404d --- /dev/null +++ b/Sources/FatherOfGeorge/prompts/ebg_promp @@ -0,0 +1,8 @@ +# Role and Objective + +# Instructions + STAGE 1 + ... +CRITICAL RULES: + +CORRECT WORKFLOW: diff --git a/Sources/FatherOfGeorge/prompts/root.txt b/Sources/FatherOfGeorge/prompts/root.txt deleted file mode 100644 index e69de29bb..000000000 From 9e9df5643c0c9caed351aa99dc47346d57c60f6d Mon Sep 17 00:00:00 2001 From: Zia-Rashid Date: Tue, 21 Oct 2025 20:44:31 -0400 Subject: [PATCH 2/2] renamed GeorgeForeman, started prompts, got rid of stupid tool funcitons --- Sources/FatherOfGeorge/BaseAgent.py | 2 +- Sources/FatherOfGeorge/EBG.py | 2 +- Sources/FatherOfGeorge/FoG.py | 2 +- Sources/FatherOfGeorge/prompts/FoG_prompt.txt | 2 ++ Sources/FatherOfGeorge/prompts/ebg_promp | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Sources/FatherOfGeorge/BaseAgent.py b/Sources/FatherOfGeorge/BaseAgent.py index 50f297a79..d296b9970 100644 --- a/Sources/FatherOfGeorge/BaseAgent.py +++ b/Sources/FatherOfGeorge/BaseAgent.py @@ -8,7 +8,7 @@ from smolagents import LiteLLMModel, ToolCallingAgent -class Agent(ABC): +class Agent(ABC): #a """Base class for AI agents.""" def __init__(self, model: LiteLLMModel, api_key: str = None, anthropic_api_key: str = None): diff --git a/Sources/FatherOfGeorge/EBG.py b/Sources/FatherOfGeorge/EBG.py index 42bcd1844..28cc4b143 100644 --- a/Sources/FatherOfGeorge/EBG.py +++ b/Sources/FatherOfGeorge/EBG.py @@ -8,7 +8,7 @@ from BaseAgent import Agent -class EBG(Agent): +class EBG(Agent): #a """Verify and test seeds.""" def setup_agents(self): diff --git a/Sources/FatherOfGeorge/FoG.py b/Sources/FatherOfGeorge/FoG.py index 773cfdfb3..811612aff 100644 --- a/Sources/FatherOfGeorge/FoG.py +++ b/Sources/FatherOfGeorge/FoG.py @@ -5,7 +5,7 @@ from smolagents import LiteLLMModel, ToolCallingAgent from BaseAgent import Agent from EBG import EBG -from pathlib import Path +from pathlib import Path #a class Father(Agent): diff --git a/Sources/FatherOfGeorge/prompts/FoG_prompt.txt b/Sources/FatherOfGeorge/prompts/FoG_prompt.txt index 3e442c253..be2265f6f 100644 --- a/Sources/FatherOfGeorge/prompts/FoG_prompt.txt +++ b/Sources/FatherOfGeorge/prompts/FoG_prompt.txt @@ -7,3 +7,5 @@ CRITICAL RULES: CORRECT WORKFLOW: + +f \ No newline at end of file diff --git a/Sources/FatherOfGeorge/prompts/ebg_promp b/Sources/FatherOfGeorge/prompts/ebg_promp index 8b68c404d..b1de0e658 100644 --- a/Sources/FatherOfGeorge/prompts/ebg_promp +++ b/Sources/FatherOfGeorge/prompts/ebg_promp @@ -6,3 +6,5 @@ CRITICAL RULES: CORRECT WORKFLOW: + +f \ No newline at end of file