Study guide

6.1 Agentforce Data Library: Types and Concepts

Salesforce Certified Agentforce Specialist Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & How Agentforce Agents Work

1.1 Agentforce Specialist (AI-201) Exam Facts & Spring '26 Blueprint 1.2 How an Agent Works & the Building Blocks of Agent Script 1.3 Hybrid Reasoning: Agent Script in Canvas View and Script View

2 Chapter 2: Deterministic Control, Topics (Subagents) & Actions

2.1 Deterministic Behavior: Filters, Variables & Template Expressions 2.2 Standard and Custom Topics (Subagents) 2.3 Standard and Custom Agent Actions

3 Chapter 3: Agent Types, Security Context, Channels & Agent API

3.1 When to Use an Employee Agent or a Service Agent 3.2 Security Context: Who the Agent Runs As and How It Affects Actions 3.3 Connecting Agents to Channels: Digital Experiences, Email, Voice & Slack 3.4 When to Use the Agent API

4 Chapter 4: Prompt Builder Fundamentals

4.1 When to Use Prompt Builder 4.2 Access Controls Governing Prompt Templates 4.3 Prompt Template Types: Field Generation, Flex & More 4.4 Creating, Activating & Executing Prompt Templates

5 Chapter 5: Grounding, Prompt Best Practices, Trust Layer & Model Access

5.1 Choosing the Right Grounding Technique 5.2 Best Practices for Writing Effective Prompts 5.3 Einstein Trust Layer Security and Privacy Features 5.4 Managing and Preventing Access to Specific Models

6 Chapter 6: Data 360 Fundamentals for Agentforce

6.1 Agentforce Data Library: Types and Concepts 6.2 Chunking: Breaking Content Into Retrievable Units 6.3 Indexing and Search Types: Vector, Hybrid & Keyword 6.4 Retrievers: Individual, Ensemble & Filtered Retrieval

7 Chapter 7: Testing Agents with Testing Center

7.1 Testing an Agent with Testing Center 7.2 How Testing Center Evaluations Work

8 Chapter 8: Deploying Agents and Prompt Templates

8.1 Deploying an Agent from Sandbox to Production 8.2 Deploying Prompt Templates from Sandbox to Production

9 Chapter 9: Governance and Observability

9.1 Managing and Monitoring Agents 9.2 Agent Analytics and Agent Optimization

10 Chapter 10: Multi-Agent Orchestration, MCP & A2A

10.1 When a Multi-Agent Architecture Is Appropriate 10.2 Open Multi-Agent Protocols: MCP and A2A

6.1 Agentforce Data Library: Types and Concepts

Key Takeaways Explain This Topic AI

Creating a data library automatically sets up a Data 360 data stream, data lake and data model objects, a search index, and a retriever.

Agentforce Data Libraries can be based on Knowledge articles and fields or uploaded files; existing web search libraries are read-only, and custom retriever libraries connect other Data 360 retrievers.

Agents use a data library through the Answer Questions with Knowledge action, which uses a prompt template to return citation-rich, grounded responses.

Data libraries require Data 360 and consume Data 360 credits for processing and queries.

Data library changes made in a sandbox can't be deployed back to production, and uploaded files aren't copied into sandboxes.

Last updated: September 2026

6.1 Agentforce Data Library: Types and Concepts

Quick Answer: An Agentforce Data Library connects agents and AI features to trusted unstructured or semi-structured content , such as knowledge articles, uploaded files, and web sources, so responses are grounded in your organization's information. Creating a library automates the Data 360 setup : data stream → data lake object → data model object → mapping → search index → chunking → retriever . Agents use the library through the Answer Questions with Knowledge action.

Why Data Libraries Exist

Long knowledge articles and documents are slow to search, and LLMs can process only a limited amount of text per call. A data library solves this with retrieval-augmented generation (RAG) :

Content is split into chunks .

Chunks are indexed in a search index.

At run time, a retriever finds the chunks most similar to the user's question.

Those chunks are inserted into the prompt , and the LLM generates a grounded answer.

The benefits are accuracy (responses checked against your content), personalization , trust (citations), and efficiency (only relevant chunks use the token budget).

Data Library Types

Type Source content Notes

Knowledge Salesforce Knowledge articles and selected content fields Choose the fields to chunk and turn citations on or off. Libraries update when articles change, such as when new articles are added

File upload Uploaded documents such as PDFs Add or delete files to update. Files aren't copied into sandboxes

