Home / Integrations / Hugging Face

Integration · AI and Machine Learning

Connect Hugging Face open-source AI models to Salesforce Agentforce

Hugging Face is the platform for open-source machine learning models and datasets, used by engineering and data science teams to access, fine-tune, and deploy thousands of pre-trained models — from sentence transformers and text classifiers to multimodal models and domain-specific language models. For organisations that have chosen open-source AI for cost, data sovereignty, or customisation reasons, Hugging Face model deployments represent a significant AI investment that should be connected to the commercial workflows in Salesforce. When a Hugging Face inference endpoint can classify a customer message with the organisation's fine-tuned model, that classification should route a Salesforce case. When a semantic search model can find the most relevant knowledge base article, Agentforce should surface it during a service interaction. When Emerge Digital connects Hugging Face to Agentforce, open-source model capabilities are available as tools in Agentforce's reasoning and action layer alongside proprietary AI capabilities.

All integrations

What this unlocks

  • Hugging Face Inference API calls during Agentforce conversations: Agentforce agents can call Hugging Face Inference Endpoints — whether the Hugging Face hosted API or a custom private endpoint on your infrastructure — as a tool during service and commercial workflows, using open-source models for classification, summarisation, and semantic matching tasks.
  • Fine-tuned domain classification models for service triage: organisations that have fine-tuned a text classification model on their support ticket history can have Agentforce invoke that model to classify incoming cases by category and urgency — routing the case to the correct team with the classification as context, rather than relying on keyword matching or a general-purpose classifier.
  • Sentence transformer semantic search for knowledge base retrieval: Hugging Face sentence transformers encode text as semantic vectors — Agentforce can use a deployed sentence transformer to find the knowledge base article most semantically similar to a customer's question, surfacing the relevant content during a service interaction rather than relying on keyword search.
  • Sovereign AI: open-source models on private infrastructure for data-sensitive industries: organisations in regulated industries or with data sovereignty requirements can deploy Hugging Face models on their own infrastructure rather than sending customer data to a proprietary AI API — Agentforce integrates with the private endpoint, keeping data within the organisation's perimeter.

In the customer journey

Fine-tuned support classifier routes incoming cases accurately

An engineering team fine-tuned a BERT-based text classifier on 18 months of closed support tickets. The model classifies tickets into 12 support categories with 89% accuracy — significantly better than the keyword routing rules in use. Agentforce invokes the Hugging Face endpoint when a new case is created, applies the classification, and routes the case to the specialised support queue. The routing accuracy improvement reduces average case resolution time because cases reach the right team on the first assignment.

Semantic search surfaces the relevant knowledge article during a call

A customer contacts support with a complex configuration question. The agent invokes a sentence transformer deployed on Hugging Face to encode the customer's question and search the knowledge base for the most semantically similar articles. The model returns three highly relevant articles — the top result is a step-by-step configuration guide that directly addresses the customer's setup. The agent surfaces the article in the interaction and resolves the query using the specific guidance, without the support rep searching through the knowledge base manually.

Domain-specific LLM generates a draft response for complex cases

A specialised financial services support team uses a Hugging Face-hosted language model fine-tuned on regulatory documentation to draft responses to complex compliance-related support questions. Agentforce invokes the model with the case content and the relevant regulatory context, receives the draft response, and routes it to the support specialist for review and sending. The specialist reviews rather than drafts — cutting response time on complex cases from two hours to 20 minutes.

Why not using Hugging Face and Salesforce independently?

Organisations use Hugging Face models in data science and engineering workflows; they use Salesforce for commercial and service management. The gap is that model outputs — a classification, a semantic match, a generated text — are not available to the Salesforce agent handling the live customer interaction without a custom integration. Emerge Digital builds the tool-call layer that makes Hugging Face inference endpoints available to Agentforce agents as a first-class capability — so the fine-tuned domain models the engineering team built drive outcomes in the commercial workflow rather than running only in offline batch processes.

Hugging Face's Agentforce integration is relevant for organisations that have invested in open-source AI models for classification, semantic search, or domain-specific reasoning, and want those capabilities available to their Salesforce Agentforce agents during live commercial and service interactions. It is most valuable where a fine-tuned domain model outperforms general-purpose AI for a specific commercial task — support triage, knowledge retrieval, compliance generation.

How Emerge integrates Hugging Face

Emerge Digital designs the Hugging Face + Agentforce integration as a consulting engagement. We assess which Hugging Face models and endpoints — hosted Inference API or private deployed endpoints — are relevant to the commercial workflows in scope, design the tool-call layer that gives Agentforce agents access to model capabilities with the correct input formatting and context, handle the private endpoint authentication and data handling requirements, and test the end-to-end classification and retrieval workflows. For data-sovereign deployments, Emerge advises on the private endpoint architecture that keeps data within the organisation's infrastructure.

How we structure an engagement

FAQ

Does this work with Hugging Face's hosted Inference API or only with private endpoints?

Both. Hugging Face's hosted Inference API provides access to thousands of models without infrastructure management. Private Inference Endpoints deploy a specific model on dedicated infrastructure within a chosen cloud region. Emerge designs the integration around the endpoint type your organisation uses — hosted for general models, private for fine-tuned or data-sensitive models.

We want to use a specific open-source model — Llama, Mistral, Falcon — via Hugging Face. Does the integration support those?

Yes. The integration is model-agnostic at the Hugging Face endpoint level. Any model deployed as a Hugging Face Inference Endpoint — including Llama, Mistral, Falcon, and other open-source LLMs — can be made available as a tool in Agentforce. The model selection and endpoint configuration are defined during the engagement.

How does this relate to Salesforce's own Einstein AI features?

Salesforce Einstein provides built-in AI features within the Salesforce platform — Einstein Copilot, case classification, and opportunity scoring. Hugging Face models are external capabilities that can complement Einstein where a fine-tuned domain model provides better performance for a specific task, or where data sovereignty requires keeping AI processing on the organisation's own infrastructure.

How long does a Hugging Face + Agentforce integration take?

A focused engagement typically runs five to eight weeks: identifying the specific Hugging Face models and endpoints in scope, designing the tool-call layer with correct input/output handling, building and testing the integration workflows, and validating model performance in the Agentforce commercial context. Engagements involving fine-tuning or private endpoint deployment may require additional time.

Ground your agents in Hugging Face.

Tell us what your agents need to read and write in Hugging Face, and we'll design the integration and the governance around it.

Talk to the practice

Prefer email? Write to the practice instead.