forcedotcom avatar

Agentforce Observe

This is the production debugging workflow for Agentforce agents. It queries session traces from Salesforce Data Cloud's STDM (Session Trace Data Model) to surface real user failures, then lets you reproduce issues locally with `sf agent preview` and edit the `.agent` file directly. The three-phase loop is observe, reproduce, improve. It auto-detects your agent name and file path, handles the CLI's known double-nesting bug on retrieve, and falls back to test suites plus local traces if STDM isn't activated in your org. Use this when you're chasing regressions or weird production behavior, not when you're drafting new agents or writing tests.

skills.sh installs
5.8K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill agentforce-observe --agent claude-code

Installs into .claude/skills of the current project.

Files

Agentforce Observability

Improve Agentforce agents using session trace data and live preview testing.

Three-phase workflow:

  • Observe -- Query STDM sessions from Data Cloud (if available), OR run test suites + preview with local traces as fallback
  • Reproduce -- Use sf agent preview to simulate problematic conversations live
  • Improve -- Edit the .agent file directly, validate, publish, verify

Platform Notes

  • Shell examples below use bash syntax. On Windows, use PowerShell equivalents or Git Bash.
  • Replace python3 with python on Windows.
  • Replace /tmp/ with $env:TEMP\ (PowerShell) or %TEMP%\ (cmd).
  • Replace jq with python -c "import json,sys; ..." if jq is not installed.

Routing

Gather these inputs before starting:

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Testing & QA, Git & Pull Requests, AI & Agent Building, Debugging, Cloud & Infrastructure
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158
1getsentry avatarcode-reviewgetsentry/skillsPerform code reviews following Sentry engineering practices. Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Co5.7Kskills.sh installs
2jeffallan avatarterraform-engineerjeffallan/claude-skillsUse when implementing infrastructure as code with Terraform across AWS, Azure, or GCP. Invoke for module development (create reusable modules, manage module ver5.7Kskills.sh installs
3trailofbits avatarsemgrep-rule-variant-creatortrailofbits/skillsCreates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages 5.7Kskills.sh installs
4claude-office-skills avatarads-copywriterclaude-office-skills/skillsMulti-platform ad copy generation for Google Ads, Meta/Facebook, TikTok, LinkedIn with A/B testing variants5.6Kskills.sh installs
5trailofbits avatarlibfuzzertrailofbits/skillsCoverage-guided fuzzer built into LLVM for C/C++ projects. Use for fuzzing C/C++ code that can be compiled with Clang.5.6Kskills.sh installs
6affaan-m avatardjango-verificationaffaan-m/eccVerification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.5.6Kskills.sh installs