PluginBench
Skill
Fail
Audit score 45

sf-ai-agentforce-observability

jaganpro/sf-skills

Extract and analyze Salesforce Agentforce session traces from Data 360 for observability and debugging.

What is sf-ai-agentforce-observability?

This skill enables trace-based observability of Agentforce agents by extracting Session Tracing Data Model (STDM) records from Data 360, analyzing Parquet datasets with Polars, and reconstructing session timelines to debug agent behavior. Use it when you need to investigate agent performance, routing issues, action failures, or latency patterns through telemetry data.

  • Extract STDM records from Data 360 and convert to Parquet format for efficient analysis
  • Reconstruct session timelines and interaction flows from trace data
  • Analyze topic distribution, action step failures, and latency hotspots
  • Debug agent conversations and behavior through telemetry-driven investigation
  • Identify abandonment patterns, escalation triggers, and session-level performance metrics

How to install sf-ai-agentforce-observability

npx skills add https://github.com/jaganpro/sf-skills --skill sf-ai-agentforce-observability
Prerequisites
  • Data 360 enabled in the Salesforce org
  • Session Tracing enabled for Agentforce
  • Einstein/Agentforce capabilities enabled
  • JWT or ECA authentication configured for Data 360 access
  • Sufficient Salesforce Standard Data Model version
Claude Code
Cursor
Windsurf
Cline

How to use sf-ai-agentforce-observability

  1. 1.Verify Data 360 and Session Tracing are enabled in your org, and confirm JWT/ECA auth is working
  2. 2.Determine your extraction scope: target org alias, time window, agent filter, and whether you need a full snapshot or single-session debug
  3. 3.Run extraction scripts from the skill's scripts/ directory to pull STDM data into Parquet files, using date and agent filters to control volume
  4. 4.Load the Parquet files and analyze with Polars using patterns from the analysis cookbook (session volume, topic distribution, latency, failures)
  5. 5.Interpret findings to identify root causes (routing issues, action failures, latency hotspots) and hand off to the appropriate skill (sf-ai-agentscript for agent fixes, sf-flow for Flow debugging, sf-debug for Apex issues)

Use cases

Good for
  • Investigate why an agent is routing conversations to the wrong topic by analyzing trace data
  • Diagnose slow action execution by examining latency patterns across session steps
  • Debug a specific broken conversation by extracting and analyzing its complete session tree
  • Analyze agent usage patterns and session volume over a time window to identify trends
  • Identify action failures and their root causes by correlating trace data with Flow or Apex implementations
Who it's for
  • Salesforce Agentforce developers debugging agent behavior
  • Platform engineers analyzing agent performance and reliability
  • Administrators investigating agent session quality and user experience
  • Technical leads conducting post-incident analysis of agent failures

sf-ai-agentforce-observability FAQ

When should I use this skill vs. sf-ai-agentforce-testing?

Use this skill for trace-based observability and debugging of live agent behavior through telemetry. Use sf-ai-agentforce-testing for formal regression testing and reproducible test loops.

What if my org doesn't have Data 360 or Session Tracing enabled?

Data 360 and Session Tracing must be enabled first. If auth is missing, delegate to sf-connected-apps for JWT/ECA setup. Refer to references/auth-setup.md for the full setup guide.

Can I use this skill to fix the agent itself?

No. This skill is for analysis and diagnosis only. Once you identify the root cause, delegate to sf-ai-agentscript for agent authoring fixes, sf-flow for Flow-backed actions, or sf-debug/sf-apex for Apex code issues.

How do I handle large telemetry datasets without excessive query costs?

Use date filters and agent filters to scope extraction, prefer Parquet over ad hoc JSON, and use lazy Polars patterns for large datasets to avoid unnecessary volume.

What if trace data is missing or incomplete?

Ingestion lag is normal; this is not real-time debugging. Verify Session Tracing is enabled and check the troubleshooting guide. Missing data may indicate tracing is not active rather than an actual issue.

Full instructions (SKILL.md)

Source of truth, from jaganpro/sf-skills.


name: sf-ai-agentforce-observability description: > Agentforce session tracing extraction and analysis. TRIGGER when: user extracts STDM data from Data Cloud, analyzes agent session traces, debugs agent conversations via telemetry, or works with .parquet files from Agentforce. DO NOT TRIGGER when: testing agents (use sf-ai-agentforce-testing), Apex debug logs (use sf-debug), or building agents (use sf-ai-agentforce). license: MIT compatibility: "Requires Data 360 enabled org with Agentforce Session Tracing" metadata: version: "1.0.0" author: "Jag Valaiyapathy" data_model: "Session Tracing Data Model (STDM)" storage_format: "Parquet (via PyArrow)" analysis_library: "Polars"

