mcpField
S
sf-ai-agentforce-conversationdesign

sf-ai-agentforce-conversationdesign

github.com/jaganproAgent workflows42484 installsUpdated 26w ago
Repository

About sf-ai-agentforce-conversationdesign

sf-ai-agentforce-conversationdesign provides conversation design methods, guides, and templates for teams building or improving Salesforce Agentforce agents. It covers persona, topics, instructions, dialog flow, safety, escalation, and a 120-point quality assessment.

Key features

  1. 01Agent persona and tone guidance
  2. 02Topic architecture and classification methods
  3. 03Layered instruction-writing framework
  4. 04Dialog flow and utterance testing design
  5. 05Escalation, safety, and quality assessment

Use cases

  1. 01Plan a new agent's conversation structure
  2. 02Assess an existing agent and plan improvements
  3. 03Create test utterances for topic classification
  4. 04Define escalation triggers and safety boundaries

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jaganpro/sf-skills --skill sf-ai-agentforce-conversationdesign

After installing, type/sf-ai-agentforce-conversationdesignin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

CREDITS.md
LICENSE
README.md
.claude/
hooks.yaml
assets/
escalation-matrix.md
improvement-plan.md
persona-document.md
quality-scorecard.md
topic-architecture.md
utterance-library.csv
hooks/scripts/
instruction-quality-validator.py
references/
anti-patterns.md
continuous-improvement.md
conversation-patterns.md
escalation-patterns.md
guardrail-hierarchy.md
healthcare-escalation.md
industry-frameworks.md
instruction-writing-guide.md
persona-design-guide.md
quality-assessment.md
quality-metrics.md
retail-topic-architecture.md
scoring-rubric.md
service-agent-persona.md
topic-architecture-guide.md

Details

From the project README

SF-AI-Agentforce-ConversationDesign Skill

"Users don't fail conversations — conversations fail users."

Conversation design is the discipline of crafting agent interactions that feel natural, resolve issues efficiently, and gracefully handle the unexpected. This skill brings structured conversation design methodology to Salesforce Agentforce, combining industry frameworks (Google, IBM, PatternFly) with Salesforce-specific implementation patterns.


⚡ Quick Start

New agent? Start here:

  1. Design your persona → Persona Design Guide
  2. Architect your topics → Topic Architecture Guide
  3. Write instructions → Instruction Writing Guide
  4. Score your design → Quality Scorecard

Existing agent needs improvement? Start here:

  1. Run the Quality Scorecard assessment
  2. Review Anti-Patterns for quick wins
  3. Build an Improvement Plan

📚 Document Map

Tier 1 — Start Here
DocumentPurpose
This file (SKILL.md)Scoring rubric, methodology overview, core principles
README.mdQuick start, prerequisites, getting started
Tier 1.5 — Reference Guides (Extracted)
DocumentPurpose
Scoring RubricFull 8-category detailed criteria tables
Quality AssessmentAssessment process + quick health check
Continuous ImprovementIteration cycle, KPIs, utterance analysis
Tier 2 — Design Guides
DocumentPurpose
Persona Design GuideHow to define agent personality, tone, and communication style
Topic Architecture GuideBottom-up topic design, classification descriptions, scope boundaries
Instruction Writing GuideThree-level instruction framework with do's, don'ts, and examples
Tier 3 — Reference Resources
DocumentPurpose
Conversation PatternsIBM's 5 patterns mapped to Agentforce implementation
Industry FrameworksGoogle, IBM, PatternFly, Salesforce framework mappings
Anti-PatternsCommon mistakes with examples and fixes
Guardrail HierarchyFour-layer guardrail model for safety
Escalation PatternsTrigger catalog and Omni-Channel routing
Quality MetricsKPI definitions, benchmarks, measurement methods
Tier 4 — Templates & Examples
DocumentPurpose
Persona DocumentFill-in persona template
Topic ArchitectureTopic mapping worksheet
Utterance LibraryStructured utterance collection template
Escalation MatrixEscalation decision matrix
Quality Scorecard120-point assessment template
Improvement PlanPrioritized improvement template
Service Agent PersonaExample: SaaS customer service persona
Retail Topic ArchitectureExample: retail agent topic hierarchy
Healthcare EscalationExample: healthcare escalation matrix

