GenAiPlugin represents an agent topic: a category of actions related to a particular job that an AI agent can perform. It combines the topic's scope, runtime selection utterances, instructions, and action connections. Agents must be enabled in the org for this metadata type to be available.
Retrieval scope matters: use GenAiPlugin for topics in the asset library. Topics created within a particular agent are retrieved through GenAiPlannerBundle. A topic visible inside an agent is therefore not necessarily returned by a GenAiPlugin retrieval.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The metadata component name inherited from Metadata. Keep this inherited field distinct from the topic's required developerName. |
developerName |
Required topic API name. It must be unique across custom and customized topics in the org and follow the naming restrictions described below. |
language |
Required language of the topic. Embedded utterances and instructions have their own language fields. |
masterLabel |
Required topic label. The label does not replace the topic's API identity. |
pluginType |
Required classification. Allowed values are Topic and APICustomTopic. |
description |
Describes the topic. This is separate from the instruction content stored in each instruction's description. |
scope |
Describes the specific job the topic is intended to perform. |
aiPluginUtterances |
Embedded utterances that can be used to select the topic at runtime. Each entry stores its selection text in utterance; these entries do not implement actions. |
genAiPluginInstructions |
Embedded topic instructions. Each entry stores instruction content in description and uses sortOrder to determine instruction execution order. |
genAiFunctions |
Functions included in the topic. Each entry requires functionName, the function's API name. The recognized outgoing reference connects this field to GenAiBundle. |
localActionLinks |
Local action links whose entries contain functionName. |
localActions |
Inline action definitions. Each action pairs invocationTarget with invocationTargetType and can contain action-specific confirmation and parameter-mapping settings. |
canEscalate |
Indicates whether the topic is eligible for escalation to a rep. Eligibility does not guarantee escalation. |
plannerField |
Identifies the topic's parent planner. This parent information is distinct from incoming topic references and from retrieval scope. |
Behavior and Constraints
Topic identity has specific naming rules. The required developerName must start with a letter, contain only alphanumeric characters and underscores, contain no spaces or consecutive underscores, and not end with an underscore. It must be unique across all custom and customized topics in the org. Neither masterLabel nor the natural-language text in scope substitutes for this API name.
Topic descriptions, selection utterances, and instructions serve different purposes. The topic-level description describes the topic, while scope describes its intended job. Entries in aiPluginUtterances provide runtime selection inputs. Entries in genAiPluginInstructions hold instructions in their own description fields.
AiPluginUtteranceDef and GenAiPluginInstructionDef are embedded components, not separately deployed assets. Each entry has its own developerName, language, and masterLabel; those values belong to the individual utterance or instruction, not to the enclosing topic. Their developer names also follow the documented letter, alphanumeric, and underscore restrictions.
An instruction's sortOrder is a numerical value that determines instruction execution order. It belongs to the instruction entry, not to genAiFunctions. Do not interpret the position of a function in that list as an instruction-order setting.
Local action settings apply per action. Within localActions, invocationTarget identifies the invocation target and invocationTargetType identifies its kind. Supported kinds include apex, flow, and generatePromptResponse, among others. The following settings remain scoped to each inline action:
-
isConfirmationRequiredis an action-level setting, not a topic-wide setting. -
mappingAttributesholds parameter mappings. Each mapping'sparameterTypedistinguishesinputfromoutput.
Setting canEscalate makes the topic eligible for escalation to a rep; it does not establish that an escalation will occur.
Deployment and Retrieval
GenAiPlugin components use the .genAiPlugin suffix and are stored in the genAiPlugins directory. The type supports the * wildcard in a package.xml manifest: use GenAiPlugin as the type name and * as the member to request its available components.
The wildcard does not change the retrieval boundary. Retrieve asset-library topics with GenAiPlugin, and retrieve topics created within an agent with GenAiPlannerBundle. These types are not interchangeable retrieval scopes. The presence of plannerField is parent-planner information, not a replacement for that distinction.
Deploy utterances and instructions as part of their enclosing topic. Do not treat AiPluginUtteranceDef or GenAiPluginInstructionDef entries as separate deployment assets.
When a change set includes an agent bundle, separately adding the same agent-local topic or action can create duplicate inclusion. A community report links this condition to a generic internal server error and reports that removing the duplicate from the change set resolved it. This is a conditional diagnostic, not a universal explanation for internal server errors.
Relationships
The recognized element references connect planners and packers to topics, and topics to function bundles. They support impact analysis, but do not establish actual runtime use or a mandatory deployment order. Keep these references separate from plannerField, which describes the parent planner, and from GenAiPlannerBundle, which provides the agent-local retrieval scope.
References
-
GenAiBundle:functionNamein topic function entries.
Referenced By
-
GenAiPacker:genAiPluginName. -
GenAiPlanner:genAiPluginName.
Reported Issues
-
Removing duplicate agent-local components reportedly resolved a change-set internal server error. In November 2025, an administrator reported the failure when a change set separately included the same local topic or action already contained in its
GenAiPlannerBundle. Generated suffixes on the local topic and action names reportedly made the duplicates difficult to recognize. The reported solution was to remove the duplicate entries from the change set. Change-set duplicate report. -
Retrieval and deployment through
GenAiPlannerBundlewere reported to succeed when standalone action retrieval was unsuccessful. In a March 2026 discussion, the question described a manifest that retrieved topics but returned "No components retrieved" whenGenAiFunctionwas added. A respondent reported successfully retrieving and deploying the agent, topics, and actions through the bundle. This supports checking whether the missing components are agent-local; it does not change the asset-library scope ofGenAiPlugin. Bundle retrieval report.
Common Questions
Why is an agent topic missing from my GenAiPlugin retrieval?
GenAiPlugin retrieves asset-library topics. Topics created within a particular agent are retrieved through GenAiPlannerBundle, even when they are visible as topics inside the agent.
Which GenAiPlugin fields are required?
The required topic-level settings are developerName, language, masterLabel, and pluginType. The allowed pluginType values are Topic and APICustomTopic. The developer name must be unique across custom and customized topics and follow the naming restrictions above.
How do I control topic instruction order?
Use sortOrder on each entry in genAiPluginInstructions. The instruction text belongs in that entry's description. This ordering field does not belong to the topic's function list.
Can I deploy topic utterances and instructions separately?
No. AiPluginUtteranceDef and GenAiPluginInstructionDef entries are embedded components deployed with their enclosing topic. Their individual names, labels, and languages do not make them separate deployment assets.
Why does my agent change set fail with an internal server error?
One reported cause is duplicate inclusion: the same agent-local topic or action appears both inside GenAiPlannerBundle and separately in the change set. Removing the duplicate resolved the reported case. This condition does not explain every internal server error.