Building and Scaling Production-Ready AI Agents: Lessons from Agent Force

salesforce · Tech · 2023 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Enterprise agent platform operations

Salesforce needed AgentForce agents to move beyond easy demos into production-grade enterprise workflows, where customers need grounded answers, autonomous or approved actions, trust controls, multi-channel deployment, evaluation, monitoring, latency control, and cost-effective optimization before they will turn agents on for employees or customers.

Constraints:

Architecture

Salesforce framed AgentForce as a low-code/no-code platform and toolchain for building, testing, deploying, and monitoring enterprise agents. An agent definition includes a job, enterprise data access, actionability, guardrails, and channel exposure. Production readiness comes from an upgraded lifecycle around AI-assisted evaluation, human spot checks, synthetic batch tests, fast feedback, RAG pipeline monitoring, and selective fine-tuning of smaller models when prompt engineering and RAG no longer deliver enough quality, brand voice, latency, or cost control.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  agentforce-platform[AgentForce platform] --> agent-builder[Agent Builder]
  agentforce-platform --> agent-definition[Agent definition]
  agentforce-platform --> trust-layer[Trust layer]
  agentforce-platform --> evaluation-lifecycle[Evaluation lifecycle]
  agentforce-platform --> production-monitoring[Production monitoring]
  agent-builder --> agent-definition
  agent-builder --> batch-test-generator[Batch test generator]
  agent-definition --> enterprise-knowledge[Enterprise knowledge]
  agent-definition --> action-layer[Action layer]
  agent-definition --> trust-layer
  agent-definition --> channel-layer[Channel layer]
  enterprise-knowledge --> rag-pipeline-monitor[RAG pipeline monitor]
  action-layer --> channel-layer
  channel-layer --> production-monitoring
  evaluation-lifecycle --> ai-assisted-evaluator[AI-assisted evaluator]
  evaluation-lifecycle --> batch-test-generator
  evaluation-lifecycle --> human-review-loop[Human review loop]
  ai-assisted-evaluator --> human-review-loop
  human-review-loop --> production-monitoring
  rag-pipeline-monitor --> production-monitoring
  trust-layer --> fine-tuning-layer[Fine-tuning layer]
  fine-tuning-layer --> production-monitoring
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
AgentForce platform Low-code/no-code Salesforce platform for building, testing, deploying, and monitoring enterprise agents. Agent Builder, Agent definition, Trust layer, Evaluation lifecycle, Production monitoring
Agent Builder Studio and builder interface where teams configure agents, connect workflows, test single turns, and run batch tests. AgentForce platform, Agent definition, Batch test generator
Agent definition Configuration describing the agent's job, data access, permitted actions, guardrails, and deployment channel. Agent Builder, Enterprise knowledge, Action layer, Trust layer, Channel layer
Enterprise knowledge Grounding corpus from CRM and enterprise knowledge systems used to reduce hallucination. Agent definition, RAG pipeline monitor
Action layer Execution surface that lets agents take actions autonomously or after collecting user feedback. Agent definition, Channel layer
Trust layer Guardrail layer for trust, safety, policy enforcement, and customer data boundaries. AgentForce platform, Agent definition, Fine-tuning layer
Channel layer Websites, portals, mobile apps, workflow surfaces, and headless integrations where agents are exposed. Agent definition, Action layer, Production monitoring
Evaluation lifecycle PRD-level acceptance criteria and evaluation process for testing agents, prompts, retrievers, and models before launch. AgentForce platform, AI-assisted evaluator, Batch test generator, Human review loop
AI-assisted evaluator LLM-assisted judging of agent responses against defined metrics and question sets. Evaluation lifecycle, Human review loop
Batch test generator Synthetic test generation path that creates large sets of scenarios for batch testing and fine-tune comparison. Agent Builder, Evaluation lifecycle
Human review loop Human spot checks, thumbs-up/down feedback, and implicit feedback used to validate and improve agent behavior. AI-assisted evaluator, Production monitoring
RAG pipeline monitor Stage-level monitoring for query processing, retrieval, chunk handoff, response quality, citations, and grounding. Enterprise knowledge, Production monitoring
Fine-tuning layer Selective model-tuning layer for brand voice, domain specificity, structured output, summarization, cost-to-serve, and latency. Trust layer, Production monitoring
Production monitoring Operational feedback layer that tracks fast feedback, event logs, RAG metrics, cost-to-serve, response behavior, and user feedback. AgentForce platform, Channel layer, Human review loop, RAG pipeline monitor, Fine-tuning layer

