Grounding Salesforce Agentforce with Neo4j — multi-agent setup over MCP
AI Cloud Expert
5 min read


In an earlier articles, we looked at multiple ways to ground Agentforce responses in a Neo4j knowledge graph. We focused both on different implementations (Apex actions, External Services, and MCP), as well as the overall agent architecture to correctly split the responsibilities between the data and reasoning based on the data.
That way, we’ve got to the last installment: setting up agent without custom code, purely based on configuration.
Grounding Salesforce Agentforce With Neo4j — Now Without the Custom Code
Move the question to the data, not the query plan to the generic agent.
The moment we ponder the previous integration, it recalls an old architectural principle: “Keep data and compute together”, which the generic MCP for Neo4j to certain extend violates. We’ve exposed a low-level retrieval tools and let the general-purpose agent assemble the query. That makes the integration flexible, but it also makes the caller responsible for understanding the data model, constructing a valid query, applying domain rules, and interpreting the records it receives.
Aura Agent lets us move that responsibility closer to the graph. Agentforce sends a natural-language product-recovery question through MCP. It does not need to understand data nuances, relationship types, Cypher syntax, or any data internals. Aura Agent translates the request into structured Cypher Template parameters, executes the deterministic graph operation, and returns a recommendation with its evidence.
The separation does not put every kind of compute in Neo4j Aura. Agentforce still owns the employee conversation, intent routing, Salesforce permissions, and future CRM actions. The principle is narrower: keep graph-specific computation with the graph, and keep workflow-specific computation with the workflow. MCP connects the two at the level of business intent. With Aura Agents, the integration moves where it belongs: from a technical aspect to a domain level.
A small service question with a graph-shaped answer
To move from abstraction to a concrete example, we will use one of the Neo4j example datasets, a Northwind graph: customers purchase orders, orders contain products, products belong to categories, and suppliers supply products.
The scenario can be simple: an internal representative opens a Salesforce agent and asks:
Thomas Hardy from Around the Horn says their usual product is unavailable. Review their purchasing history, identify suitable in-stock options in the same category, and give me a grounded recommendation.
This sounds like one lookup. It is really a sequence of connected questions:
- Which customer matches both the contact and company names?
- Which products has that customer ordered?
- Which historically purchased products are now out of stock or discontinued?
- Which one best fits “usual”: the product from the most distinct orders, with quantity as a tie-breaker?
- Which active, in-stock products share its category?
- Which of those has this customer already purchased?
Two agents, two jobs
As questions get more complex, the underlying data grows, we don’t want a single agent to own everything.
The Agentforce Agent needs to own the employee conversation (where the representative works — with Salesforce). The Salesforce agent recognizes the intent, and chooses the appropriate action. If we later want to create a Case, retrieve CRM activity, or enforce a Salesforce approval step, that work belongs on the Salesforce side.
The Aura Agent owns the connected retail question. It understands the domain, can resolve the customer, apply required rules, traverses the purchasing history, and returns the recommendation with its evidence.
MCP becomes the contract between them, barely becoming a protocol minimizing the API to a natural-language query. The result is a useful division of responsibility:
Agentforce
→ natural-language product question
Neo4j Aura Agent
→ customer resolution
→ deterministic Cypher Template
→ ranking and evidence
→ grounded recommendation
Agentforce
← ready-to-present answer
Aura Agent is not just a Salesforce prompt template
It is tempting to map every feature on one platform to a feature on the other. One comparison comes up quickly: is Aura Agent essentially a Salesforce prompt template? No!
The distinction is functional. A prompt template packages reusable generation instructions. An agent owns a task, chooses tools, evaluates their results, and decides how to respond. The Aura Agent includes prompt instructions, but it also does more. It has a planning and reasoning loop, selects graph-retrieval tools, executes those tools against a target instance, and can be published as a secured REST or MCP endpoint. In this architecture, Aura Agent is closer to a specialized Agentforce subagent plus its actions and instructions — but hosted on the Neo4j side and grounded in the graph.
Staying in the analogy spaces: The Aura Agent’s Cypher Template has a closer Salesforce analogue; a deterministic custom action implemented with Flow or Apex. Both package narrow business logic as something an agent can call. The difference is placement. Keeping Cypher in Aura means the graph logic and retrieval tests are kept on the graph-database level, without wrapping every query in Salesforce-specific integration code.
The authentication detail that makes the connection work
The Aura Agent MCP endpoint supports machine-to-machine authorization modes, which aligns perfectly with what Agentforce expects. The Salesforce-to-Aura connection authenticates the integration, not an individual user, therefore addresses all security and governance concerns: no individual user identity is passed to an external MCP server as well as no destructive actions can be triggered on the data side (Aura Agents allows only reading).
Less glue does not mean fewer boundaries
Aura Agent becomes a deep module: a small interface —with a single natural-language parameter, hiding substantial domain complexity. This produces locality. If the graph schema, ranking rules, privacy constraints, or Cypher change, they change on the Neo4j side. Agentforce continues sending the same business question.
Salesforce Agentforce – Multi-Agent Integration with Aura Agents – Neo4j Labs
Grounding Salesforce Agentforce with Neo4j — multi-agent setup over MCP was originally published in Neo4j Developer Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.








