sf-ai-agentforce-observability

Extract and analyze Agentforce session tracing telemetry from Salesforce Data Cloud into Parquet datasets.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-ai-agentforce-observability-amanpraaj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sf-ai-agentforce-observability
Source: https://github.com/amanpraaj/sf-skill-hub/tree/main/skills/salesforce/sf-ai-agentforce-observability
Command: npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-ai-agentforce-observability-amanpraaj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires polars, pyarrow, pydantic, pyjwt, cryptography, httpx, click, rich, and includes scripts (resource) and references (resource) components.

What problem does it solve? Agentforce conversations are opaque once deployed: teams cannot see why an agent routed to the wrong topic, which action failed, or where latency and hallucinations occur. This Skill extracts Session Tracing Data Model (STDM) records from Salesforce Data Cloud and turns them into analyzable Parquet datasets for trace-driven debugging and quality monitoring. ## Core Features & Use Cases - High-Volume Extraction: Pull 1-10M records per day from 24 verified STDM and GenAI Trust Layer DMOs via the Data Cloud Query API with JWT Bearer authentication, storing results in compact Parquet files. - Polars-Based Analysis: Compute session summaries, topic routing distributions, action failure rates, latency hotspots, and hallucination or toxicity detection using lazy evaluation over 100M+ rows. - Session Debugging: Reconstruct complete session timelines (requests, responses, LLM steps, action steps) for a single conversation to diagnose routing or action failures. - Use Case: After users report an agent giving wrong answers, extract the last 7 days of telemetry, find sessions flagged UNGROUNDED by the Trust Layer, and reconstruct the failing session timeline to identify the misconfigured topic. ## Quick Start Ask the agent to extract the last 7 days of Agentforce session tracing data from your org and generate a summary analysis of topics, completion rates, and failed sessions.

Frequently Asked Questions about sf-ai-agentforce-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract Agentforce session tracing data from Data Cloud?▼

Run the CLI extract command with your org alias and a date range, for example python3 scripts/cli.py extract --org myorg --days 7 --output ./data. The skill queries STDM DMOs through the Data Cloud Query API and writes results to Parquet files.

How do I debug a single Agentforce conversation from telemetry?▼

Use the debug-session command or the analyzer's message_timeline method with the session ID. It reconstructs the chronological timeline of user requests, agent responses, LLM steps, and action steps so you can see exactly where routing or actions failed.

What authentication is required for the Data Cloud Query API?▼

JWT Bearer authentication via an External Client App is required. You generate an RSA certificate with openssl, upload it to the ECA, enable the cdp_query_api scope, and store the private key at ~/.sf/jwt/{org}-agentforce-observability.key.

Can this detect hallucinations or toxic agent responses?▼

Yes. The analyzer finds ReactValidationPrompt steps with UNGROUNDED output to flag hallucinations, and queries GenAIContentQuality and GenAIContentCategory DMOs for toxicity detector results with confidence scores.

Why is my session tracing query returning no data?▼

Common causes are Session Tracing not being enabled in Agentforce settings, missing cdp_query_api scope on the External Client App, or ingestion lag since STDM is not real-time. Also verify the org has Data Cloud and the Standard Data Model v1.124 or later.

When should I use this instead of Agentforce testing tools?▼

Use this skill for trace-based observability on real production telemetry and Parquet analysis. Use sf-ai-agentforce-testing for formal regression tests and real-time trace capture, and sf-debug for Apex log investigation.