Data flow

A team defines an AgentForce agent's job, connects it to enterprise data, configures actions, guardrails, and channels, then tests it through eval criteria written into the PRD. AI-assisted evaluation scores generated responses across metrics, humans spot-check outputs and provide thumbs-up/down feedback, and batch testing can synthesize 100 or 200 test cases. In production, feedback, event logs, and RAG-stage metrics reveal failures in query processing, retrieval, chunking, LLM handoff, response quality, citation, and guardrail behavior. When quality, brand voice, latency, or cost plateau after prompting and RAG, the team fine-tunes smaller models inside Salesforce trust boundaries.

4 supporting quotes
“agent force is our new platform platform that allows you to build these agents quickly and then test them deploy them”transcript, stated
“the agent should have access to the data because you don't want these agents to hallucinate you want it to be grounded into your Enterprise knowledge”transcript, stated
“you want to have the human in the loop as well so to you know randomly spot check p1w to and then also provide thumbs and thumbs down”transcript, stated
“what happened this like is did the when the query came did the retriever um uh is doing the right job or not and once the the chunk is retrieved then you want to send it to Alam again so whether that thing is happening or not so you need to define those”transcript, stated

Why this architecture

Salesforce argues that enterprise agents need a full lifecycle because the hard problem is not building a demo; it is proving trust for non-deterministic systems. The platform shape keeps agent authoring low-code, but wraps it in PRD-level evals, synthetic batch tests, human review, RAG observability, and continuous optimization. Fine-tuning is intentionally late in the path: teams should first exhaust prompt engineering and RAG, then fine-tune smaller models when quality, brand voice, latency, or cost-to-serve require a more specialized model inside trust boundaries.

4 supporting quotes
“building the flashy demo is only 10% of the work and rest 90% of the hard work is actually building the trust that this solution Works”transcript, stated
“is I think there's a lot of excitement around this new piece of technology but the truth is these are non deterministic system there is a lot of fear of unknown uh hey I asked this prompt uh you know three times back to back it is G why it is giving me three different answer why and”transcript, stated
“let me go back to I I'll talk about the fine tuner approach in a second but um I would say you should always start your journey with evals uh and uh in fact one of the things that U I have done in my product organization is uh that hey every requirements and”transcript, stated
“and then of course you know the prom plus Rag and that's what I've seen across our customers you know they don't jump onto fine-tuning uh from the GetGo but you reached to a point where hey I've tried everything I've you know exploited everything I can do few short prompting”transcript, stated

Models used: standard LLMs · proprietary LLMs · open-source LLMs · fine-tuned small language models · 10 billion parameter model

Scale

Alternatives considered (roads not taken)

Treat early demos as production readiness

Rejected because: The speaker says easy demos often start around 60% accuracy, while production needs much higher accuracy and trust work.

“observed this firsthand uh pretty much not just in our customer base but all across the board uh it has become super easy to build the early Demos in fact many times you don't need uh data science in the room and you can build out the first PC by yourself if you know”transcript, stated
“optimizing from this initial 60% of the accuracy to 80 or 90% whatever your threshold is based on on the use case”transcript, stated

Single-prompt or single-turn testing before production

Rejected because: Salesforce argues single-turn tests are not enough to launch and that teams without batch testing hit a wall when scaling usage.

“you can test a single turn uh scenario in here but single turn is not enough to go into production so that's where you will do batch testing so this button that you see and what happens is uh when you click on the bat test you can say hey I want to create uh”transcript, stated
“single prom testing is not enough lot of customer uh they uh you know or users who turned it on without B testing they hit the wall”transcript, stated

Fine-tune from the beginning

Rejected because: The recommended path is standard LLMs, prompt engineering, and RAG first; fine-tuning comes after those options plateau.

“the typical Journey that I've seen is you start with maybe you know a standard llm uh whether it's a proprietary or in an open source doesn't matter you talked about prompt enging and I think somebody was commenting hey prompt engering is so 2023 uh I don't”transcript, stated
“and then of course you know the prom plus Rag and that's what I've seen across our customers you know they don't jump onto fine-tuning uh from the GetGo but you reached to a point where hey I've tried everything I've you know exploited everything I can do few short prompting”transcript, stated

Prompt engineering alone for brand voice

Rejected because: The speaker says it can require very large prompts, increasing token count and cost, while fine-tuning can align brand voice more scalably.

“there's no good way to um uh to do this just by prompt engineering because you will end up creating maybe 20 page of prompt”transcript, stated
“this just by prompt engineering because you will end up creating maybe 20 page of prompt and that's not scalable your token count will go up your cost will go up and that's where you stuck into the psycol IT Triad how do you find the balance between speed accuracy and um basically”transcript, stated

Largest model for every request

Rejected because: The talk recommends data-driven decisions about when a targeted, fine-tuned smaller model can preserve quality while reducing cost and latency.

“choose like hey why we are using the biggest model when our use case is very targeted and uh and we can align it into our Enterprise lingo so what I'll do is I think I'm looking at the clock we coming at time there's two takeaways for you guys um as a”transcript, stated
“and the second is if you are looking to find a balance between speed precision and latency then going with the small language models fine-tune them is the way to go so uh I know it was a lot and I moved fast so I'll stop here let's see if we have questions”transcript, stated

Patterns

eval-driven-development (quality)

Salesforce makes evaluation criteria part of product requirements so teams know the acceptance threshold before launch.

“every requirements and PRD PM should write a clear eval and what eval means is think of as an acceptance criteria”transcript, stated
“that is 80% accuracy good enough for us to launch or turn this on into production”transcript, stated

llm-as-judge (evaluation)

Agent responses are evaluated by AI across metrics before humans spot-check and feed back corrections.

“you use AI to evaluate your responses like in our case hey this is the question user is asking to agent”transcript, stated
“this is the question user is asking to agent so you take those 100 let's say different type of questions and then you evaluate the response across different metrics and of course you want to have the human in the loop as well so to you know randomly spot check p1w to and then also provide”transcript, stated

human-in-the-loop-gate (quality)

Salesforce combines AI-assisted evaluation with human spot checks, thumbs-up/down signals, and feedback loops.

“of course you want to have the human in the loop as well so to you know randomly spot check”transcript, stated
“provide thumbs and thumbs down to initiate the food kind of reinforcement learning Loop”transcript, stated

synthetic-data-generation (evaluation)

The platform can generate large test-case sets because hand-authoring hundreds of examples is difficult.

“coming up with 510 examples is easy uh building hundreds of examples it's hard but the good news is synthetic data generation comes handy”transcript, stated
“100 more test cases or 200 more test cases those test cases are generated automatically”transcript, stated

observability-tracing (operations)

Salesforce recommends monitoring every RAG stage and production feedback signal so teams can debug opaque agent behavior.

“there is six uh failures that happen very often in your rag Pipeline and uh you should be monitoring those”transcript, stated
“you need to define those metrics at each stage and then see how things are improving”transcript, stated

rag-retrieval (retrieval)

Agents are grounded in enterprise knowledge through RAG, but the pipeline requires quality monitoring over retrieval, chunks, citations, and generation.

“jobs to be done um the agent should have access to the data because you don't want these agents to hallucinate you want it to be grounded into your Enterprise knowledge and then most importantly you want to enable actionability through these agents so that they can go and do the those task um”transcript, stated
“the rag chunks are being used can we site them uh did it follow my guardrail or not”transcript, stated

fine-tuning-adaptation (model-ops)

