AI-assisted development

What Salesforce's AI assistant writes for you, where your code and org context go, and what checks the result before you deploy it.

A team turns on the AI (artificial intelligence) that Salesforce documents for building on its own platform: what does it write for the developer, where do their code and their org (Salesforce organization) context go while it writes, and what checks the result before it reaches production? This page answers in that order, with a private-banking example.

Building customer-facing agents with Agentforce is out of scope: there AI is the product delivered to the business, here it is the tool the work is done with, and the controls, the licences and the quality gates are different ones.

Two products with almost the same name

Salesforce documents two things under the same commercial name.

Agentforce Vibes Agentforce Vibes IDE
What it is A Visual Studio Code (VS Code) extension An IDE (integrated development environment) in the browser
Where it runs On the developer’s machine In the browser, opened from the org’s Setup
How it arrives Inside the Salesforce Extension Pack Preinstalled, with Salesforce CLI and Salesforce Extensions already in it
Editions Developer, Enterprise, Partner Developer, Performance and Unlimited Developer, and sandboxes of Enterprise, Unlimited and Professional (the last with the API Access add-on)
Permission its pages cite A chain of three pieces, below View All Data, once the terms are accepted

Salesforce Help also prints both previous names: the IDE is the browser version of VS Code “(formerly Code Builder)” and the extension is the agentic-development one “(formerly Agentforce for Developers)”. It is the first official source that asserts both renames, and this page goes no further than that sentence does.

The current names still do not agree with each other. Help calls the extension “Agentforce Vibes VS Code Extension”, the Setup screen calls it “Agentforce Vibes Extension”, the developer guide titles it plain “Agentforce Vibes”, and the IDE guide still lives under a path that reads code-builder. No source declares which is canonical, so this page leaves the question open rather than settling it.

What to install and which org to work against is the subject of Development environment, which already documents Salesforce CLI, VS Code and the Salesforce DX (Developer Experience) project.

What the tool does

There are three distinct surfaces, with three distinct behaviours.

Inline completion is a separate extension, Agentforce Vibes Autocomplete. It suggests code in Apex, JavaScript, HTML and CSS files, arrives switched on, and turns itself off when the user has been idle for a while.

Agentic chat does not only answer. It creates files, modifies code, runs commands and deploys metadata in the local workspace, and when a test fails it tries to fix it instead of stopping. It splits work between named sub-agents — Logic Builder, Component Builder, QA Validator — each in an isolated Git worktree.

Plan Mode interposes a plan — goals, non-goals, approach and numbered tasks — and no file changes until the person approves it.

Its guide lists what it is for and what it is not, and the second list is as useful as the first.

For this, per its guide Not for this, per the same guide
A Lightning Web Component (LWC) from a description Bulk record loading
Apex classes, triggers and tests Debugging production with real data
Flows, validation rules, formula fields Marketing Cloud journeys
FlexiPages and page layouts Migrating data between orgs
Converting Visualforce to LWC Approval and escalation processes
Documenting someone else’s org Installing AppExchange packages

Where the code and the context go

This is the commitment an architect has to be able to explain, and everything below comes from Salesforce’s documentation.

A prompt — the natural-language instruction sent to the large language model (LLM) — does not travel alone. The guide says only what the user explicitly provides is transmitted: the prompt text, the code or metadata it includes, the session context, and IDE environment metadata such as the language and the file type. Code not put into a prompt is not transmitted, and data is not stored after the session ends. User and org identifiers may be logged for session continuity and rate limiting, but they are not sent to the model.

Before it leaves, the prompt passes through the Einstein Trust Layer, the AI architecture Salesforce builds into the platform. There, personally identifiable information (PII) and payment card industry (PCI) data are detected and masked: the values are replaced with placeholders and restored in the response. Help states third-party zero retention without hedging: “Your data isn’t retained by third-party LLMs” and “No data is used for LLM model training or product improvements by third-party LLMs”. Of itself, Salesforce asserts the equivalent: it does not use customer code to train the global model.

Masking has a price, and the sources disagree on how much. The Agentforce Vibes guide says that with masking active the context window is capped at 115,000 tokens whatever the model’s native limit; Help, in its model-limits article, says all models are limited to 65,536 tokens. Neither prints a publication date, so there is no tie-break: both figures are live today and what fits will have to be measured in the org.

Of the IDE, Help adds a scope limit the extension does not document: it retrieves metadata only from the connected org — schema, Apex classes, triggers, LWC — and does not consult external sources such as the web or Git repositories to look for code.

Geography is left. With geographic routing on, requests go to the endpoint — the model’s access point — closest to the org. If that regional endpoint is unavailable, the request routes to the United States by default. Preventing that is another setting, in Einstein Setup, which in turn requires Data 360 turned on and which today has no effect on Anthropic or Gemini models. For an institution with data-residency requirements, that default routing is the first thing to review.

What checks the code before you deploy it

Salesforce says on three separate pages that human review is not optional: no trust layer replaces it, the agent’s output is nondeterministic, and the same prompt can give different results. But there is automatic checking as well, and it is the same for code a person writes and code the agent writes.

