/sf-platform-extras:agentforce-offline-experimentation-runfrom sf-platform-extras
Tests how different LLM models handle existing Agentforce agent conversations by fetching session traces from Data Cloud STDM, replaying prompts via SFAP AI Gateway, and scoring across four metrics.
Ships in sf-platform-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Execute this workflow when a user wants to test how a different LLM model would handle existing Agentforce agent conversations. Fetches session traces from Data Cloud STDM, replays prompts via the SFAP AI Gateway REST API with structured tool calling, scores across four metrics (topic agreement, function name accuracy, function argument accuracy via LLM-as-judge, text response quality via LLM-as-judge), and produces a run directory with units.jsonl, results.jsonl, summary.json, and an HTML report. Requires Data Cloud with Agentforce Activity data streaming enabled, an authenticated org, and a target model ID (llmgateway__ prefix for SFAP replay). Estimated runtime: 10-30 minutes for 10 sessions.
discover-data-space → verify-stdm-availability → discover-agents → list-available-models (if user needs help choosing) → find-sessions → get-conversation-details → get-llm-step-details → obtain-sfap-token → replay-turn-prompts (scoring happens inline) → generate-run-results → generate-html-report. WORKFLOW GATE: Do not proceed past Phase 0 until org alias (auto-discover from authenticated orgs), agent API name (auto-discover from STDM), and target model ID (ask user) are all confirmed. SFAP JWT expires after ~2 hours. For 20+ session replays, refresh the token between batches. Each SFAP replay call takes ~1-3 seconds; keep under 20 sessions for reasonable wall-clock time (~10-30 minutes).
Preconditions:
DataCloudProvisioned)EinsteinLlmEnabled)OrgAuthenticated)Operations grouped by purpose. Use these as the building blocks for the workflows above.
| Operation | Purpose | Status | Call | Depends on |
|---|---|---|---|---|
discover-data-space | read | implemented | getAllDataSpaces | — |
verify-stdm-availability | validate | implemented | querySql | discover-data-space |
discover-agents | read | implemented | querySql | verify-stdm-availability |
list-available-models | read | implemented | queryAiModel | — |
find-sessions | read | implemented | querySql | verify-stdm-availability, discover-agents |
get-conversation-details | read | proposed | querySql | find-sessions |
get-llm-step-details | read | proposed | querySql | get-conversation-details |
obtain-sfap-token | validate | proposed | — | — |
replay-turn-prompts | read | proposed | — | get-llm-step-details, obtain-sfap-token |
score-exact-matches | read | proposed | — | replay-turn-prompts |
judge-function-args | read | proposed | — | score-exact-matches, obtain-sfap-token |
judge-text-responses | read | proposed | — | replay-turn-prompts, obtain-sfap-token |
generate-run-results | write | proposed | — | score-exact-matches, judge-function-args, judge-text-responses |
generate-html-report | write | proposed | — | generate-run-results |
graph TD
discover_data_space["discover-data-space (read)"]
verify_stdm_availability["verify-stdm-availability (validate)"]
discover_agents["discover-agents (read)"]
list_available_models["list-available-models (read)"]
find_sessions["find-sessions (read)"]
get_conversation_details["get-conversation-details (read)"]
get_llm_step_details["get-llm-step-details (read)"]
obtain_sfap_token["obtain-sfap-token (validate)"]
replay_turn_prompts["replay-turn-prompts (read)"]
score_exact_matches["score-exact-matches (read)"]
judge_function_args["judge-function-args (read)"]
judge_text_responses["judge-text-responses (read)"]
generate_run_results["generate-run-results (write)"]
generate_html_report["generate-html-report (write)"]
discover_data_space --> verify_stdm_availability
verify_stdm_availability --> discover_agents
verify_stdm_availability --> find_sessions
discover_agents --> find_sessions
find_sessions --> get_conversation_details
get_conversation_details --> get_llm_step_details
get_llm_step_details --> replay_turn_prompts
obtain_sfap_token --> replay_turn_prompts
replay_turn_prompts --> score_exact_matches
score_exact_matches --> judge_function_args
obtain_sfap_token --> judge_function_args
replay_turn_prompts --> judge_text_responses
obtain_sfap_token --> judge_text_responses
score_exact_matches --> generate_run_results
judge_function_args --> generate_run_results
judge_text_responses --> generate_run_results
generate_run_results --> generate_html_report
discover-data-spaceDiscover active Data Cloud data spaces in the org
Call: getAllDataSpaces — status: implemented
discover-agentsQuery STDM for distinct agent + version combinations that have session traces
Call: querySql — status: implemented
Depends on: verify-stdm-availability
list-available-modelsList Einstein LLM models configured in the org to help the user choose a target model
Call: queryAiModel — status: implemented
find-sessionsFind recent Agentforce sessions in STDM filtered by agent API name, version, and date range
Call: querySql — status: implemented
Inputs:
agent_api_name (String) — Agent API name selected in discover-agentsagent_version_api_name (String) — Agent version API name selected in discover-agentsstart_date (String)end_date (String)max_sessions (Integer)Depends on: verify-stdm-availability, discover-agents
get-conversation-detailsFetch interactions (turns) for each session from the STDM Interaction DMO
Call: querySql — status: proposed
Depends on: find-sessions
get-llm-step-detailsFetch interaction steps including LLM inputs and outputs for each interaction
Call: querySql — status: proposed
Depends on: get-conversation-details
replay-turn-promptsExtract structured messages (system/assistant/user) from STDM LLM step inputs, convert to OpenAI-format messages array preserving role positions, extract tool definitions dynamically from gen_ai.request.tools, classify each step as router (topic) or action based on tool signatures, and replay via SFAP REST API POST /ai/gpt/v1/chat/generations with tool_choice=required
Status: proposed
Inputs:
target_model (String) — Target model ID (llmgateway__ prefix, e.g. llmgateway__OpenAIGPT41)Depends on: get-llm-step-details, obtain-sfap-token
score-exact-matchesCompute exact-match scores for topic agreement and function name accuracy
Status: proposed
Depends on: replay-turn-prompts
judge-function-argsLLM-as-judge scoring of function arguments when function names match (exact or lenient)
Status: proposed
Depends on: score-exact-matches, obtain-sfap-token
judge-text-responsesLLM-as-judge scoring of text responses for turns that end with text output
Status: proposed
Depends on: replay-turn-prompts, obtain-sfap-token
generate-run-resultssfap_replay.py produces the run directory with units.jsonl (one line per replay unit with request and golden), results.jsonl (one line per scored result), and summary.json (run config, model, counts, aggregate scores). Scoring happens inline during replay — no separate scoring step needed.
Status: proposed
Depends on: score-exact-matches, judge-function-args, judge-text-responses
generate-html-reportBuild a self-contained HTML analysis report with scorecards and failure breakdown
Status: proposed
Depends on: generate-run-results
verify-stdm-availabilityVerify STDM (Session Trace Data Model) is queryable in Data Cloud
Call: querySql — status: implemented
Depends on: discover-data-space
obtain-sfap-tokenObtain an SFAP JWT token via org session authentication and the /ide/auth endpoint
Status: proposed
Inputs:
org_alias (String) — Authenticated org alias for token resolutionscripts/bt_compare.py (opens in a new tab)scripts/bt_fetch.py (opens in a new tab)scripts/bt_patch_agent.py (opens in a new tab)scripts/btlib/__init__.py (opens in a new tab)scripts/btlib/agentpatch.py (opens in a new tab)scripts/btlib/agentsrc.py (opens in a new tab)scripts/btlib/cache.py (opens in a new tab)scripts/btlib/compare.py (opens in a new tab)scripts/btlib/fetch.py (opens in a new tab)scripts/btlib/judge.py (opens in a new tab)scripts/btlib/messages.py (opens in a new tab)scripts/btlib/patch.py (opens in a new tab)scripts/btlib/redact.py (opens in a new tab)scripts/btlib/results.py (opens in a new tab)scripts/btlib/scoring.py (opens in a new tab)scripts/btlib/sfap.py (opens in a new tab)scripts/btlib/splits.py (opens in a new tab)scripts/btlib/stdm.py (opens in a new tab)scripts/btlib/tokens.py (opens in a new tab)scripts/btlib/units.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agentforce, offline-experimentation, llm-evaluation, data-cloud, sfap
npx claudepluginhub cloudzlab/sf-team-skills --plugin sf-platform-extras3 plugins ship this exact skill · first indexed Nov 24, 2026
26 skills in this plugin
/agentforce-hyperclassifier-configureOnboard a customer org and evaluate or improve Agentforce HyperClassifier routing descriptions against labeled utterances. TRIGGER for classifier evaluation, expected-versus-actual routing reports, repeated regressions, or description optimization with customer ECA authentication. DO NOT TRIGGER for general agent conversation testing, runtime session tracing, or automatic agent deployment./design-systems-slds2-migrateMigrate Lightning Web Components from SLDS 1 to SLDS 2 by running the SLDS linter and fixing violations. Use this skill whenever users mention SLDS 2, SLDS uplift, linter violations, LWC token migration, class overrides, hardcoded CSS values that need SLDS hook replacement, or styling hook selection. Covers all styling hook categories — color, spacing, sizing, typography, borders, radius, and shadows. Also use when users mention no-hardcoded-values, no-slds-class-overrides, lwc-to-slds-hooks, no-deprecated-tokens-slds1, or ask about SLDS component migration — even if they don't explicitly say "uplift" or "migration"./design-systems-slds-applyApply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include "build a modal", "create a form", "data table", "SLDS styling", "style with hooks", "add an icon".Other plugins' skills for the same job