Fine-tuning is used after prompt and RAG optimization to improve brand voice, domain specificity, structured output, summarization, and cost-to-serve.

“how can I have these agent to respond into my brand voice as an example or how can I have these agents uh to consume less token”transcript, stated
“brand voice alignment summarization um structured output is another one”transcript, stated

cost-aware-routing (cost)

Salesforce argues for fine-tuned smaller models in targeted use cases to reduce cost-to-serve and latency without defaulting to the largest model.

“CTS becomes super important CTS is cost to serve that what are my options”transcript, stated
“start serving at the same quality at a faster speed and at a lower cost”transcript, stated

safety-policy-enforcement (trust)

AgentForce includes a trust layer and guardrails as a core agent attribute for enterprise deployment.

“trust is our number one value and we that's where we are building our trust layer”transcript, stated
“number four is the guardrail and then the most important one is the channel where do you want to expose this agent”transcript, stated

Tradeoffs

Production readiness strategy

Chose evaluation, monitoring, trust, and feedback loops over shipping after a flashy demo.

Rationale: A demo may show the possibility, but production requires proof that the agent can meet accuracy, trust, and monitoring expectations.

“the rubber hits the road is uh is really pushing the boundaries to a level where you feel comfortable that hey can this thing be turned on into production so in summary optimizing from this initial 60% of the accuracy to 80 or 90% whatever your threshold is based on on the use case uh or the”transcript, stated
“agents without uh a good eval monitoring and fast feedback loop uh is useless”transcript, stated

Optimization sequence

Chose standard LLM, prompting, RAG, then fine-tuning over fine-tuning from the start.

Rationale: Salesforce describes fine-tuning as the next step after teams exhaust prompt engineering and RAG but still need more quality, brand voice, cost, or latency gains.

“the typical Journey that I've seen is you start with maybe you know a standard llm”transcript, stated
“you know they don't jump onto fine-tuning uh from the GetGo but you reached to a point where hey I've tried everything”transcript, stated

Testing approach

Chose batch tests with synthetic cases over a handful of hand-written examples.

Rationale: The speaker says five to ten examples are easy, but production needs hundreds of examples and generated scenarios to test variation.

“coming up with 510 examples is easy uh building hundreds of examples it's hard”transcript, stated
“you generate those different scenarios you test them and then and you need this capability”transcript, stated

Evaluation governance

Chose AI-assisted evaluation plus human-in-the-loop review over fully automated scoring alone.

Rationale: AI scoring scales response assessment, while human spot checks and thumbs-up/down feedback keep the loop accountable.

“using again kind of prompting llms like synthetic dat generations and then third is this hybrid approach of uh you use AI to evaluate your responses like in our case hey this is the question user is asking to agent so you take those 100 let's say different type of questions and then you evaluate”transcript, stated
“of course you want to have the human in the loop as well so to you know randomly spot check”transcript, stated

Model serving strategy

Chose fine-tuned smaller models for targeted use cases over largest general model for all requests.

Rationale: For targeted CRM tasks, a tuned smaller model can preserve quality while improving speed, latency, and cost-to-serve.

“why we are using the biggest model when our use case is very targeted”transcript, stated
“going with the small language models fine-tune them is the way to go”transcript, stated

Gotchas (what bit them)

A compelling demo can hide most of the production-readiness work.

Root cause: Early demos are easy to build, but moving from roughly 60% accuracy to an 80-90% production threshold requires trust, testing, and optimization.

Resolution: Treat the demo as the beginning of the lifecycle and invest in evaluation, monitoring, fast feedback, and continuous optimization.

“see and I uh observed this firsthand uh pretty much not just in our customer base but all across the board uh it has become super easy to build the early Demos in fact many times you don't need uh data science in the room and you can build out the first PC by yourself if you know how to use these”transcript, stated
“building the flashy demo is only 10% of the work and rest 90% of the hard work is actually building the trust”transcript, stated

Agentic workflows are hard to debug as black boxes.

Root cause: A bad response can involve many LLM calls, latency points, knowledge choices, RAG chunks, citations, and guardrail decisions.