Salesforce Code Analyzer is the single entry point. It analyses Apex, Visualforce, flows and Lightning components, ships over 500 rules, and is used as a Salesforce CLI plugin with three commands: sf code-analyzer rules lists the rules, sf code-analyzer run executes them, and sf code-analyzer config shows the configuration.

Underneath are eight engines, all enabled by default. The two that matter here:

Engine What it analyses, per its page Dependency
PMD Static analysis in several languages; Apex, HTML, JavaScript, XML and Visualforce, with apex and visualforce by default JDK 11 or later
ESLint JavaScript, TypeScript and LWC, with its own rule catalogue for LWC None beyond Node.js

The other six are CPD, which identifies duplicated blocks and whose initialism no cited source expands; Flow Scanner, for flows, which requires Python; RetireJS, for third-party JavaScript dependencies; Regex; Salesforce Graph Engine; and ApexGuru Engine.

The other gate is coverage. To deploy Apex or package it for AppExchange, unit tests must cover at least 75% of the Apex code and they must pass. Only executable lines count, and classes annotated @isTest are excluded from the calculation.

And here is the asymmetry this page holds as its own reading, because no source writes it: of the two gates, only one enforces itself. Coverage is checked by the platform at deployment, with AI or without it; static analysis runs when somebody runs it. Code Analyzer ships the --severity-threshold flag, which makes the command exit with a non-zero code when a violation meets the threshold, and the documentation recommends calling it from continuous integration scripts. Without that, a setup is one skipped command away from deploying code nobody has analysed.

Who triggers each step between the prompt and productionA chain of seven steps in order, top to bottom, each with who triggers it. One, the prompt and the code the developer includes. Two, the Einstein Trust Layer masks PII and PCI, automatic. Three, the Salesforce LLM Gateway and the model. Four, the response returns and the masked values are restored, automatic. Five, the changes land in the workspace and the person approves them. Six, static analysis, which somebody launches. Seven, the deployment, where the platform requires 75 per cent Apex coverage and that the tests pass.Prompt and codeyou includeTrust Layer:masks PII and PCI(automatic)LLM Gatewayand modelResponse: maskedvalues restored(automatic)Changes in yourworkspace(you approve them)Static analysis(you launch it)Deployment: 75%Apex coverage(platform enforced)

When yes and when no

The criterion is whether the work is mechanical and verifiable, or depends on a decision the tool cannot make.

Case Use it when Do not use it when
New code The pattern is known and a test verifies it: a test class, an LWC from a description, a bounded refactor. The design decision is open; the agent will pick one and will not say that it was.
Data The work is on the connected org’s metadata. Real customer data is involved: its own guide points to purpose-built tools.
Data residency The org has no regional requirement. The org is in EU Operating Zone or Government Cloud, where it is not available.
Governance There is an automatic gate running analysis and coverage. Review depends on somebody remembering to launch it.

Example: a change in a private bank

A private bank needs a new field on the client record, with a validation rule and the trigger that propagates it.

  1. Access. The admin checks the chain of three pieces: Einstein enabled in the org, the PSL (permission set license) Agentforce Platform Developer and Admin provisioned, and the permission set Agentforce Developer and Admin Tools assigned. Without all three, the model selector comes up empty.
  2. Residency. The org is in the European Union but not in EU Operating Zone, so the product is available; the default routing to the United States is documented as a conscious decision.
  3. Plan. The developer describes the change in Plan Mode, corrects the field name in the plan and approves. Until then no file has changed.
  4. Review. She reviews the Apex with the questions the guide itself proposes: SOQL (Salesforce Object Query Language) queries and DML (Data Manipulation Language) statements outside loops, null checks, meaningful assertions.
  5. Gates. She runs sf code-analyzer run with a severity threshold and the tests with coverage. The deployment will require 75%; nobody will require the static analysis if it is not in the script.

What the method page covers

This page is about what Salesforce documents: what its assistant writes, where the code goes and what checks it. How a team organises itself around that — which context the AI must read before generating anything, who runs each step, and what validates the output — is a different subject, and it lives in AI-assisted Salesforce delivery, outside the knowledge base, because its authority is not Salesforce.

Before production

  1. Decide which product is in use, the extension or the IDE, and check the org’s edition against that product’s own guide.
  2. Check each user’s access chain: Einstein enabled, PSL provisioned, permission set assigned.
  3. Review geographic routing and the default routing to the United States before any code is in flight.
  4. Measure in the org what context window is left with masking on, because the two sources give different figures.
  5. Write the code-review policy the documentation itself asks for, and record what is reviewed line by line and what is not.
  6. Put sf code-analyzer run with --severity-threshold in the continuous integration script, not in somebody’s memory.
  7. Check that the Apex tests pass and cover at least 75% before deploying.
  8. Decide the billing model, Flex or Unmetered, knowing that exhausting the included allocation does not switch to Flex Credits on its own.

Official sources

Back to the knowledge base