Web search Web sources Existing web search libraries are read-only : you can view and manage them but can't create new ones . They create a retriever but no search index

Custom retriever Any active retriever you built in Data 360, including an ensemble retriever Connect more data sources, assign multiple libraries' content through an ensemble, or link companion orgs (Data Cloud One) to home-org libraries

Retriever name prefixes help you recognize what a custom retriever points to: File_… for uploaded-file indexes, KA_… for Knowledge indexes, and Web_… for web sources.

What Happens When You Save a Library

A data stream is created.

Data lake and data model objects are created and mapped .

The search index is created. This requires the previous steps to be successful and active.

Chunking begins. Its duration depends on the number, size, and complexity of articles or files and the number of Knowledge fields selected.

After chunking completes and the index is ready, the retriever is created. Each data library has its own retriever , even when several retrievers point to the same search index.

A status card on the library setup page tracks each stage and links to the underlying Data 360 objects. Statuses:

  • Status Meaning
  • Failed Not usable. The configuration may be saved, but a retriever wasn't created
  • Not Started Retriever and search index created, but chunking hasn't started
  • In Progress Data is being chunked; the library isn't ready
  • Success Chunking and search index are complete and ready to use

Loading diagram... Data Library setup pipeline and run-time use

How Libraries Work at Run Time

The user's query is added to the prompt template behind the action. That's typically the Answer Questions with Knowledge action, which you can customize with a Knowledge Answers template.

The template references the library's retriever , which searches the search index for the most relevant chunks.

The chunks are inserted into the prompt, and the LLM generates a response from the query, the retrieved content, and the instructions.

The response is checked against the prompt instructions (Salesforce's data library documentation calls this component the Service Planner), and the user receives a contextual answer.

Connecting a library to an agent

In Agentforce Builder , select a library in the agent's Data section. The Answer Questions with Knowledge action grounds responses with it.

You can also change or remove a library from a feature's setup. Some features, such as Einstein Service Replies , also use data libraries.

Answer Questions with Knowledge delivers structured, citation-rich responses grounded in indexed content.

Permissions

Library type Access and permissions

All Data Cloud User permission set, with the default data space added, to access the retriever. Prompt Template User to access the hydrated prompt and call the LLM

Knowledge Source articles public and published ( IsVisibleInPkb true), visible data categories , Read access to the Knowledge object and indexed fields, and the Allow View Knowledge permission. Agents also need Access Conversation Entries and least-privilege Knowledge object access

File Access to the default data space

For Service agents, these permissions go on the agent user . For Employee agents, they go on end users .

Sandbox, Billing, and Other Considerations

  • Area Consideration
  • Data 360 prerequisite Data 360 must be set up to use data libraries

Credits Libraries consume Data 360 credits , such as unstructured data processed when building the index and data queries when retrieving. Check Digital Wallet

Sandbox support Supported in Developer, Developer Pro, Partial Copy, and Full Copy sandboxes. Data 360 sandboxes contain metadata only

Files in sandboxes Files aren't copied. Re-upload them. For Knowledge, confirm articles exist and refresh the related data streams

Retrievers in sandboxes Deactivate and reactivate the retriever (files), or update and revert a Knowledge content field, to sync retriever metadata

Deployment Making data library changes in a sandbox and deploying them to production isn't supported. Recreate the library in the target org

Filters Dynamic pre-filters aren't supported with the Answer Questions with Knowledge prompt template, only static pre-filters. Workarounds include one library per category or brand, or a custom Apex action that passes filter values

Companion orgs Data libraries don't directly support Data Cloud One companion orgs; use a custom retriever library pointing to a home-org retriever

Scenario Practice

Scenario Best answer

A Service agent must answer return-policy questions from 300 published knowledge articles with citations Knowledge-based Data Library + Answer Questions with Knowledge

Reps don't see answers from the library in Service Replies Check Data Cloud User with the default data space, Prompt Template User , and Knowledge access

A library shows Not Started The index and retriever exist, but chunking hasn't begun; wait for In Progress

Answers must come from two separate content sets Build an ensemble retriever and connect it with a custom retriever library

  • A team built a library in a sandbox and wants to deploy it Not supported. Recreate it in production
  • Exam Traps

A data library isn't just a folder. It's an automated Data 360 retrieval pipeline.

You can't create new web search libraries today.

Answer Questions with Knowledge is the link between agents and libraries.

Unpublished or internal-only articles aren't indexed for Knowledge libraries.