Resolution: Instrument each step so teams can backtrack from a response to the calls, retrievals, chunks, citations, and guardrails involved.

“here's a black box uh what happens at the each stage what happened how many you know Alum calls it's making”transcript, stated
“if your response is not bad how do you backtrack and understand what happened so in summary how do you demystify the box”transcript, stated

Single-turn tests are inadequate for production launch.

Root cause: A single prompt does not exercise the variety of scenarios, retrievers, models, and component behavior encountered in production.

Resolution: Use batch testing and automatically generated scenario sets before scaling usage or comparing fine-tuned models.

“single turn is not enough to go into production so that's where you will do batch testing”transcript, stated
“users who turned it on without B testing they hit the wall uh and then were not able to kind of you know the uh scale the usage quickly”transcript, stated

RAG quality fails at several internal stages, not only at final answer generation.

Root cause: Enterprise knowledge lives across PDFs, images, documents, and other systems, and failures can occur in query processing, retrieval, chunking, LLM handoff, response quality, or citation.

Resolution: Define and monitor metrics at every RAG pipeline stage, then iterate on retrieval and generation quality.

“Enterprise knowledge is buried across many different systems uh you know your PDF files and images and documents and whatnot”transcript, stated
“there is six uh failures that happen very often in your rag Pipeline and uh you should be monitoring those”transcript, stated

Prompt-only brand voice optimization can create unscalable prompts.

Root cause: Capturing enterprise tone, empathy, terminology, and lingo in prompts can grow into very large instructions that raise token count and cost.

Resolution: Use fine-tuning for brand voice and task-specific behavior once prompt engineering and RAG have plateaued.

“there's no good way to um uh to do this just by prompt engineering because you will end up creating maybe 20 page of prompt”transcript, stated
“that's not scalable your token count will go up your cost will go up”transcript, stated

Fine-tuning creates enterprise data-boundary concerns.

Root cause: Customers do not want their data used to tune base models or leave trust boundaries.

Resolution: Keep customer fine-tuning inside the platform's trust boundaries and explicitly avoid using it to train base models.

“make sure the data is not kind of you know uh used to uh tune any uh the base model”transcript, stated
“this has to be within my tress boundaries and that's kind of we ensure when customer do it in into our platform”transcript, stated

Evaluation

Salesforce's production-readiness process starts with PRD-level eval acceptance criteria, then uses AI-assisted response evaluation, human spot checks, thumbs-up/down feedback, synthetic batch testing, component testing for prompts/retrievers/models, RAG pipeline metrics, production monitoring, and continuous optimization decisions around cost-to-serve and fine-tuning.

Metrics: accuracy threshold · response quality · prompt quality · retriever quality · model performance · test-case coverage · human thumbs-up/down feedback · RAG query-processing quality · retrieval quality · chunk handoff success · citation and grounding quality · cost-to-serve · latency

4 supporting quotes
“have done in my product organization is uh that hey every requirements and PRD PM should write a clear eval and what eval means is think of as an acceptance criteria that hey we are building this agent or this solution or uh uh that is 80% accuracy good enough for us to launch or turn this on”transcript, stated
“you want to test some of those prompts you want to test retrievers you want to test models”transcript, stated
“you take those 100 let's say different type of questions and then you evaluate the response across different metrics”transcript, stated
“monitor some of the most important kind of the uh the pipeline for example I showed rag Pipeline”transcript, stated

Outcomes

The transcript is a vendor presentation rather than a measured customer study. It gives production targets and operating benchmarks such as 60% to 80-90% accuracy improvement, 30-minute change-test loops, 100/200 generated test cases, and 10B-parameter smaller-model tuning, but it does not provide audited before/after deployment metrics.

4 supporting quotes
“agent force is our new platform platform that allows you to build these agents quickly and then test them deploy them”transcript, stated
“number one is your uh your eval and you want to have this automated eval plus human in the loop”transcript, stated
“going with the small language models fine-tune them is the way to go”transcript, stated
“make sure the data is not kind of you know uh used to uh tune any uh the base model”transcript, stated