Does Agentforce Remember Between Scheduled Runs?
An Agentforce agent keeps context and custom variables for one conversation, then the session closes and they are gone.
AI Stella and Liam are AI hosts with AI-generated voices. About our AI hosts
Key takeaways
- Agentforce keeps two kinds of state, context variables and custom variables, and both end when the session ends.
- The CRM and Data Cloud are the agent's data source, not its memory: it knows the customer but not what it learned last night.
- A scheduled run starts blank every time, so run one hundred is as blind as run one and you pay full token price again.
- Salesforce's long-horizon runtime adds memory across sessions; it is in pilot now, with general availability expected in November 2026.
- Today you can give a scheduled agent memory with Vilix AI: get_context before the run, save_turn after, newest memory wins.
Show notes
An Agentforce agent keeps context and custom variables for one conversation, then the session closes and they are gone. In this episode of Agentic Pod, Liam and Stella explain what Agentforce does remember, why a CRM is its data source and not its memory, why every scheduled run starts blank, what Salesforce’s long-horizon runtime (pilot now, general availability expected November 2026) changes, and how to give a scheduled agent memory today with Vilix AI using get_context and save_turn.
What we cover:
- What Agentforce keeps inside one session: context variables and custom variables
- Why the CRM is the agent’s data source, not its memory
- The nightly run that starts blank, and what that costs in tokens
- Salesforce’s long-horizon runtime: pilot now, general availability expected in November 2026
- How Vilix AI fixes it: get_context before the run, save_turn after, newest memory wins, source labels
- Project rules and the agency angle: one Vilix AI account per client
Chapters
Questions answered in this episode
Does Agentforce remember between scheduled runs?
Inside one session it keeps context and custom variables. When the session closes they are gone, so a nightly run starts without what the last run learned.
Is the CRM the agent's memory?
No. The CRM and Data Cloud are its data source. They hold deal and customer facts, not the agent's own judgment.
What is Salesforce's long-horizon runtime?
A runtime with memory across sessions, durable execution and mid-flight steering. It is in pilot, with general availability expected in November 2026.
How do I give a scheduled agent memory today?
Connect it to Vilix AI over MCP, call get_context at the start of a run and save_turn at the end. The guide linked on this page has the prompts.
Links & resources
Full transcript
Intro
Hey hey hey, welcome to Agentic Pod! I'm Liam.
And I'm Stella! Liam, my Agentforce agent runs every night. So what did it learn this week?
Probably nothing. Not because you set it up wrong. Inside one conversation, Agentforce remembers plenty. Then the session closes and all of it is gone.
All of it? That's a bold claim.
Today: what it keeps, what it drops, and how Vilix AI gives a scheduled agent a memory that survives the night.
Okay. I'm listening, with my tiny nightly robot in mind.
What Agentforce does remember
Fair, so what does it keep? It feels smart in a chat.
It is smart in a chat. Salesforce gives builders two kinds of state. Context variables come from the messaging session, like pre-chat form data, and they're set when the session starts.
And the second kind?
Custom variables. They hold action outputs. Did the customer authenticate, what a lookup returned, which topics are unlocked. Together, one conversation hangs together nicely.
So where's the problem?
Both are session state. By design, when the conversation ends, they end too.
But in demos it knows my customer. The account, the open cases.
That's the trap. It read Salesforce. The CRM and Data Cloud are its data source. That's knowing the customer, not remembering the work.
Huh. What's the difference, in practice?
The nightly run that starts blank
Picture a nightly pipeline review. It flags at-risk deals. On Tuesday it works out that deals mentioning one competitor always stall after the second call.
Nice. A real insight.
Where does that insight live? Not in a variable, not in the chat, and not in the CRM. The CRM stores deal facts, not the agent's judgment.
So Wednesday, it starts fresh.
Yep. Run one hundred is exactly as blind as run one. And you pay full token price for reasoning it already did.
That's like hiring a new intern every night. A very expensive intern.
With a great memory for spreadsheets and none for lessons. And here's the twist. Salesforce sees this gap.
Oh? They're fixing it?
They announced a long-horizon runtime. Memory across sessions, durable execution, and steering mid-flight. Hunter, the outbound sales agent, runs on it first.
Great! So I just wait?
It's in pilot now, with general availability expected in November twenty twenty-six, and more agents coming later. So what do you do tonight?
The fix: Vilix AI as the agent's memory
You give the agent a memory outside any one platform. That's Vilix AI. Before the run starts, the agent calls get_context with what it's about to do.
And what comes back?
What earlier runs learned. The competitor pattern, the exceptions, the last decisions. Then, before the run ends, it calls save_turn with the working knowledge, not a summary.
And Vilix AI keeps the full conversation, not just extracted facts?
Right. So a run can revisit what was actually said and decided. And every save carries a source label, so you see which agent wrote what.
What if it learned something wrong?
Newest memory wins. Tuesday's fix beats Monday's guess. Failed attempts get saved too, so tomorrow's run doesn't retry a dead end.
So run one hundred stands on the other ninety-nine.
Exactly. And it works wherever the agent lives. Agentforce, n8n, Claude Code, a cron job. Same Vilix AI account, one shared memory over MCP.
Rules too? Like, always flag the competitor deals first?
Project rules. Write them once in Vilix AI, and every agent reads them at the start. Skills, same idea, for procedures you want repeated.
Okay. But what about agencies, with a different client every week?
Setup, and the client angle
That's my favorite use. One Vilix AI account per client. Like a Gmail account that belongs to them. Every agent you build for that client connects with that account's key.
So the memory belongs to the client's business, not to my laptop.
And you never build memory from scratch. It's already built. You wire it up.
How long does the setup take?
The Vilix AI guide has the prompts and the get_context and save_turn steps. The free plan is free forever, and there's a seven-day Pro trial with no credit card.
And my data?
Portable. Export it or wipe it anytime. So the short version: Salesforce is building session-spanning memory for one agent, in a pilot. Your scheduled agents can't wait for a roadmap.
Give them a memory tonight.
Exactly. Vilix AI, the guide, and the blog post are in the description. What did your scheduled agent forget this week? Tell us in the comments. See you next time!