How do I wipe out memory?
What I want to do: wipe out both memory and vf_memory
Why: I want to loop back to an agent step, but have that step use new variable values. But apparently, when an agent step is first called, it generates an LLM session that persists permanently. Even if variable values have changed, the agent step sticks with the initial values the second time around. I can see this persistent approach being useful in some situations, but it is counterproductive in others.
Workarounds: Tico suggested duplicating the agent step, or ending the session, but these won't work for me. Duplicating it many times is not scalable. Ending the session means losing other client inputs and starting over.
What I tried: Followed Tico's advice to use a Set Expression step with 2 rows. See attached screenshots for its recommended workaround to wipe out memory
What happened: vf_memory gets wiped out, but memory still retains full history
What debug log shows: There is a Debug row saying [Set] 1 variable changed. Variables tab shows vf_memory being wiped out, but memory still is retained
How can I wipe out memory? If I can't loop back to an agent step with a clean session, I think I will have to overhaul my project design (yes I'm an idiot for not discovering this foundational problem earlier)



1 Reply
hm, I will try another workaround: adding more (placeholder) items into memory as a way to push out the earlier items. if that doesn't let the agent step start anew when called a second time, then finding a way to wipe out memory won't matter!
1. good news that adding placeholder items into memory as a way to force out older items does let the agent step start anew when called a second time
2. i understand that i can add new items into memory by having the assistant and the user exchange pointless messages back and forth, or by having the LLM issue function-calls and function-results, but all these use credits unnecessarily
3. so i'm still wondering how to wipe out memory in a more efficient way - preferably by setting it to an empty value (as attempted above), but if not, then by adding placeholder items in a different way