🏆 Scoring System (120 Points)

See references/scoring-rubric.md for the full per-criterion breakdown of all 8 categories.

Category Summary
#CategoryPointsWeight
1Persona & Tone1512.5%
2Topic Architecture2016.7%
3Instruction Quality2016.7%
4Dialog Flow Design1512.5%
5Utterance Coverage1512.5%
6Escalation Design1512.5%
7Guardrails & Safety108.3%
8Continuous Improvement108.3%
TOTAL120100%
Grade Scale
GradeScore RangeDescription
A108-120Production-ready, exceptional design
B96-107Good design, minor gaps
C84-95Adequate, needs targeted improvements
D72-83Significant gaps, not production-ready
F<72Major redesign required

🎭 Persona Design

A persona defines your agent's personality, communication style, and behavioral constraints — the foundation for consistent, brand-aligned interactions.

Persona Components
  1. Identity — Name, role, department, target audience
  2. Tone Register — Casual, neutral, or formal (Agentforce setting)
  3. Personality Traits — 3-5 traits that shape response style
  4. Communication Style — Sentence length, vocabulary level, empathy patterns
  5. Limitations — What the agent explicitly will not do
  6. Messages — Welcome message and error/fallback message (<=800 chars each)
Salesforce Implementation
Agent Builder → Agent Settings → Instructions (Agent-Level)
Agent Builder → Agent Settings → Tone (Casual/Neutral/Formal)
Agent Builder → Channels → Welcome Message / Error Message

The persona lives primarily in agent-level instructions. Write them like training a new employee on Day 1 — focus on who they are and how they communicate, not on specific task procedures.

Deep Dive: Persona Design Guide | Template: Persona Document | Example: Service Agent Persona


🏗️ Topic Architecture

Topics group related actions under classification descriptions for routing. Use bottom-up design: list all actions → group by user intent → write classification descriptions → test for semantic distinctness.

Architecture Rules
RuleGuidelineRationale
Topic count<=10 per agentMore topics = more classification ambiguity
Actions per topic<=5 per topicKeeps topics focused and testable
Classification overlap<30% shared vocabularyPrevents misrouting between similar topics
Scope boundariesExplicit out-of-scope listPrevents hallucination on unknown intents
Classification Descriptions

The single most important text in your agent design — they determine routing accuracy.

✅ GOOD: "This topic handles questions about existing order status, including
tracking information, estimated delivery dates, and order modification
requests. It does NOT handle new order placement or returns."

❌ BAD: "Order stuff"

Test: Can you read two descriptions and immediately tell which utterance belongs where?

Deep Dive: Topic Architecture Guide | Template: Topic Architecture | Example: Retail Topic Architecture


✍️ Instruction Writing

Instructions operate at three levels: Agent-level (persona, global rules, 200-500w), Topic-level (workflow logic, 100-300w), Action-level (when/how to invoke, 50-150w).

Core Principles
  1. Guidance over determinism — Guide reasoning, don't hard-code every decision. "Prioritize empathy and escalate if unresolved within 2-3 exchanges" vs scripting every anger keyword.
  2. Positive framing — "Always verify identity before accessing account details" not "Don't ever access without verifying."
  3. Business principles, not decision trees — If your instruction contains if...then...else with thresholds, it belongs in Flow/Apex.
  4. Knowledge over hard-coding — Use Knowledge actions (RAG) for policies, don't inline policy text in instructions.

Deep Dive: Instruction Writing Guide


🔄 Dialog Flow Patterns

Every conversation follows a six-phase lifecycle: Greeting → Classification → Gathering → Processing → Response → Close.

