Hey everyone, I've been trying to integrate OpenClaw's external search functionality into a simple proof-of-concept AI agent I'm building, and I'm hitting a consistent issue. Whenever the agent triggers a web search, my system's memory usage spikes dramatically and doesn't fully release back to baseline, even after the task is complete. It's like each search leaves a bit of memory "stuck."
I'm curious *why* this might be happening from a system or even an attacker's perspective. Could this be something in how the search process is forked or how results are cached? Or is this more about the libraries underneath? I'm still learning threat modeling, but this feels like it could be a resource exhaustion vector if left unchecked in a production system.
My basic setup looks like this:
```python
from openclaw import ClawAgent
agent = ClawAgent(tools=['web_search'])
# A simple loop asking for summaries on different topics
for topic in topic_list:
response = agent.run(f"Summarize the latest news about {topic}")
print(response[:200])
```
The memory climbs with each iteration. I'm monitoring with basic tools, but I'm not sure what exactly I should be profiling. Is the search tool spawning subprocesses that aren't being cleaned up? Why would a design choose to keep memory allocated?
Appreciate any pointers.