sf-ai-agentforce-observability: Agentforce Session Tracing Extraction & Analysis

Use this skill when the user needs trace-based observability, not just testing: extract Session Tracing Data Model (STDM) records, work with Parquet datasets, reconstruct session timelines, analyze topic/action latency, or debug agent behavior from Data 360 telemetry.

When This Skill Owns the Task

Use sf-ai-agentforce-observability when the work involves:

  • Data 360 / Session Tracing extraction
  • .parquet files from Agentforce telemetry
  • session timeline reconstruction
  • trace-driven debugging of topic routing, action failures, or latency
  • Polars / PyArrow-based analysis of large telemetry datasets

Delegate elsewhere when the user is:

  • formally testing agents → sf-ai-agentforce-testing
  • debugging Apex logs → sf-debug
  • authoring or reconfiguring the agent itself → sf-ai-agentforce or sf-ai-agentscript

Prerequisites That Must Exist

Before extraction, verify:

  • Data 360 is enabled
  • Session Tracing is enabled
  • the Salesforce Standard Data Model version is sufficient
  • Einstein / Agentforce capabilities are enabled in the org
  • JWT / ECA auth for Data 360 access is configured

If auth is missing, hand off to:

  • sf-connected-apps

Deep setup guide:


What This Skill Works With

Core storage / analysis model

  • extraction via Data 360 APIs
  • Parquet for storage efficiency
  • Polars for large-scale lazy analysis

Core STDM entities

At minimum, expect work around:

  • session
  • interaction / turn
  • interaction step
  • moment
  • message

GenAI Trust Layer / audit records may also be relevant for content-quality and generation debugging.

Full schema:


Required Context to Gather First

Ask for or infer:

  • target org alias
  • time window or date range
  • agent filter, if any
  • whether the goal is extraction, summary analysis, or single-session debugging
  • output location for extracted data
  • whether the user already has Parquet files on disk

Recommended Workflow

1. Verify setup and auth

Confirm Data 360 tracing exists and JWT/ECA auth is working.

2. Choose the extraction mode

NeedDefault approach
recent telemetry snapshotextract last N days
focused investigationfiltered extraction by date and agent
one broken conversationextract or debug a single session tree
ongoing usage analyticsincremental extraction

3. Extract to Parquet

Use the provided scripts under scripts/ rather than reimplementing extraction logic.

4. Analyze with Polars

Common analysis goals:

  • session volume and duration
  • topic distribution
  • action step failures
  • latency hotspots
  • abandonment / escalation patterns
  • session-level timeline reconstruction

5. Convert findings into next actions

Typical outcomes:

  • topic mismatch → improve routing or descriptions
  • action failure → inspect Flow / Apex implementation
  • latency issue → optimize downstream action path
  • test gap → add targeted agent tests

High-Signal Operational Rules

  • treat STDM as read-only telemetry
  • expect ingestion lag; this is not perfect real-time debugging
  • use date filters and focused extraction to avoid unnecessary volume / query cost
  • prefer Parquet over ad hoc JSON for durable analysis
  • use lazy Polars patterns for large datasets

Common pitfalls:

  • assuming missing data means no issue, when tracing may simply not be enabled
  • running huge broad queries without date or agent filters
  • trying to fix the agent inside this skill instead of handing off to authoring / testing skills

Output Format

When finishing, report in this order:

  1. What data was extracted or analyzed
  2. Scope (org, dates, agent filter, session IDs)
  3. Key findings
  4. Likely root causes
  5. Recommended next skill / next action

Suggested shape:

Observability task: <extract / analyze / debug-session>
Scope: <org, dates, agents, session ids>
Artifacts: <directories / parquet files>
Findings: <latency, routing, action, quality, abandonment patterns>
Root cause: <best current explanation>
Next step: <testing, agent fix, flow fix, apex fix>

Cross-Skill Integration

NeedDelegate toReason
auth / JWT setupsf-connected-appsData 360 access
fix agent routing / behaviorsf-ai-agentscriptauthoring corrections
formal regression / coverage testssf-ai-agentforce-testingreproducible test loops
Flow-backed action debuggingsf-flowdeclarative repair
Apex-backed action debuggingsf-debug or sf-apexcode / log investigation

Reference Map

Start here

Data model / querying

Analysis / debugging

Auth / troubleshooting


Score Guide

ScoreMeaning
90+strong telemetry-backed diagnosis
75–89useful analysis with minor gaps
60–74partial visibility only
< 60insufficient evidence; gather more telemetry