Agentforce vs. Building AI Agents In-House: The Context Layer

Emily Winks, Data Governance Expert, Atlan
Data Governance Expert
Updated:08/04/2026
|
Published:08/04/2026
19 min read

Key takeaways

  • 76% of enterprise AI use cases were purchased rather than built in 2025, up from 53% in 2024.
  • Agentforce hallucination rates run 3-27% depending on grounding, tracing to Salesforce data quality, not the model.
  • 95% of enterprise generative AI pilots fail to deliver measurable P&L impact, per MIT/NANDA research.
  • The 20-agent org cap and no-BYOM restriction are hard Agentforce ceilings; no context layer removes them.

Should you buy Agentforce or build AI agents in-house?

Agentforce is Salesforce's pre-built agentic AI platform for CRM workflows; building in-house means assembling a custom stack on LangGraph, AutoGen, or CrewAI that your team owns end to end. In 2025, 76% of enterprise AI use cases were purchased rather than built, yet Gartner still expects more than 40% of agentic AI projects to be canceled by 2027. Both paths hinge on the same unmet requirement underneath them: a governed context layer of certified definitions, lineage, and access policy.

What the decision comes down to:

  • Cost Agentforce runs roughly $0.80-$1.50 per conversation; custom builds run $160K-$450K+ in year one
  • Control Agentforce is CRM-bound with a 20-agent org cap; custom builds own the full stack but carry framework churn risk
  • Reliability both paths fail in production from the same missing-context problem, not from which platform you picked

See how governed context cuts agent hallucination

Get the 5x Accuracy Ebook

Atlan operates underneath both paths as the governed context layer, delivering certified business definitions, lineage, and access policy to whichever execution layer an enterprise chooses. Every enterprise weighing this decision is really weighing two questions at once: which execution layer fits your team, and what that layer needs to actually work. Enterprises that answer only the first question are the ones showing up in the failure statistics below.

Dimension Agentforce Building In-House
What it is Pre-built agentic AI platform inside Salesforce Data Cloud Custom stack on LangGraph, AutoGen, or CrewAI
What it does Automates CRM-bound service, sales, and ops workflows Handles whatever logic and data sources you code it for
Who owns it Salesforce maintains the models and infrastructure Your engineering team owns the full stack
Key strength Fast time-to-value inside Salesforce’s walls Full control of data, logic, and deployment
Best for Commodity, CRM-native workflows at speed Differentiated logic outside CRM scope
Questions it answers Can we automate this Salesforce workflow quickly? Can we build exactly the agent our use case needs?
Cost model ~$0.80-$1.50 per conversation via Flex Credits $160K-$450K+ year one, plus 15-30% annual maintenance
Complexity level Low to moderate, low-code configuration Moderate to high, full engineering ownership

Agentforce vs. building AI agents in-house: what’s the difference?

Permalink to “Agentforce vs. building AI agents in-house: what’s the difference?”

Agentforce is a pre-built, vendor-maintained agentic platform that runs inside Salesforce’s Data Cloud and CRM object model. Building in-house means your engineering team designs, codes, and operates the agent, typically on an open framework like LangGraph or CrewAI, with full control over data sources, logic, and deployment. Agentforce buys you speed inside Salesforce’s walls; building in-house buys you control outside them.

The market has swung toward buying. According to Beam.ai (2026), 76% of enterprise AI use cases were purchased rather than built in 2025, up from 53% in 2024. Yet according to Gartner (Gartner Newsroom, June 25, 2025), more than 40% of agentic AI projects will be canceled by the end of 2027, citing escalating costs, unclear business value, and inadequate risk controls. The swing toward buying hasn’t solved the underlying failure rate on either side.

The framing itself is contested before you even reach the comparison. Brenton O’Callaghan, Chief Product Officer at Avantra, put it directly via CIO.com: “The framing I keep hearing is ‘build vs. buy your AI strategy.’ It implies that some organizations are out there training foundation models from scratch. Nobody serious is doing that. The question worth putting on the table is simpler: which decisions do we want our vendors’ AI to make, and which do we want to keep on our side of the boundary?” This page treats Agentforce-vs-in-house as a real decision, but keeps that framing challenge visible instead of resolving it into a false binary. Whichever side of the boundary you land on, the AI agent architecture underneath still has to hold up under real usage, not a demo.


What is Salesforce Agentforce?

Permalink to “What is Salesforce Agentforce?”

Agentforce is Salesforce’s agentic AI platform, built to automate customer service, sales, and CRM-bound workflows using the business’s own Salesforce Data Cloud objects and records. It requires Salesforce Enterprise edition or higher, so Essentials and Starter customers are locked out. Its core purpose is letting CRM admins and ops teams stand up production AI agents, closer to an enterprise copilot than a chatbot, without writing agent code from scratch.

Pricing and returns are where Agentforce makes its case. According to eesel AI (2026), Agentforce bills $0.10 per action via Flex Credits ($500 per 100,000 credits), or $2 flat per conversation under the original model; a typical service conversation runs 8-15 actions, an effective $0.80-$1.50 per conversation. A Forrester Total Economic Impact study, commissioned by Salesforce, found a composite Agentforce customer achieving 396% ROI and $2.2M NPV; take the number as vendor-backed rather than neutral. On the customer-review side, Agentforce holds 1,201 reviews at a 4.3 rating on G2, with complex setup and expensive premium features as the recurring drawbacks.

The constraints are where the case gets complicated. Publicly documented Agentforce limits are stark: a single Salesforce org is capped at 20 active agents, each limited to 15 topics and 15 actions per topic, and Bring-Your-Own-Model is unsupported: hard platform ceilings, not configuration choices, and the strongest structural case against Agentforce. On reliability, Brad Arkin, Chief Trust Officer at Salesforce, has said his security team has run Agentforce “thousands of times a week” with zero hallucinations in that use case, a genuine data point on the upper end of its real-world range. The spread between that result and Agentforce’s documented failure cases comes down to how clean the Salesforce data is underneath each deployment, not which model Agentforce runs.

Core components of Agentforce

Permalink to “Core components of Agentforce”
  • Agentforce Studio: the low-code interface for configuring agent topics, actions, and guardrails without custom development.
  • Salesforce Data Cloud: the unified customer data layer Agentforce reads from and writes back to.
  • Topics and actions: the unit of agent scope; each agent is capped at 15 topics, each topic at 15 actions.
  • Flex Credits: the consumption-based pricing unit, roughly $500 per 100,000 credits (~$0.10 per action).
  • Trust Layer: Salesforce’s built-in guardrail and data-masking layer for grounding agent responses in permissioned records.
  • Prebuilt agent templates: starting configurations for common service and sales use cases.

The CIO's Guide to Context Graphs

Whichever agent platform you land on, this guide breaks down how a context graph gives it the business definitions it needs to answer correctly.

Get the CIO Guide

What does it mean to build AI agents in-house?

Permalink to “What does it mean to build AI agents in-house?”

Building AI agents in-house means your team designs the reasoning loop, tool integrations, memory, and deployment pipeline using an open framework, most commonly LangGraph, AutoGen, or CrewAI. The team owns the full stack, which raises the agent harness vs. agent framework question of how much orchestration scaffolding you still assemble yourself after picking a framework. This path serves organizations that need agent logic no vendor platform offers, or that want to avoid lock-in entirely.

The context is sobering. According to MIT’s “State of AI in Business 2025” report (MIT Media Lab/NANDA, via Forbes, August 2025), 95% of enterprise generative AI pilots fail to deliver measurable P&L impact. According to Riseup Labs (2026), custom builds run $160,000-$450,000+ in year one depending on complexity, plus 15-30% annually in maintenance, with operational cost for a single production agent running $500-$15,000 per month depending on complexity. Only 17% of organizations have deployed AI agents to date, per Gartner’s 2025 webinar poll.

Framework maturity varies. According to Instinctools (2026), LangGraph requires roughly 10-14 engineer-days to production for a team new to it; CrewAI ships a working crew in 30-60 lines on day one but is less production-hardened. According to Towards AI (2026), AutoGen is in Microsoft-declared maintenance mode, a real churn risk for anyone building on it today. HN’s recurring “build vs. buy” threads converge on a narrower position: build only your genuine differentiator, not commodities your agent tech stack already covers.

Core components of a custom-built agent stack

Permalink to “Core components of a custom-built agent stack”
  • Orchestration framework: LangGraph, AutoGen, or CrewAI; defines the reasoning loop, tool routing, and multi-agent handoffs.
  • Model access layer: the team’s choice of LLM provider, swappable without vendor lock-in.
  • Tool and data integrations: custom connectors to whatever systems the agent needs to read or act on.
  • Evaluation and observability: in-house tooling to measure accuracy, latency, and failure modes in production.
  • Deployment and scaling infrastructure: the team’s own hosting, versioning, and rollback pipeline.
  • Maintenance ownership: ongoing time to patch, retrain, and adapt, including debugging multi-agent systems when something breaks.

Framework choice is only half the decision: teams here still compare LangChain against LangGraph, weigh LangGraph’s memory against Mem0, and follow a process to choose an agentic framework for the enterprise. None of those choices determine whether the agent is right; they only determine how much of the runtime you operate yourself.


Agentforce vs. building in-house: head-to-head comparison

Permalink to “Agentforce vs. building in-house: head-to-head comparison”

The sharpest differences between Agentforce and a custom build show up in platform constraints, hallucination profile, and third-party ROI evidence, and the comparison exposes something every ranking page treats as two separate problems: they share the same root failure mode.

Dimension Agentforce Building In-House
Primary focus CRM-native service, sales, and ops automation Whatever logic your team designs it for
Representative tools Agentforce Studio, Salesforce Data Cloud LangGraph, AutoGen, CrewAI
Time to value Weeks, via low-code configuration 10-14+ engineer-days minimum for a first agent
Cost model ~$0.80-$1.50 per conversation (Flex Credits) $160K-$450K+ year one, 15-30% annual maintenance
Platform constraints 20-agent org cap, 15 topics/agent, no BYOM None beyond what the team builds
Data scope Salesforce Data Cloud objects and records Any source the team connects
Hallucination and failure profile 3-27% hallucination range, tied to Salesforce data quality Fails from the same missing-context problem, plus code-level bugs
Framework churn risk Low version churn, but Salesforce sets the roadmap and pricing Real; AutoGen is already in maintenance mode
Failure mode Fragmented or conflicting Salesforce records Missing, stale, or ungoverned context at the data layer
Third-party ROI evidence Forrester TEI: 396% ROI, $2.2M NPV, Salesforce-commissioned No comparable third-party ROI study exists yet

Example: a CX team splits the commodity from the differentiator. A support team runs Agentforce for tier-1 ticket triage, the commodity workflow Salesforce already built, and builds a custom LangGraph agent for escalation logic based on customer lifetime value, something no off-the-shelf platform models. Neither path survives if those definitions drift between the two systems: per Salesforce Ben (2026), one well-documented Agentforce hallucination traced back to exactly this kind of fragmented data, conflicting Knowledge articles, not the model, and a custom agent fails identically if it can’t trust the record it’s routing on. Buy the commodity, build the differentiator is sound guidance, but it doesn’t remove the shared context dependency underneath both halves.

Agentforce is not the only pre-built platform enterprises weigh against a custom build: AWS Bedrock Agents, Google’s Gemini Enterprise, and Databricks’ Agent Bricks all carry the same buy-side trade-off, anchored to a different data platform. Per MIT/NANDA’s State of AI in Business 2025 report, 95% of enterprise generative AI pilots fail to deliver measurable P&L impact once they move past a demo: the workflow logic worked, but scaling past a proof of concept exposed grounding that didn’t survive messier real data. That gap sits below the enterprise-ready trust bar either platform has to clear, and it’s a governance problem, not a build-vs-buy one.


Is Your Agent Context Production-Ready?

Before you commit to Agentforce, a custom build, or both, score whether your underlying data can actually support the agent you're planning.

Take the Readiness Checklist

How do Agentforce and custom-built agents work together?

Permalink to “How do Agentforce and custom-built agents work together?”

Agentforce and custom builds are not mutually exclusive. According to Kellton (2026), 47% of enterprises already run a hybrid AI-agent model combining off-the-shelf platforms with custom development, though most arrived there unintentionally rather than by design. The more useful question is what either one needs underneath it to work, not which one to pick, and the underlying context bootstrapping work usually takes longer than the agent build itself.

Signal Points to Agentforce Points to Building In-House Points to Hybrid
Where the workflow lives Entirely inside Salesforce CRM objects Spans systems outside Salesforce Some workflows inside, some outside
Time pressure Need production in weeks Can absorb 10-14+ engineer-days Need one path fast, one path right
Differentiation need Workflow is a commodity (routine triage, replies) Logic is the competitive differentiator Commodity and differentiator both exist
Data model fit Data already lives in Salesforce Data Cloud Data lives elsewhere or spans platforms Data is split across both
Governance maturity Comfortable trusting Salesforce’s Trust Layer Team can own grounding and evaluation itself Neither side has solved context yet

Pattern 1: Agentforce for the commodity, custom agent for the edge case

Permalink to “Pattern 1: Agentforce for the commodity, custom agent for the edge case”

Agentforce handles the high-volume, CRM-native workflow, ticket triage and standard replies, while a custom LangGraph or CrewAI agent handles the narrow case Agentforce’s topic caps can’t fit. Agentforce contributes speed and built-in Trust Layer guardrails; the custom build contributes flexibility beyond the 15-topic ceiling and access to non-Salesforce data. Combined outcome: faster time-to-value on the commodity workload, full control on the piece that differentiates.

Pattern 2: custom agent first, Agentforce added later for CRM-native reach

Permalink to “Pattern 2: custom agent first, Agentforce added later for CRM-native reach”

A team builds a custom agent for a cross-system workflow, then adds Agentforce for Salesforce-specific automation once that need appears. Neither investment is stranded, which is the portability question most ranking comparison pages never address.

Pattern 3: the practitioner-validated hybrid framing

Permalink to “Pattern 3: the practitioner-validated hybrid framing”

Simon Ellis, Head of AI Transformation and Enterprise Architecture at Pets at Home, made the strongest practitioner case for this pattern via CX Today: “I’m going to buy the commodity if the platform’s there and it’s good, and you’ve got partners who have spent hundreds of millions, if not billions, investing in building something. You take that, and then you build your secret sauce, what makes you different.” That converges with the hybrid-adoption data above: buy the commodity, build the differentiator, rather than a binary choice.

When to start with Agentforce: the workflow lives entirely inside Salesforce CRM objects, production is needed in weeks, and the workflow itself is a commodity.

When to start with building in-house: the workflow spans systems outside Salesforce, the logic is the competitive differentiator, and the team can absorb 10-14+ engineer-days minimum.

When to invest in both simultaneously: greenfield platform builds, or an enterprise already past the Agentforce ceiling on one workflow while still needing CRM-native automation on another. Either way, what decides the outcome is whether the decision traces each agent produces are trustworthy enough to act on, not the platform mix.


How Atlan approaches the Agentforce-vs-build decision

Permalink to “How Atlan approaches the Agentforce-vs-build decision”

Both paths in this comparison hit the same wall in production. According to Salesforce Ben (2026), Agentforce’s own documented hallucination case traced back to fragmented or conflicting Salesforce Knowledge records, not the model, and its broader 3-27% hallucination range moves with data quality, not model choice. Custom agents fail in production largely for the same reason: missing, stale, or ungoverned context, not bad agent logic, consistent with MIT/NANDA’s finding that 95% of enterprise generative AI pilots never deliver measurable P&L impact. Teams can stand up an agent, bought or built, fast. Giving it trustworthy business context takes longer than the agent build itself, and that step is what both sides of the build-vs-buy debate tend to skip.



Atlan does not compete with Agentforce or with a custom LangGraph or AutoGen stack. It sits underneath either one as the Context Layer for AI: certified business definitions, lineage, and access policy that stay consistent regardless of which agent runtime is asking. A governed control plane for agent context unifies technical metadata and lineage across whichever systems an agent reads from, enforces the same access rules no matter which execution layer is asking, and certifies business vocabulary, “customer,” “case,” “opportunity,” once, read the same way by Agentforce and any custom agent. Delivered open via MCP, A2A, SQL, and REST, a later change of execution layer doesn’t strand the definitions underneath it. It’s the same discipline covered in what it takes to build your own context layer, against context layer evaluation criteria, and, for regulated industries, in build vs. buy for context in healthcare: the real question is whether you build or buy that layer too, not whether you need one.

