Skip to content

Commit e11d5fc

Browse files
author
server
committed
I am sory
1 parent b5357f9 commit e11d5fc

3,157 files changed

Lines changed: 4700 additions & 75954 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ProgramTemplates.swift
1717
ProgramTemplateWeights.swift
1818
fog_logs/
1919
ebg_logs/
20+
Sources/Agentic_System/agent_memory/
2021
.gemini/
2122
crashes/
2223
folder*/
@@ -29,3 +30,4 @@ package-lock.json
2930

3031
# V8 build directory for testing
3132
v8_build_test/
33+
.__pycache__/*

Sources/Agentic_System/IkaCore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit ec4aa7827e640bfeed48f90ba1d864f0bf3e0f12
1+
Subproject commit 827966bc9d9f541a427d7bfe3e4d54eab552644b

Sources/Agentic_System/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
- `FUZZILLI_TOOL_BIN` => points to the FuzzILTool binary, typically under .build in Fuzzilli's root
77
- `FUZZILLI_PATH` => points to Fuzzilli's root directory, where you land after cloning and cd'ing into the repo
88
3. Put your OpenAI key into a `keys.cfg` in Sources/Agentic_System
9-
4. Replace the smolagents site-packaged located in `.venv/lib/python3.12/site-packages` or similar with the provided fork of smolagents<br>
10-
You can simply remove the existing smolagents in site-packages and move + rename the fork as `smolagents`
11-
5. run `python3 start_scripts/rises-the-fog.py (--debug)`
9+
4. run `python3 start_scripts/rises-the-fog.py (--debug)`
1210

1311
### Technical flow
1412
#### The first multi agent system is implemented and starts by initializing a root manager whose goal is to actually orchestrate the creation of program templates. It starts by selecting a "code region" that it determines to be interesting; this is done by querying a RAG DB (json file) that contains over 8000 regression tests, their FuzzIL form, and execution data via trace flags. We instruct the system to select a code region by using the execution data. On top of that, the system has access to a vector RAG DB with: V8 docs, JS MDM docs, C++ docs, and various research papers that it can query to gather more information. The vectorization library we use is META’s FAISS -"Facebook AI Similarity Search". After this is done it will select a code region such as: "Keyed array element access & elements-kind transitions (KeyedStoreIC/KeyedLoadIC, ElementsTransition, GrowElements/CopyElements, and Array builtin fast paths)".
1513

14+
### RAG layout
15+
16+
- `RAG/data_sources/knowlage_docs`: crawled and curated text sources used to build the vector stores
17+
- `RAG/meta_data`: FAISS indexes, metadata json, model files, and legacy Chroma leftovers
18+
- `RAG/util-scripts`: crawlers, HTML conversion, and index build/query helper scripts
19+
20+
The old top-level `knowlage_docs` path is kept as a compatibility symlink, but `RAG/` is now the canonical location.
21+
1622

1723
#### From there we run a code analysis agent whose goal is to actually figure out what the code region looks like in the V8 code base and give back an in depth analysis of the code region - functions / files that are deemed "interesting". We give the V8 search agent, who is responsible for querying and searching through the source code, a variety of tools like ripgrep, fuzzyfinder, and sed in order to read files. This agent will create a run-time RAG in order to store interesting code chunks. We use tool calls that create controlled, structured json in order to create the runtime RAG that gets used between agents. After V8 search completes and generates a list of relevant database entries linked to the initial code region, the code analysis stage compiles a comprehensive summary of the codebase and its functions. It then sends a detailed explanation - along with supporting code snippets - to the verification agent. Once the response is verified, the finalized version is returned to the root manager.
1824

Sources/Agentic_System/agents/EBG_crash.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from agents.BaseAgent import Agent
1919
from IkaCore.agents import IkaBaseAgent
20-
from tools.EBG_tools_ika import (
20+
from tools.EBG_tools import (
2121
base64_program_to_js_tool,
2222
db_query_tool,
2323
db_list_programs_tool,
@@ -51,22 +51,22 @@
5151
pwndbg_nearpc_tool,
5252
read_file_tool,
5353
)
54-
from tools.FoG_tools_ika import (
54+
from tools.FoG_tools import (
5555
fuzzy_finder_tool,
5656
ripgrep_tool,
5757
tree_tool,
5858
get_realpath_tool,
5959
execute_javascript_program_tool,
6060
list_d8_flags_tool,
6161
)
62-
from tools.common_tools_ika import (
62+
from tools._shared import (
6363
get_cfg_for_tool,
6464
get_call_graph_hashmap_tool,
6565
find_functions_by_simple_name_tool,
6666
find_functions_by_fully_qualified_name_tool,
6767
get_call_graph_node_tool,
6868
)
69-
from tools.FoG_tools_ika import read_rag_db_id_tool, write_rag_db_id_tool, get_runtime_db_ids_tool
69+
from tools.FoG_tools import read_agent_memory_tool, write_agent_memory_tool, list_agent_memory_ids_tool
7070
from config_loader import get_openai_api_key, get_anthropic_api_key, get_deepseek_api_key, get_openrouter_api_key
7171
from tools.FoG_tools import get_v8_path
7272

@@ -129,11 +129,11 @@ def setup_agents(self, crash_program_hash: Optional[str] = None):
129129
fuzzy_finder_tool,
130130
ripgrep_tool,
131131
tree_tool,
132-
read_rag_db_id_tool,
133-
write_rag_db_id_tool,
132+
read_agent_memory_tool,
133+
write_agent_memory_tool,
134134
read_file_tool,
135135
get_realpath_tool,
136-
get_runtime_db_ids_tool,
136+
list_agent_memory_ids_tool,
137137
get_cfg_for_tool,
138138
get_call_graph_hashmap_tool,
139139
find_functions_by_simple_name_tool,

Sources/Agentic_System/agents/EBG_plateau.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from agents.BaseAgent import Agent
88
from IkaCore.agents import IkaBaseAgent
99
from pathlib import Path
10-
from tools.EBG_tools_ika import (
10+
from tools.EBG_tools import (
1111
base64_program_to_js_tool,
1212
db_query_tool,
1313
db_list_programs_tool,
@@ -42,20 +42,20 @@
4242
db_store_generated_program_tool,
4343
read_file_tool,
4444
)
45-
from tools.rag_tools_ika import search_v8_source_rag_tool, search_v8_source_rag_hybrid_tool, get_v8_source_rag_doc_tool
45+
from tools.RAG_tools import search_v8_source_rag_tool, search_v8_source_rag_hybrid_tool, get_v8_source_rag_doc_tool
4646
from config_loader import get_openai_api_key, get_anthropic_api_key, get_deepseek_api_key
47-
from tools.FoG_tools_ika import (
47+
from tools.FoG_tools import (
4848
fuzzy_finder_tool,
4949
ripgrep_tool,
5050
tree_tool,
5151
get_realpath_tool,
5252
execute_javascript_program_tool,
5353
list_d8_flags_tool,
54-
read_rag_db_id_tool,
55-
write_rag_db_id_tool,
56-
get_runtime_db_ids_tool,
54+
read_agent_memory_tool,
55+
write_agent_memory_tool,
56+
list_agent_memory_ids_tool,
5757
)
58-
from tools.common_tools_ika import (
58+
from tools._shared import (
5959
get_cfg_for_tool,
6060
get_call_graph_hashmap_tool,
6161
find_functions_by_simple_name_tool,
@@ -108,11 +108,11 @@ def setup_agents(self, fuzzer_id: Optional[str] = None):
108108
fuzzy_finder_tool,
109109
ripgrep_tool,
110110
tree_tool,
111-
read_rag_db_id_tool,
112-
write_rag_db_id_tool,
111+
read_agent_memory_tool,
112+
write_agent_memory_tool,
113113
read_file_tool,
114114
get_realpath_tool,
115-
get_runtime_db_ids_tool,
115+
list_agent_memory_ids_tool,
116116
get_cfg_for_tool,
117117
get_call_graph_hashmap_tool,
118118
find_functions_by_simple_name_tool,

Sources/Agentic_System/agents/FoG.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from agents.BaseAgent import Agent
44
from IkaCore.agents import IkaBaseAgent
55
from pathlib import Path
6-
from tools.FoG_tools_ika import (
6+
from tools.FoG_tools import (
77
run_python_tool,
88
get_v8_path_tool,
99
get_realpath_tool,
@@ -13,9 +13,9 @@
1313
read_file_tool,
1414
lift_fuzzil_to_js_tool,
1515
compile_js_to_fuzzil_tool,
16-
write_rag_db_id_tool,
17-
read_rag_db_id_tool,
18-
get_runtime_db_ids_tool,
16+
write_agent_memory_tool,
17+
read_agent_memory_tool,
18+
list_agent_memory_ids_tool,
1919
search_js_file_name_by_pattern_tool,
2020
get_js_entry_data_by_name_tool,
2121
get_all_js_file_names_tool,
@@ -43,7 +43,7 @@
4343
list_d8_flags_tool,
4444
remove_old_javascript_programs_tool,
4545
)
46-
from tools.rag_tools_ika import (
46+
from tools.RAG_tools import (
4747
search_knowledge_base_tool,
4848
search_knowledge_base_hybrid_tool,
4949
get_knowledge_doc_tool,
@@ -53,7 +53,7 @@
5353
search_chromium_issues_rag_tool,
5454
search_chromium_issues_rag_hybrid_tool,
5555
)
56-
from tools.common_tools_ika import (
56+
from tools._shared import (
5757
web_search_tool,
5858
get_cfg_for_tool,
5959
get_call_graph_hashmap_tool,
@@ -86,8 +86,8 @@ def setup_agents(self):
8686
similar_template_swift_tool,
8787
similar_template_fuzzil_tool,
8888
web_search_tool,
89-
read_rag_db_id_tool,
90-
get_runtime_db_ids_tool,
89+
read_agent_memory_tool,
90+
list_agent_memory_ids_tool,
9191
search_knowledge_base_tool,
9292
search_knowledge_base_hybrid_tool,
9393
get_knowledge_doc_tool,
@@ -168,11 +168,11 @@ def setup_agents(self):
168168
fuzzy_finder_tool,
169169
ripgrep_tool,
170170
tree_tool,
171-
read_rag_db_id_tool,
172-
write_rag_db_id_tool,
171+
read_agent_memory_tool,
172+
write_agent_memory_tool,
173173
read_file_tool,
174174
get_realpath_tool,
175-
get_runtime_db_ids_tool,
175+
list_agent_memory_ids_tool,
176176
get_cfg_for_tool,
177177
get_call_graph_hashmap_tool,
178178
find_functions_by_simple_name_tool,
@@ -199,11 +199,11 @@ def setup_agents(self):
199199
search_knowledge_base_tool,
200200
search_knowledge_base_hybrid_tool,
201201
get_knowledge_doc_tool,
202-
read_rag_db_id_tool,
202+
read_agent_memory_tool,
203203
search_v8_source_rag_tool,
204204
search_v8_source_rag_hybrid_tool,
205205
get_v8_source_rag_doc_tool,
206-
get_runtime_db_ids_tool,
206+
list_agent_memory_ids_tool,
207207
search_chromium_issues_rag_tool,
208208
search_chromium_issues_rag_hybrid_tool,
209209
],

0 commit comments

Comments
 (0)