Key design rules:

  • Progressive disclosure: Max 2-3 choices per turn. If more options exist, ask a qualifying question first.
  • Context preservation: Reference prior turns, avoid re-asking for information already provided.
  • Error recovery: Define clarification prompts, disambiguation paths, and graceful fallbacks for every phase.
  • Explicit closing: Summarize what was accomplished, offer follow-up, farewell appropriate to tone.

📝 Utterance Design

Utterances are test cases for your topic architecture — they validate that classification descriptions route correctly.

Categories & Targets
CategoryPurposeTarget per Topic
Happy PathPrimary intent, clear phrasing>=5
SynonymAlternate vocabulary>=3
Edge CaseAmbiguous, multi-intent>=2
AdversarialInjection, manipulation (global)>=5
Out-of-ScopeShould NOT match (global)>=5

Process: Start with real data (CRM cases, chat logs) → brainstorm synonyms → add edge cases → include adversarial → test in Testing Center → iterate on failures.

Template: Utterance Library


🚨 Escalation Design

Escalation is not failure — it's a safety net ensuring customers always reach resolution.

Trigger Catalog
Trigger TypeConditionPriority
ExplicitCustomer requests human agentP1
SafetySelf-harm, threats, emergency, legalP1
SentimentCustomer frustration or angerP2
Complexity>6 turns without resolutionP2
PolicyRequest exceeds agent authorityP2
TechnicalAction failure, system errorP3

When escalating, pass: conversation transcript, customer identity, issue summary, actions taken, and escalation reason. Agentforce provides a pre-built Escalation Topic that routes via Omni-Channel.

Deep Dive: Escalation Patterns | Template: Escalation Matrix


🛡️ Guardrails & Safety

Safety operates through four layers: Einstein Trust Layer (platform — toxicity detection, PII masking, automatic), Topic Classification (scope boundaries as first defense), Instructions (behavioral constraints — "never provide legal/medical advice"), Flow/Apex (deterministic business rule enforcement).

Critical Rule: Never rely on instructions alone for safety-critical decisions. Instructions are probabilistic. Financial limits, compliance checks, and approval gates MUST be in Flow or Apex.

Deep Dive: Guardrail Hierarchy


📊 Quality Assessment & Continuous Improvement

See references/quality-assessment.md for the full assessment process and 5-question quick health check.

See references/continuous-improvement.md for the Monitor → Analyze → Fix → Retest → Deploy iteration cycle, KPI targets, and utterance analysis process.


⚠️ Anti-Patterns

#Anti-PatternImpactFix
1Negative instructionsConfuses LLM reasoningReframe positively
2Over-constrainingRigid, brittle responsesUse guiding principles
3Business rules in instructionsInconsistent enforcementMove to Flow/Apex
4Monolithic topicsPoor classification accuracySplit into focused topics
5Overlapping classificationsMisroutingMake descriptions distinct
6Missing escalation pathsDead-end conversationsDefine triggers for all failure modes
7No utterance testingUntested classificationBuild utterance library
8Hard-coded policiesStale informationUse Knowledge actions
9Ignoring contextRepetitive re-askingLeverage conversation state
10Happy-path-only testingFragile in productionTest edge cases and adversarial

Deep Dive: Anti-Patterns — Full examples with before/after fixes.


🔗 Chain Integration

This skill is the first step in the Agentforce development chain:

From This SkillTo SkillWhat's Handed Off
Topic architecturesf-ai-agentscriptTopic names, actions, classification descriptions
Instruction setssf-ai-agentscriptThree-level instructions for agent script
Utterance librarysf-ai-agentforce-testingTest cases for multi-turn testing
Escalation matrixsf-flowEscalation flow logic
Action definitionssf-apex / sf-flowAction implementation requirements

📎 Credits & References

  • Google Conversation Design Guidelines
  • IBM Natural Conversation Framework
  • Red Hat PatternFly AI Design System
  • Salesforce Conversational AI Design Guide
  • Salesforce Architect: Agentic Patterns & Taxonomy

See CREDITS.md for full attribution.

Comments

Markdown supported