The Three Core Capabilities Behind Long-Horizon Agents
Long-Horizon Agents rely on three important capabilities:
- Memory
- Durable Execution
- Dynamic Steering
Let’s understand each one using a simple Salesforce Sales Cloud example.
How does this help in Salesforce?
A Sales Cloud implementation might use information from:
- Account and Contact records.
- Opportunity records.
- Previous sales interactions.
- Customer requirements and preferences.
- Previous activities and follow-up outcomes.
- Important decisions made during customer discussions.
It is important to understand that Salesforce CRM data and agent memory are not exactly the same thing.
CRM records store structured business information. Agent memory helps preserve relevant context and progress that the agent needs when continuing its work.
For example:
| CRM Data |
Agent Memory / Context |
| Account name |
Customer is interested in enterprise solutions |
| Opportunity amount |
Estimated budget is ₹20 lakh |
| Opportunity stage |
Product demonstration completed |
| Contact details |
Main decision-maker is the IT Director |
| Activity records |
Customer requested a proposal review next week |
The agent can combine relevant business data with remembered context to make better decisions.
Key takeaway: Memory reduces repeated conversations and helps an agent maintain continuity across multiple interactions.
Durable Execution – Continuing Work Without Starting Again
Memory helps an agent remember information. But remembering information alone is not enough.An agent also needs to know what it was doing, what has already been completed, and what needs to happen next.
This is where Durable Execution becomes important.
Think of it like saving your progress in a video game.
Imagine you have completed five levels. Suddenly, your system shuts down. When you return, you don’t want to start from level one.
You want to continue from where you stopped.
Durable Execution follows a similar idea for long-running agent tasks.
Let’s continue with our sales opportunity example.
The agent has the following execution plan:
- Identify at-risk sales opportunities.
- Analyze previous customer interactions.
- Prepare a personalized outreach plan.
- Coordinate a product demonstration.
- Follow up after the demonstration.
- Help the sales representative progress the opportunity toward closure.
Suppose the agent completes the first three steps, but the customer postpones the product demonstration.
The agent should not unnecessarily repeat all the completed activities.
It needs to preserve execution progress and continue when the next action becomes appropriate.
How does this help in Salesforce?
Consider an Opportunity in Salesforce with the following sales journey:
- Opportunity identified.
- Customer requirements collected.
- Product demonstration scheduled.
- Product demonstration completed.
- Proposal shared.
- Negotiation in progress.
- Deal closed.
The agent can use the relevant Salesforce records and its execution state to determine what has already happened and what needs attention.
It can also use Salesforce actions, such as Flow, Apex, and external integrations, to perform specific business operations.
For example, if the customer postpones the proposal discussion, the agent can adjust the next follow-up activity rather than restarting the entire sales process.
Important distinction: Durable Execution is not simply another name for a Scheduled Flow or a Record-Triggered Flow.
Salesforce Flows and Apex can already automate scheduled and event-driven operations. Durable Execution addresses the additional challenge of preserving an agent’s ongoing plan and execution progress across a long-running task.
Key takeaway: Durable Execution helps an agent continue working toward its goal without unnecessarily restarting the entire process.
Dynamic Steering – Adapting When Things Change
Business processes rarely follow a perfectly defined path.
Customers change their minds. Employees provide new instructions. Opportunities become more or less important. Unexpected situations occur.
An AI agent must be able to adapt.
This is where Dynamic Steering comes into the picture.
Let’s continue with our sales opportunity example.
The customer initially agrees to purchase a software solution.
The agent creates a plan:
- Follow up with the customer.
- Share the commercial proposal.
- Coordinate internal approvals.
- Schedule a final discussion.
- Help progress the opportunity toward closure.
However, after reviewing the proposal, the customer says:
“Our budget has changed. Can you suggest a different package within our revised budget?”
The original plan is no longer completely relevant.
The agent needs to adjust its approach based on the new instruction.
Another example comes from Salesforce’s Hunter sales agent.
Suppose Hunter is working to re-engage an at-risk opportunity. It sends an email, but the email bounces because the contact is out of the office.
Instead of blindly continuing with the original plan, Hunter can investigate an alternative contact, prepare a revised outreach message, and request approval when the change requires it.
This is an example of adapting the execution plan based on new circumstances.
How does this help in Salesforce?
In a business implementation, dynamic steering could help agents respond to:
- Changes in customer requirements.
- Updated opportunity priorities.
- New instructions from sales representatives.
- Changes in budget or purchase timelines.
- Unexpected errors during business operations.
It is important to remember that adapting a plan does not mean ignoring business rules.
For example, an agent should not automatically approve a discount or modify commercial terms simply because a customer requests it.
Business rules, permissions, approval requirements, and human oversight must still be respected.
Key takeaway: Dynamic Steering allows an agent to adjust its behavior as business requirements and circumstances evolve.
How Do These Capabilities Work Together?
Now that we understand the three capabilities individually, let’s see how they work together.
Consider a company that wants to improve its sales conversion rate.
A sales manager gives an agent the following goal:
“Help me re-engage at-risk sales opportunities before the end of this quarter.”
The agent begins working toward this objective.
Step 1: Understand the Goal
The agent receives the objective and analyzes the available business context.
It may review:
- Open Opportunities.
- Opportunity stages.
- Customer interactions.
- Previous activities.
- Relevant engagement information.
Step 2: Create an Execution Plan
The agent identifies opportunities that require attention and creates a plan.
For example:
| Opportunity |
Next Action |
| Enterprise Deal A |
Follow-up email |
| Enterprise Deal B |
Schedule a customer call |
| Enterprise Deal C |
Share revised proposal |
| Enterprise Deal D |
Request sales representative review |
Step 3: Execute the Plan
The agent starts performing the required tasks using its available tools and actions.
For example, it may prepare an email, update an activity, or retrieve additional opportunity information.
Step 4: Maintain Memory and Progress
As the agent works, it needs to retain relevant context and track what has already been completed.
This prevents it from repeatedly performing the same activities.
Step 5: Adapt to Changes
Suppose Enterprise Deal A does not respond.
The agent may adjust the follow-up approach according to its instructions and business rules.
If an action requires approval, it requests human intervention instead of proceeding independently.
Step 6: Continue Until the Goal Is Reached
The agent continues working toward the objective, incorporating new information and adjusting its plan as required.
This is where all three capabilities become important.
| Capability |
Role in the Process |
| Memory |
Remembers relevant customer context and previous progress |
| Durable Execution |
Preserves the plan and supports continued execution |
| Dynamic Steering |
Adjusts the plan when new information or instructions arrive |
The three capabilities work together to help an AI agent manage a business objective that extends beyond a single conversation.
How Does This Connect With the Salesforce Platform?
Long-Horizon Agents are not separate from the Salesforce ecosystem.
They can work with the business data, tools, and security capabilities available within the Salesforce platform.
Let’s understand some important connections.
5.1 Salesforce CRM Data
TSalesforce CRM provides structured business information.
For example:
- Account and Contact records.
- Leads and Opportunities.
- Products and Price Books.
- Activities and Tasks.
- Custom objects.
In a sales implementation, the agent could use customer, opportunity, and activity information to understand the current sales journey.
5.2 Data 360
Sometimes, CRM records alone may not provide the complete customer picture.
Data 360 can help bring together relevant customer information from different sources.
For example, the agent may benefit from additional customer engagement signals, such as website interactions or other connected data.
This can help the agent make more informed decisions when prioritizing follow-ups.
5.3 Salesforce Flow and Apex
An agent needs tools to perform business operations.
This is where Salesforce Flow and Apex become useful.
For example:
| Requirement |
Possible Salesforce Tool |
| Retrieve opportunity information |
Flow or Apex |
| Create a follow-up Task |
Flow |
| Validate discount eligibility |
Apex |
| Retrieve external customer information |
Apex callout or integration |
| Update an Opportunity |
Salesforce action |
| Trigger an approval process |
Flow and Approval capabilities |
The agent determines which action is appropriate based on its instructions and available tools.
The actual business operation is handled by the configured Salesforce action.
5.4 Agentforce and Trust
Giving an agent the ability to work over an extended period also increases the importance of security and governance.
Consider an agent that can update Opportunities, send emails, and initiate approval requests.
We need to define:
- Which records the agent can access.
- Which actions it can execute.
- Which operations require human approval.
- What happens when an action fails.
- How completed activities are monitored and audited.
Salesforce’s trust and security architecture, together with appropriate permissions and business guardrails, remains essential.
An autonomous agent should not mean an uncontrolled agent.
Long-Horizon Agents vs Traditional Automation
Salesforce developers already have several tools for building complex business processes.
We use Record-Triggered Flows, Scheduled Flows, Apex, Platform Events, and external integrations.
So, why do we need Long-Horizon Agents?
The answer is that these technologies solve different problems and can complement one another.
Consider a Scheduled Flow that sends a follow-up email three days after a product demonstration.
The Flow follows a predefined rule.
But what if the customer has already rejected the proposal? What if they request a different package? What if the decision-maker changes?
A Long-Horizon Agent can evaluate the updated context and adjust its next steps within its configured permissions and instructions.
Let’s compare them:
| Traditional Automation |
Long-Horizon Agents |
| Executes predefined business logic |
Pursues a broader business goal |
| Follows configured conditions |
Can reason about changing circumstances |
| Runs based on triggers or schedules |
Can maintain an ongoing plan |
| Uses defined input and output |
Can interpret new instructions and information |
| Best for predictable processes |
Useful for complex, evolving processes |
This does not mean we should replace every Salesforce Flow with an AI agent.In fact, deterministic automation is often the better choice when business logic is predictable.
A good Salesforce architecture can combine both:
- Flow and Apex for reliable, rule-based execution.
- Agentforce for reasoning, interpretation, and decision-making.
- Long-Horizon capabilities for pursuing goals over extended periods.
The goal is to use the right technology for the right responsibility.The goal is to use the right technology for the right responsibility.
Benefits and Challenges
Long-Horizon Agents introduce exciting possibilities, but they also bring new architectural considerations.
Benefits
1. Better Customer Experience
Customers do not need to repeatedly explain their requirements when the agent has relevant context.
2. Continuous Progress
Agents can work toward objectives that involve multiple stages and extended timelines.
3. Reduced Manual Follow-ups
Sales teams can spend less time coordinating repetitive activities.
4. Adaptability
Agents can respond to changing customer requirements and unexpected situations.
5. Human Collaboration
Agents can involve employees when decisions require business judgment or approval.