This does not answer OpenNash’s structural critique in full: Agentforce’s 20-agent-per-org and 15-topic-per-agent caps, and its lack of Bring-Your-Own-Model support, are hard platform ceilings a context layer doesn’t remove. If the constraint is the execution boundary itself, the fix is architectural, build instead, or hybrid, not a governance one. Whichever path you choose, the context layer determines whether it works reliably in production, but it doesn’t make the choice of path irrelevant, a distinction the fuller case for AI agent accuracy as a context problem covers in depth. Teams that accept this reframe typically move next to how to build an AI agent harness or how to implement an enterprise context layer, depending on whether the gap is in the agent’s scaffolding or the data underneath it.


See Governed Context in Action

Watch how a context layer feeds the same certified definitions to Agentforce, a custom agent stack, or both, in a live walkthrough.

Watch the Live Demos

What actually decides whether Agentforce or a custom build works in production

Permalink to “What actually decides whether Agentforce or a custom build works in production”

The Agentforce-vs-build decision is real, and the cost, speed, and lock-in trade-offs documented above are worth taking seriously; this isn’t a false choice dressed up as one. But every ranking comparison on this topic treats the platform choice as the whole question. It isn’t. Agentforce’s own hallucination range and the custom-agent production-failure pattern documented above trace back to the same root cause: missing, stale, or ungoverned context, not which execution layer you picked. A context layer doesn’t erase Agentforce’s CRM-boundary ceilings, 20 agents per org, 15 topics per agent, no BYOM; if those constraints are the blocker, the fix is architectural, not a governance one. As more enterprises land on hybrid models, 47% already do, mostly by accident, the teams that get there deliberately are the ones who solved context first, before the platform question, not after.


FAQs about Agentforce vs. building AI agents in-house

Permalink to “FAQs about Agentforce vs. building AI agents in-house”

1. Is it cheaper to build an AI agent in-house or buy Agentforce?

Permalink to “1. Is it cheaper to build an AI agent in-house or buy Agentforce?”

For most enterprises, Agentforce is cheaper upfront: an effective $0.80-$1.50 per conversation via Flex Credits versus $160,000-$450,000+ in year-one custom build costs, plus 15-30% annual maintenance. The break-even shifts once volume climbs past what CRM-scoped conversations can cover, or once you need data outside Salesforce. Cost alone shouldn’t decide it; CRM scope and platform ceilings usually matter more.

2. What is Salesforce Agentforce?

Permalink to “2. What is Salesforce Agentforce?”

Salesforce Agentforce is a pre-built agentic AI platform that automates customer service, sales, and CRM-bound workflows using the business’s Salesforce Data Cloud objects and records. It requires Salesforce Enterprise edition or higher and is configured through Agentforce Studio rather than custom-coded. It lets CRM admins and ops teams stand up production agents without writing agent code from scratch.

3. What are the limitations of Agentforce?

Permalink to “3. What are the limitations of Agentforce?”

A single Salesforce org is capped at 20 active Agentforce agents, each limited to 15 topics and 15 actions per topic, and Bring-Your-Own-Model is unsupported. These are hard platform ceilings, not configuration choices. Combined with the CRM-boundary lock-in, they represent the strongest structural argument for building in-house instead.

4. Can Agentforce work with data outside Salesforce?

Permalink to “4. Can Agentforce work with data outside Salesforce?”

Agentforce is built to read and write Salesforce Data Cloud objects and records, and it has limited native reach beyond the CRM boundary. Enterprises that need an agent to reason over data in a warehouse, data lake, or third-party system typically pair Agentforce with a governed context layer or a custom agent that can read those sources directly.

5. How long does it take to build a custom AI agent from scratch?

Permalink to “5. How long does it take to build a custom AI agent from scratch?”

LangGraph requires roughly 10-14 engineer-days to production for a team new to the framework. CrewAI ships a working crew in 30-60 lines of code on day one but is less production-hardened. AutoGen is in Microsoft-declared maintenance mode, which adds framework churn risk for anyone building on it today.

6. What causes AI agents to hallucinate, on Agentforce or a custom build?

Permalink to “6. What causes AI agents to hallucinate, on Agentforce or a custom build?”

