Skip to content

100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.

feat: enable compress_tool_results to prevent context overflow on large investigations

cyw8d7afdf913f5
diff --git a/advanced_ai_agents/single_agent_apps/ai_fraud_investigation_agent/fraud_investigation_agent.py b/advanced_ai_agents/single_agent_apps/ai_fraud_investigation_agent/fraud_investigation_agent.py
index ff0046c7..1e0af444 100644
--- a/advanced_ai_agents/single_agent_apps/ai_fraud_investigation_agent/fraud_investigation_agent.py
+++ b/advanced_ai_agents/single_agent_apps/ai_fraud_investigation_agent/fraud_investigation_agent.py
@@ -889,6 +889,7 @@ elif investigate_btn and openrouter_key:
],
markdown=True,
show_tool_calls=True,
+ compress_tool_results=True, # Auto-compresses large tool responses to prevent context overflow
)
except Exception as exc:
st.error(f"Failed to initialize agent: {exc}")