afv-library/skills/developing-agentforce/assets/components/topic-with-actions.agent
Willie Ruemmele df3467f20b
@W-21955450@ Rename topic to subagent for Agent Script v2
Aligns with Agent Script v2 naming standards where `topic` is renamed
to `subagent` across all skill documentation and templates.

Changes:
- Agent Script templates: topic keyword → subagent keyword
- References: @topic.* → @subagent.*
- Documentation: Updated all skill references and guides
- Natural language references preserved in comments/descriptions
2026-04-10 08:39:39 -06:00

41 lines
1.3 KiB
Plaintext

# Topic with Actions Template
# A topic that integrates with external systems via Flow or Apex actions
# This is a PARTIAL template - use within a complete agent file
#
# Two-Level Action System:
# Level 1: topic.actions block DEFINES actions (with target:, inputs:, outputs:)
# Level 2: reasoning.actions block INVOKES them (with @actions.name, with/set)
#
# Usage: Replace {{placeholders}} with your values
# Note: Actions defined inside topic are local to that topic
topic {{topic_name}}:
description: "{{TopicDescription}}"
# Level 1: DEFINE actions available to this topic
actions:
{{action_name}}:
description: "{{ActionDescription}}"
inputs:
{{input_name}}: {{input_type}}
description: "{{InputDescription}}"
outputs:
{{output_name}}: {{output_type}}
description: "{{OutputDescription}}"
target: "{{ActionTarget}}" # flow://FlowName or apex://ClassName
reasoning:
instructions: ->
| {{TopicInstructions}}
| Use the available actions to help the user.
| Capture and communicate results clearly.
# Level 2: INVOKE the actions defined above
actions:
invoke_action: @actions.{{action_name}}
with {{input_name}}=...
set @variables.{{result_variable}} = @outputs.{{output_name}}
back_to_menu: @utils.transition to @subagent.topic_selector
description: "Return to main menu"