Agentforce hallucination rates run 3-27% depending on configuration, and one well-documented case traced an Agentforce hallucination back to conflicting Salesforce Knowledge articles, not the model itself. Custom agents fail the identical way when they read from ungoverned or inconsistent data sources. Tight grounding, whether Knowledge articles or a governed context layer, is what narrows the range on either platform.

7. What is the difference between Agentforce and building on LangGraph or AutoGen?

Permalink to “7. What is the difference between Agentforce and building on LangGraph or AutoGen?”

Agentforce is a pre-built, CRM-bound platform Salesforce maintains; LangGraph and AutoGen are open orchestration frameworks your engineering team codes, owns, and operates. Agentforce trades flexibility for speed and lower operational burden. LangGraph and AutoGen trade a longer build cycle for full control over data sources, logic, and deployment.

8. Does a context layer replace the need to choose between Agentforce and building in-house?

Permalink to “8. Does a context layer replace the need to choose between Agentforce and building in-house?”

No. A context layer does not remove the choice between Agentforce and building in-house; it determines whether whichever one you pick works reliably in production. Certified definitions, lineage, and access policy sit above the execution layer, feeding Agentforce, a custom agent, or both the same governed business context regardless of which one you choose.


Sources

Permalink to “Sources”
  1. Beam.ai: “The Great AI Flip: Why 76% of Enterprises Stopped Building AI In-House.” https://beam.ai/agentic-insights/the-great-ai-flip-why-76-of-enterprises-stopped-building-ai-in-house
  2. Gartner Newsroom: “Gartner Predicts Over 40% of Agentic AI Projects Will Be Canceled by End of 2027.” https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027
  3. MIT Media Lab / NANDA (via Forbes): “State of AI in Business 2025.” https://www.forbes.com/sites/andreahill/2025/08/21/why-95-of-ai-pilots-fail-and-what-business-leaders-should-do-instead/
  4. eesel AI: “Salesforce Agentforce Pricing Breakdown.” https://www.eesel.ai/blog/agentforce-pricing
  5. Riseup Labs: “AI Agent Development Cost Breakdown for 2026.” https://riseuplabs.com/ai-agent-development-cost/
  6. Instinctools: “AutoGen vs LangChain vs CrewAI.” https://www.instinctools.com/blog/autogen-vs-langchain-vs-crewai/
  7. Towards AI: “LangGraph vs CrewAI vs AutoGen: Which AI Agent Framework Should Your Enterprise Use in 2026.” https://pub.towardsai.net/langgraph-vs-crewai-vs-autogen-which-ai-agent-framework-should-your-enterprise-use-in-2026-3a9ebb407b09
  8. Salesforce Ben: “Are Agentforce Hallucinations a Problem, or Is It Just Your Bad Data?” https://www.salesforceben.com/are-agentforce-hallucinations-a-problem-or-is-it-just-your-bad-data/
  9. Forrester (via Salesforce): “Total Economic Impact of Salesforce Agentforce.” https://tei.forrester.com/go/Salesforce/Agentforce?lang=en-us
  10. OpenNash: “Salesforce Agentforce vs. Custom AI Agents: When the CRM Giant Isn’t the Right Fit.” https://opennash.com/blog/salesforce-agentforce-vs-custom-ai-agents-when-the-crm/
  11. Kellton: “Build vs. Buy AI Agents: The 2026 Hybrid Framework.” https://www.kellton.com/kellton-tech-blog/build-vs-buy-ai-agents-hybrid-framework
  12. CX Today: “How CX’s Build vs. Buy Debate Is Changing.” https://www.cxtoday.com/ai-automation-in-cx/ai-agents-cx-build-buy-platform-strategy/
  13. CIO.com: “The Build vs. Buy Dilemma at the Heart of Enterprise AI.” https://www.cio.com/article/4197957/the-build-vs-buy-dilemma-at-the-heart-of-enterprise-ai.html
  14. G2: “Salesforce Agentforce Reviews and Pricing.” https://www.g2.com/products/salesforce-agentforce/pricing

Share this article

signoff-panel-logo

Atlan is the Context Layer for AI. It is a governed, model-agnostic tier that delivers certified business definitions, lineage, and access policy to any agent, whether it runs on Agentforce, a custom LangGraph stack, or both.

Bridge the context gap.
Ship AI that works.

[Website env: production]