This commit is contained in:
AI Christianson 2025-03-02 16:30:22 -05:00
parent 746649a1bb
commit 073c68d010
4 changed files with 4 additions and 18 deletions

View File

@ -610,9 +610,6 @@ def main():
memory=planning_memory,
config=config,
)
# Run cleanup tasks before exiting database context
run_cleanup()
except (KeyboardInterrupt, AgentInterrupt):
print()
@ -621,17 +618,5 @@ def main():
sys.exit(0)
def run_cleanup():
"""Run cleanup tasks after main execution."""
try:
# Import the key facts cleaner agent
from ra_aid.agents.key_facts_gc_agent import run_key_facts_gc_agent
# Run the key facts garbage collection agent regardless of the number of facts
run_key_facts_gc_agent()
except Exception as e:
logger.error(f"Failed to run cleanup tasks: {str(e)}")
if __name__ == "__main__":
main()

View File

@ -419,7 +419,7 @@ def run_research_agent(
project_info=formatted_project_info,
new_project_hints=NEW_PROJECT_HINTS if project_info.is_new else "",
)
config = _global_memory.get("config", {}) if not config else config
recursion_limit = config.get("recursion_limit", DEFAULT_RECURSION_LIMIT)
run_config = {

View File

@ -21,12 +21,12 @@ def format_key_fact(fact_id: int, content: str) -> str:
Example:
>>> format_key_fact(1, "This is an important fact")
'## 🔑 Key Fact #1\n\nThis is an important fact'
'## 🔑 Key Fact\n\nID: 1\n\nThis is an important fact'
"""
if not content:
return ""
return f"## 🔑 Key Fact #{fact_id}\n\n{content}"
return f"## 🔑 Key Fact\n\nID: {fact_id}\n\n{content}"
def format_key_facts_dict(facts_dict: Dict[int, str]) -> str:

View File

@ -58,6 +58,7 @@ You must:
You can use fuzzy file search to quickly find relevant files matching a search pattern.
Use ripgrep_search extensively to do *exhaustive* searches for all references to anything that might be changed as part of the base level task.
Prefer to use ripgrep_search with context params rather than reading whole files in order to preserve context tokens.
Call emit_key_facts on key information you discover about this project during your research. This is information you will be writing down to be able to efficiently complete work in the future, so be on the lookout for these and make it count.
You must not: