
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-codeInstalls 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 previewto simulate problematic conversations live - Improve -- Edit the
.agentfile directly, validate, publish, verify
Platform Notes
- Shell examples below use bash syntax. On Windows, use PowerShell equivalents or Git Bash.
- Replace
python3withpythonon Windows. - Replace
/tmp/with$env:TEMP\(PowerShell) or%TEMP%\(cmd). - Replace
jqwithpython -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- Platform Lightning App Coordinate5.7K
- Design Systems Slds2 Migrate5.7K
- External Diagram Mermaid Generate5.6K
- Integration Connectivity Connected App Configure5.5K
- Integration Connectivity Generate5.5K
- Agentforce D360 Analyze5.4K
- Experience Ui Bundle Frontend Generate5.3K
- Platform Tracing Configure5.3K
- Experience Ui Bundle Metadata Generate5.3K
- Experience Ui Bundle App Coordinate5.3K
- Experience Ui Bundle Deploy5.3K
- Experience Ui Bundle Salesforce Data Access5.3K
- Experience Ui Bundle Custom App Generate5.3K
- Dx App Analytics Query5.2K
- Platform Tracing Agentforce Configure5.2K
- Platform Value Set Generate5.2K
- Integration Eventing Cdc Configure5.2K
- Integration Eventing Subscription Configure5.2K
- Platform Trust Archive Manage5.2K
- Experience Ui Bundle File Upload Generate5.2K
- Experience Ui Bundle Features Generate5.1K
- Dx Devops Test Failures Analyze5.1K
- Data360 Schema Get5.1K
- Dx Devops Test Pipeline Configure5.1K