Top 10 Best Practices for Building with Agentforce

Agentforce is now a multi-billion dollar product line with over 3,000 paying customers in just Q4 of FY25 (Nov 2024 – Jan 2025). According to the recent Q4 earnings calls, nearly half of the Fortune 100 companies are both AI and Data Cloud customers. Marc Benioff is talking about the “trinity of apps, data, and agents” that’s compelling to customers. 

We’re seeing this first hand here at Aquiva, helping partners build Agentforce AppExchange solutions, working with customers implementing it, and leveraging Agentforce for our internal tools and solutions. Building AI-powered agents that drive real business value requires more than just technical execution. Success depends on a clear strategy, well-defined use cases, and change management. 

For those of you who have missed our session at TDX this year, here are ten best practices for making the most of Agentforce.

1. Start with Clear Use Cases

Vague AI projects rarely succeed. As you’d do with any other project, ask yourself, “Who is the user and what problem am I solving for?” Define a specific, high-impact problem. Your initial use case shouldn’t be too broad. Keep it simple, but also ensure that it does bring value. Think about user roles, required data, available actions, necessary guardrails, and the channels where the agent will operate. Prioritise measurable outcomes, such as reducing case resolution time or improving lead qualification rates, to ensure the investment delivers value.

The above is probably true for most development projects. What makes AI different is the need to account for variability and ambiguity. Beyond defining user roles, required data, available actions, and guardrails, consider how the agent will handle incomplete inputs, uncertain intent, or conflicting signals. Beyond the trifecta of desirability, feasibility, and viability,  think also about adaptability as it won’t be a one-time effort. 

2. Start Small and Iterate

AI (Agentforce and custom) implementations and app development often fail due to overambitiousness. We recommend beginning with a pilot focused on a simple, well-defined use case (see above). A controlled, gradual rollout allows experimentation, learning, and refinement before expanding to more complex use cases. Early wins build confidence and create momentum for broader adoption. 

If you’re building with Agentforce for AppExchange, starting small will allow you to work around the current packaging limitations. Each new (extension) package requires a fresh security review, adding complexity and delays. Aquiva quickly and successfully passed several Agentforce security reviews by keeping initial packages small and focused, demonstrating that an incremental approach leads to faster approval and quicker time to market. Until now, packaging constraints meant that only underlying Apex classes or flows could be packaged, so a big bang approach didn’t make sense. Actions, topics, and prompts couldn’t be included. After the security reviews, we added additional action-related assets, and with 1GP and 2GP now supporting packageability, we’re finally in a position to scale and evolve these packages properly.

3. Experiment with Topics and Behaviour

Your topics should be clear and well-defined. It’s suggested that poorly defined topics result in wrong action selection, and when instructions are scattered across a number of topics, the agent can act unpredictably. To prevent this, topics should be specific, avoiding broad categories. They should guide the agent toward selecting relevant, reusable actions akin to modular “Lego blocks” that can be combined.

Whilst this is generally true, in some instances (see MyOrgButler), we’ve also found that a single broad topic with a few generic actions can sometimes work better, depending on the use case. Segmenting too much into narrowly defined topics can lead to unintended complexity in some scenarios. The key is to experiment and refine. Some implementations benefit from modular, reusable actions, while others perform better with a broader, more flexible topic structure.

4. Nail Down Clear Instructions

Agentforce relies on NLP (natural language processing), so imprecise or too vague instructions may give output variability. Use precise, structured language, specifying output formats, expected responses, and handling for missing or incomplete data.

That said, AI’s true strength lies in its ability to handle fuzziness and vagueness. Overly rigid, process-heavy instructions can limit its adaptability rather than enhance it. Instead of treating AI like a deterministic system, the goal should be to strike a balance: provide enough structure for reliability while allowing flexibility where it matters.

5. Leverage Pre-Built Actions

Reinventing the wheel is a waste of time and effort. Salesforce provides a range of pre-built actions, such as “Identify Record by Name,”  that can get you to market faster. As a Salesforce customer, you should also consider AppExchange solutions from ISV partners to extend capabilities without custom development. Why? Leveraging existing components accelerates deployment and reduces complexity.

Having said that, we found that in some cases, more powerful, flexible actions, such as a generic “Call any API,” provide more adaptability and greater utility (again, check MyOrgButler). The true value is in striking the right balance between leveraging out-of-the-box functionality and building more flexible, dynamic, scalable actions that can handle complex workflows.

6. Don’t Forget Security and Compliance

AI introduces new security/compliance risks. As we discussed in The AI Trust Dilemma: Why Compliance and Security Are Now Business Priorities, usability and flexibility are a developers’ top concern, but company-wide AI adoption needs to fit into regulatory regimes, which CTOs, CISOs, and CIOs have to ensure. For this reason, Salesforce’s Einstein Trust Layer has been developed as an essential component of AI governance that offers data masking, zero data retention, toxicity scoring, and auditability.

However, current limitations must be considered. Some security measures are not universally applied, auditability relies on Data Cloud, and many compliance features are difficult to test in non-production environments. 

If you’re an AppExchange partner, understand the Security Review requirements before you start building. 

7. Involve Humans in the Loop

We’re not quite there with fully autonomous agents. Agentforce should enhance, not replace, human decision-making. Task agents to require approval of key actions prior to execution (specifically those having financial, legal, or customer-facing consequences).

That said, implementation should be thoughtful; overly cautious prompts can turn an agent from efficient to frustratingly hesitant. The key is finding the right balance between necessary guardrails and maintaining a smooth, user-friendly experience. You don’t want the agent to ask you three times for approval before doing something. 

8. Decide What to Package vs. Implement After Install

For AppExchange partners, not all Agentforce capabilities can/should be packaged. Things are moving fast, but there are still packaging constraints today. While packaging constraints still exist, it looks like we now have 2GP coverage of pretty much everything we need. The best approach moving forward would be to package as much as possible while allowing constrained customisation where required.

Some configurations are best handled post-installation. Understanding what to standardise vs customise allows for more scalable and maintainable deployments. 

If you’re a Salesforce customer building internally, define what should be standardised and reusable versus what requires customisation for specific needs.

9. Refactor Prompts and Outputs with Trial and Error

Unlike traditional software development, AI interactions require iterative refinement. Testing is also not going to be the same as with your regular development projects. Keep in mind that answers may differ depending on context, availability of data, and wording (in computational pragmatics, it’s referred to as utterance variability and discourse processing, both of which influence stochasticity). When designing instructions, you should consider user utterances and real-world variability to improve consistency and reliability. 

However, trial and error alone is not efficient. AI evaluation needs a structured, scientific approach rather than traditional red/green testing. Instead of relying on binary pass/fail outcomes, assessments should focus on the agent’s core components while incorporating observability through execution traces. Choosing the right evaluation method is important: code-based testing fits deterministic functions, while LLM-as-a-Judge and human annotation are employed to test more nuanced language interactions. Convergence score measurement can guarantee that agents make decisions effectively, and well-designed experiments, like prompt refinement, model adjustment, or logic optimisation, propel ongoing improvement. You want to ensure agents perform reliably in real-world conditions and remain adaptable over time.

10. Think About User Adoption and Change Management

Any solution, including the most advanced AI solution, is useless if people don’t adopt and use it. Focus on feasibility (i.e. can it be implemented effectively?), viability (i.e. does it deliver business value?), and desirability (i.e. do users want to use it?). Provide training, prioritise quick wins, and establish a feedback loop to drive adoption. AI adoption is as much about trust and usability as it is about functionality. DevOps in Salesforce remains complex, and tracking adoption is often cumbersome. Try to implement lightweight tracking methods and integrate adoption metrics into your existing DevOps workflows wherever possible. If you’re not sure how, let’s chat. 

Final Thoughts

Building with Agentforce is fun, but it’s not straightforward. If you don’t know where to start or are stuck, reach out. We’ve done it numerous times and will happily share our experience and guide you and your organisation. 

For more insights, check out our articles on Agentforce – The New Low Code, Beyond the Hype, AI Sustainability, Measuring ROI for Agentforce, Data Cloud for ISV Partners, and What’s Beyond the App Launch.  You can also check Salesforce’s Become an Agentblazer Innovator module on Trailhead. 







Author

Picture of Greg Wasowski
Greg Wasowski

SVP, Consulting and Strategy

Co-authors

Picture of Michael Holt
Michael Holt

Director, Solution Consulting

Picture of  Robert Sösemann
Robert Sösemann

Senior Principal Architect

More posts

The AI Trust Dilemma: Why Compliance and Security Are Now Business Priorities

Aquiva Labs Renews SOC 2 Compliance: Elevating Trust with Security and Confidentiality

Employee Spotlight: Gianni Braga

Are you interested?
if you want to join Aquiva, please take a look at our current offers. Join and start your Aquiva adventure!
Contact Aquiva Labs today for solutions that are as ambitious as your goals. Let us guide you to Salesforce success.