agentforce-observelisted
Install: claude install-skill SalesforceAIResearch/agentforce-adlc
# 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:
- **Org alias** (required) -- must be authenticated (else `sf org login web`)
- **Agent API name** (required for preview and deploy; ask if not provided)
- **Agent file path** (optional) -- path to the `.agent` file, typically `force-app/main/default/aiAuthoringBundles/<AgentName>/<AgentName>.agent`. Auto-detect if not provided.
- **Session IDs** (optional) -- analyze specific sessions; if absent, query last 7 days
- **Days to look back** (optional, default 7)
- **Alert owner user** (optional, alerts only) -- user whose alerts to list/manage; defaults to the current user
Determine intent from user input:
- **No specific action** -> run all three analysis phases: Observe -> surface issues -> ask if use