跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 agentforce-observe

Agentforce Observe

分析生产 Agentforce代理行为使用会话痕迹和数据云,管理Agent健康监测(AHM)警报. TRIGGER在下列情况下:用户查询STDM会话数据或"数据云"跟踪记录;调查生产代理故障,回归,或性能问题;询问会话跟踪,对话日志,或代理度量;想在预览中复制一个已报道的生产问题;运行会议或跟踪分析查询;在代理度量上创建,列出,更新,或删除一个AHM数据提示(升级率,偏移等);询问为何警报没有发射,或想检查警报是否已经发射(通知计数,或每次警报事件视图). 当用户在开发过程中创建、修改或调试.代理文件(使用代理force-generate);编写或运行测试光谱(使用代理force-test);在本地开发迭接时使用 sf代理预览;部署或发布代理时,不要TRIGGER.

5501 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

分析生产 Agentforce代理行为使用会话痕迹和数据云,管理Agent健康监测(AHM)警报. TRIGGER在下列情况下:用户查询STDM会话数据或"数据云"跟踪记录;调查生产代理故障,回归,或性能问题;询问会话跟踪,对话日志,或代理度量;想在预览中复制一个已报道的生产问题;运行会议或跟踪分析查询;在代理度量上创建,列出,更新,或删除一个AHM数据提示(升级率,偏移等);询问为何警报没有发射,或想检查警报是否已经发射(通知计数,或每次警报事件视图). 当用户在开发过程中创建、修改或调试.代理文件(使用代理force-generate);编写或运行测试光谱(使用代理force-test);在本地开发迭接时使用 sf代理预览;部署或发布代理时,不要TRIGGER.

何时用

亲 亲 亲 亲

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Agentforce Observability、Platform Notes、Routing、Resolve agent name、Locate the .agent file、Phase 0: Discover Data Space。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/issue-classification.md、references/stdm-queries.md、references/voice-latency-heuristics.md、references/reproduce-reference.md、references/improve-reference.md、references/ahm-alerts.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM) alerts. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs, or agent metrics; wants to reproduce a reported production issue in preview; runs findSessions or trace analysis queries; creates, lists, updates, or deletes an AHM data alert on an agent metric (escalation rate, deflection, etc.); asks why an alert is not firing or wants to check whether alerts have fired (notification counts, or the per-alert Incidents view). DO NOT TRIGGER when: user creates, modifies, or debugs .agent files during development (use agentforce-generate); writes or runs test specs (use agentforce-test); uses sf agent preview for local development iteration; deploys or publishes agents.

Agentforce ObservabilityPlatform NotesRoutingResolve agent nameLocate the .agent filePhase 0: Discover Data SpacePrerequisite check: STDM DMOsPhase 1-ALT: Observe Without STDM (Fallback Path)1-ALT.1 Run existing test suite (if available)1-ALT.2 Derive test utterances from .agent file (if no test suite)1-ALT.3 Preview with `--authoring-bundle` (local traces)1-ALT.4 Local trace diagnosis

· allowed-tools:Bash Read Write Edit Glob Grep

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
agentforce-observe
description
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM) alerts. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs, or agent metrics; wants to reproduce a reported production issue in preview; runs findSessions or trace analysis queries; creates, lists, updates, or deletes an AHM data alert on an agent metric (escalation rate, deflection, etc.); asks why an alert is not firing or wants to check whether alerts have fired (notification counts, or the per-alert Incidents view). DO NOT TRIGGER when: user creates, modifies, or debugs .agent files during development (use agentforce-generate); writes or runs test specs (use agentforce-test); uses sf agent preview for local development iteration; deploys or publishes agents.
allowed-tools
Bash Read Write Edit Glob Grep实验字段,支持情况取决于客户端;字段声明本身不会授予工具权限。
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • references/issue-classification.md
  • references/stdm-queries.md
  • references/voice-latency-heuristics.md
  • references/reproduce-reference.md
  • references/improve-reference.md
  • references/ahm-alerts.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「agentforce-observe」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-3751b52f40064d1d-%E7%89%B9%E5%B7%A5%E8%A7%82%E5%AF%9F.html
请存为 .cursor/skills/agentforce-observe/SKILL.md 或 .claude/skills/agentforce-observe/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/forcedotcom/sf-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/forcedotcom/sf-skills' --list

npx skills add 'https://github.com/forcedotcom/sf-skills' --skill 'agentforce-observe'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: agentforce-observe description: "Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM) alerts. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs, or agent metrics; wants to reproduce a reported production issue in preview; runs findSessions or trace analysis queries; creates, lists, updates, or deletes an AHM data alert on an agent metric (escalation rate, deflection, etc.); asks why an alert is not firing or wants to check whether alerts have fired (notification counts, or the per-alert Incidents view). DO NOT TRIGGER when: user creates, modifies, or debugs .agent files during development (use agentforce-generate); writes or runs test specs (use agentforce-test); uses sf agent preview for local development iteration; deploys or publishes agents." allowed-tools: Bash Read Write Edit Glob Grep metadata: relatedSkills: - "agentforce-generate" - "agentforce-test" version: "0.9" domains: ["Agentforce", "Data 360"] cliTools: - tool: ["git"] semver: ">=2.0.0" - tool: ["jq"] semver: ">=1.6.0" - tool: ["python3"] semver: ">=3.10.0" - tool: ["sf"] semver: ">=2.136.8" --- # 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//.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 user wants to Reproduce and/or Improve - **"analyze" / "sessions" / "what's wrong"** -> Phase 1 only, then suggest next steps - **"reproduce" / "test" / "preview"** -> Phase 2 (run Phase 1 first if no issues in hand) - **"fix" / "improve" / "update"** -> Phase 3 (run Phase 1 first if no issues in hand) - **"create alert" / "set up monitoring" / "alert me when"** -> AHM (create) - **"list alerts" / "show my alerts" / "update alert" / "delete alert"** -> AHM (list / update via PUT / delete) - **"get / list notifications" / "notifications for a specific alert" / "have my alerts fired" / "why isn't my alert firing"** -> AHM: fetch notifications with header `X-UNS-Type-Filter: all`, report status + list; for a specific alert, filter by alertId from `targetPageRef.state.c__alertId` (15/18-char-safe), not metricId (+ Incidents view + metric verify) ### Resolve agent name Before any STDM query, resolve the user-provided agent name against the org to get the exact `MasterLabel` and `DeveloperName`: ```bash sf data query --json \ --query "SELECT Id, MasterLabel, DeveloperName FROM GenAiPlannerDefinition WHERE MasterLabel LIKE '%%' OR DeveloperName LIKE '%%'" \ -o ``` - `MasterLabel` = display name used by STDM `findSessions` and Agent Builder UI (e.g. "Order Service") - `DeveloperName` = API name with version suffix used in metadata (e.g. "OrderService_v9") - The `--api-name` flag for `sf agent preview/activate/publish` uses `DeveloperName` **without** the `_vN` suffix (e.g. "OrderService") Store these values: - `AGENT_MASTER_LABEL` -- for `findSessions()` agent filter - `AGENT_API_NAME` -- `DeveloperName` without `_vN` suffix, for `sf agent` CLI commands - `PLANNER_ID` -- the Salesforce record ID for this agent ### Locate the .agent file **Step 1 -- Search locally:** ```bash find /force-app/main/default/aiAuthoringBundles -name "*.agent" 2>/dev/null ``` If the user provided an agent file path, use that directly. Otherwise, search for files matching `AGENT_API_NAME`. **Step 2 -- If not found locally, retrieve from the org:** ```bash sf project retrieve start --json --metadata "AiAuthoringBundle:" -o ``` > **Known bug:** `sf project retrieve start` creates a double-nested path: `force-app/main/default/main/default/aiAuthoringBundles/...`. Fix it immediately after retrieve: ```bash if [ -d "force-app/main/default/main/default/aiAuthoringBundles" ]; then mkdir -p force-app/main/default/aiAuthoringBundles cp -r force-app/main/default/main/default/aiAuthoringBundles/* \ force-app/main/default/aiAuthoringBundles/ rm -rf force-app/main/default/main fi ``` **Step 3 -- Validate the retrieved file:** Read the `.agent` file and verify it has proper Agent Script structure: - `system:` block with `instructions:` - `config:` block with `developer_name:` - `start_agent` or `subagent` blocks with `reasoning: instructions:` - Each subagent should have distinct `instructions:` content (not identical across subagents) Store the resolved path as `AGENT_FILE` for Phase 3. --- ## Phase 0: Discover Data Space Before running any STDM query, determine the correct Data Cloud Data Space API name. ```bash sf api request rest "/services/data/v63.0/ssot/data-spaces" -o ``` Note: `sf api request rest` is a beta command -- do not add `--json` (that flag is unsupported and causes an error). The response shape is: ```json { "dataSpaces": [ { "id": "0vhKh000000g3DjIAI", "label": "default", "name": "default", "status": "Active", "description": "Your org's default data space." } ], "totalSize": 1 } ``` The `name` field is the API name to pass to `AgentforceOptimizeService`. **Decision logic:** - If the command fails (e.g. 404 or permission error), fall back to `'default'` and note it as an assumption. - Filter to only `status: "Active"` entries. - If exactly one active Data Space exists, use it automatically and confirm to the user: "Using Data Space: ``". - If multiple active Data Spaces exist, show the list (label + name) and ask the user which to use. Store the selected `name` value as `DATA_SPACE` for all subsequent steps. ### Prerequisite check: STDM DMOs After deploying the helper class (step 1.0), run a quick probe to verify the STDM Data Model Objects exist in Data Cloud: ```bash sf apex run -o -f /dev/stdin << 'APEX' ConnectApi.CdpQueryInput qi = new ConnectApi.CdpQueryInput(); qi.sql = 'SELECT ssot__Id__c FROM "ssot__AiAgentSession__dlm" LIMIT 1'; try { ConnectApi.CdpQueryOutputV2 out = ConnectApi.CdpQuery.queryAnsiSqlV2(qi, ''); System.debug('STDM_CHECK:OK rows=' + (out.data != null ? out.data.size() : 0)); } catch (Exception e) { System.debug('STDM_CHECK:FAIL ' + e.getMessage()); } APEX ``` **If `STDM_CHECK:FAIL`:** STDM is not activated. Inform the user and switch to **Phase 1-ALT**: > STDM (Session Trace Data Model) is not available in this org. To enable: Setup -> Data Cloud -> Data Streams and verify "Agentforce Activity" is active. **Proceeding with fallback: test suites + local traces.** **If `STDM_CHECK:OK`**, proceed to Phase 1 (STDM path). --- ## Phase 1-ALT: Observe Without STDM (Fallback Path) When STDM is not available, use test suites and `sf agent preview --authoring-bundle` with local trace analysis. | Data source | When to use | Pros | Cons | |---|---|---|---| | STDM (Phase 1) | Historical production analysis | Real user data, volume | Requires Data Cloud, 15-min lag | | Test suites + local traces (Phase 1-ALT) | Dev iteration, orgs without STDM | Instant, full LLM prompt, variable state | Preview only, no real user data | ### 1-ALT.1 Run existing test suite (if available) ```bash sf agent test list --json -o sf agent test run --json --api-name --wait 10 --result-format json -o | tee /tmp/test_run.json JOB_ID=$(python3 -c "import json; print(json.load(open('/tmp/test_run.json'))['result']['runId'])") sf agent test results --json --job-id "$JOB_ID" --result-format json -o ``` ### 1-ALT.2 Derive test utterances from .agent file (if no test suite) If no test suite exists, derive utterances: one per non-entry subagent (from `description:` keywords), one per key action, one guardrail test, one multi-turn test. ### 1-ALT.3 Preview with `--authoring-bundle` (local traces) Run each test utterance through preview to generate local trace files: ```bash sf agent preview start --json --authoring-bundle --simulate-actions -o | tee /tmp/preview_start.json SESSION_ID=$(python3 -c "import json; print(json.load(open('/tmp/preview_start.json'))['result']['sessionId'])") sf agent preview send --json --session-id "$SESSION_ID" --authoring-bundle \ --utterance "$UTT" -o | tee /tmp/preview_response.json sf agent preview end --json --session-id "$SESSION_ID" --authoring-bundle -o ``` **Trace file location:** `.sfdx/agents/{BundleName}/sessions/{sessionId}/traces/{planId}.json` ### 1-ALT.4 Local trace diagnosis | Issue type | Trace command | |---|---| | Subagent misroute | `jq -r '.plan[] \| select(.type=="NodeEntryStateStep") \| .data.agent_name' "$TRACE"` | | Action not called | `jq -r '.plan[] \| select(.type=="EnabledToolsStep") \| .data.enabled_tools[]' "$TRACE"` | | LOW adherence | `jq -r '.plan[] \| select(.type=="ReasoningStep") \| {category, reason}' "$TRACE"` | | Variable capture fail | `jq -r '.plan[] \| select(.type=="VariableUpdateStep") \| .data.variable_updates[]' "$TRACE"` | | Vague instructions | `jq -r '.plan[] \| select(.type=="LLMStep") \| .data.messages_sent[0].content' "$TRACE"` | **DefaultTopic trace quirk:** With `--authoring-bundle`, the root `.topic` field often shows `"DefaultTopic"` even when routing works. Always use `NodeEntryStateStep.data.agent_name` for the real subagent chain. **Entry answering directly (SMALL_TALK pattern):** If `start_agent` trace shows `SMALL_TALK` grounding and transition tools visible but none invoked, add "You are a router only. Do NOT answer questions directly." to `start_agent` instructions. ### 1-ALT.5 Classify and present Classify issues using the categories in `references/issue-classification.md`. After presenting findings, automatically proceed to agent config evidence analysis. --- ## Phase 1: Observe -- Query STDM > Full STDM query details, Apex service deployment, and response parsing: see `references/stdm-queries.md` ### 1.0 Deploy helper class (once per org) Deploy `AgentforceOptimizeService` Apex class to the org. Check if already deployed first: ```bash sf data query --json --query "SELECT Id, Name FROM ApexClass WHERE Name = 'AgentforceOptimizeService'" -o ``` If not deployed, copy from skill directory and deploy. See `references/stdm-queries.md` for full steps. ### 1.1 Find sessions Query recent sessions using `findSessions()`. Parse `DEBUG|STDM_RESULT:` from the Apex debug log. If `findSessions` returns empty, switch to Phase 1-ALT. ### 1.2 Get conversation details Use `getMultipleConversationDetails()` for up to 5 sessions (most recent first). Returns turn-by-turn data with messages, steps, topics, and action results. ### 1.2b Get LLM prompt/response (optional) When LOW adherence detected, use `getLlmStepDetails()` to get the actual LLM prompt and response. ### 1.2c Get aggregated metrics (recommended first step) Use `getAggregatedMetrics()` for high-level health dashboard: session rates, top intents, quality distribution, RAG averages. ### 1.2d Get moment insights (per-session detail) Use `getMomentInsights()` for intent summaries, quality scores (1-5), and retriever metrics per session. ### 1.2e Run observability queries (RAG deep-dive) Use `runObservabilityQuery()` for targeted RAG analysis: KnowledgeGap, Hallucination, RetrievalQuality, AnswerRelevancy, Leaderboard. ### 1.3 Reconstruct conversations Render turn-by-turn timeline from `ConversationData` JSON for each session. ### 1.4 Identify issues > Full issue pattern table and classification categories: see `references/issue-classification.md` Check each session for: action errors, subagent misroutes, missing actions, wrong inputs, variable capture failures, no transitions, slow actions, LOW adherence, abandoned sessions, dead subagents, publish drift, dead hub anti-pattern, entry answering directly, and safety issues. **Voice agents (has `modality voice:` block):** Also check for: - Response verbosity — flag any agent response over 3 sentences (voice UX anti-pattern; also a silence/nudge-timer trigger) - Visual formatting in responses — lists, links, markdown that don't render in speech - Missing confirmation patterns — actions modifying data without repeating back key details - Missing voice wiring — voice agent lacks a `VoiceCallId` linked variable (`@VoiceCall.Id`) or the `connection customer_web_client:` block, or someone added a non-existent `connection voice:` block - **Latency anti-patterns** — cross-reference trace step durations against the field-verified patterns in `/agentforce-generate` [`references/voice-latency-heuristics.md`](../agentforce-generate/references/voice-latency-heuristics.md): synchronous writes on the live-call path, bulky retrieval returned raw to the reasoning LLM, chained external callouts, over-decomposed subagent routing, and slow actions with no ack phrase. Latency fixes are **flag-only** unless purely instructional (ack phrase, turn-length, spoken-form rule). - **TTS garble / missing spoken-form rule** — action outputs or responses that surface prices, phone numbers, or IDs without a spoken-form instruction rule. Priority: P1 = action errors, misroutes, LOW adherence; P2 = missing actions, variable bugs, knowledge gaps; P3 = performance, abandoned sessions, voice UX issues, voice latency anti-patterns. ### 1.5 Present findings and agent config evidence Present sessions analyzed, issues grouped by root cause category, and uplift estimate. Then automatically proceed to analyze the `.agent` file to confirm root causes. > Full structural analysis checks, cross-reference procedures, and publish drift detection: see `references/issue-classification.md` Retrieve the `.agent` file from the org, run automated checks (subagent count vs action blocks, dead hub detection, orphan actions, cross-subagent variable dependencies), and cross-reference STDM symptoms against the file structure. --- ## Phase 2: Reproduce -- Live Preview > Full preview procedures, trace diagnosis commands, and classification criteria: see `references/reproduce-reference.md` Build one test scenario per confirmed issue from Phase 1. Run each through `sf agent preview` with `--authoring-bundle` (generates local traces). Run each scenario **3 times** and classify: | Verdict | Criteria | |---|---| | `[CONFIRMED]` | Same failure in 3/3 runs | | `[INTERMITTENT]` | Failure in 1-2 of 3 runs | | `[NOT REPRODUCED]` | Passes in 3/3 runs | Only `[CONFIRMED]` and `[INTERMITTENT]` issues proceed to Phase 3. **Key commands:** ```bash sf agent preview start --json --authoring-bundle --simulate-actions -o sf agent preview send --json --session-id "$SID" --utterance "" --authoring-bundle -o sf agent preview end --json --session-id "$SID" --authoring-bundle -o ``` Run these from the Salesforce project directory. `start` requires an action mode with `--authoring-bundle` (`--simulate-actions` or `--use-live-actions`); that flag is rejected by `send` and `end`. **Trace location:** `.sfdx/agents/{Name}/sessions/{sessionId}/traces/{planId}.json` --- ## Phase 3: Improve -- Edit .agent File Directly > Full procedures for pre-flight checks, fix mapping, instruction principles, regression prevention, deployment chain, verification, safety re-verification, and test case creation: see `references/improve-reference.md` ### 3.0 Pre-flight Verify all action targets exist and are registered in the org before editing. If targets are missing, present options: deploy stubs, remove actions, register via UI, or proceed with routing-only fixes. ### 3.1-3.3 Map issue, edit, and follow instruction principles Map each confirmed issue to a fix location in the `.agent` file (description, instructions, actions, bindings, transitions). Use the Edit tool for targeted changes. Follow instruction principles: name actions explicitly, state pre-conditions, scope tightly, keep persona in `system:` only. ### 3.4 Regression prevention Establish baseline before editing. Make minimal edits. Test immediately after each edit. One fix per publish cycle. Check cross-subagent dependencies. Test adjacent subagents. ### 3.5 Apply fixes Read the `.agent` file, edit with the Edit tool, and show the diff. Preserve the file's existing structural indentation for a surgical edit so you do not create a mixed-style file. Generate new files with 4 spaces. If normalization is needed, convert the entire structural indentation as a separate change and validate it; do not partially convert a tab-indented file. ### 3.6 Validate, deploy, publish, activate ```bash # Validate (dry run) sf agent validate authoring-bundle --json --api-name -o # Publish (compile + deploy + activate) sf agent publish authoring-bundle --json --api-name -o ``` If publish fails, use deploy + activate fallback (note: incomplete -- does not propagate `reasoning: actions:` to live metadata). ### 3.7 Verify Run Phase 2 scenarios post-fix. Check trace for correct routing, grounding, tools, and variables. After 24-48 hours, re-run Phase 1 to compare against baseline. ### 3.7b Safety re-verification (required) Re-run safety review (`Section 15 of /agentforce-generate`) on the modified `.agent` file. Revert any changes that introduce BLOCK findings. ### 3.8 Update Testing Center test cases Create regression test cases from confirmed issues in Testing Center YAML format. Deploy with `sf agent test create` and verify all previously-broken scenarios pass. --- ## Agent Health Monitoring (AHM) > Full AHM alert procedures -- POST schema, enums, SDM/metric/agent discovery, thresholds, metric verification, troubleshooting: see `references/ahm-alerts.md` Proactive complement to the reactive Observe phases: **AHM data alerts** fire when an agent metric (escalation, deflection, etc.) crosses a threshold. Driven through `sf api request rest` against `tableau/dataAlerts` (`dataAlertType: "agenthealthmonitoring"`) -- there is no `sf agent alert` subcommand yet. Reuse **Phase 0** for `dataspace`. Build the POST body and discover the SDM, its `_mtc` metric id, and the agent filter value **per the reference first**, then: ```bash # List/describe -- resolve owner id first (required); single-alert GET is 405 => list + filter client-side USER_ID=$(sf org display user --target-org --json | python3 -c 'import sys,json;print(json.load(sys.stdin)["result"]["id"])') sf api request rest "/services/data/v66.0/tableau/dataAlerts?ownerId=$USER_ID" -o # Create / PUT update-in-place / delete (204). PUT & DELETE are addressed by $ALERT_ID in the path; PUT takes the full POST-style body. Bodies per reference into a 0600 mktemp file. sf api request rest "/services/data/v66.0/tableau/dataAlerts" -X POST -H "Content-Type: application/json" -b "@$body" -o sf api request rest "/services/data/v66.0/tableau/dataAlerts/$ALERT_ID" -X PUT -H "Content-Type: application/json" -b "@$body" -o sf api request rest "/services/data/v66.0/tableau/dataAlerts/$ALERT_ID" -X DELETE -o --include # Notifications REQUIRE header X-UNS-Type-Filter: all (else custom-types-only => AHM empty = false 0). Report status + list. sf api request rest "/services/data/v66.0/connect/notifications/status" -H "X-UNS-Type-Filter: all" -o sf api request rest "/services/data/v66.0/connect/notifications" -H "X-UNS-Type-Filter: all" -o # AHM notifications: type=templatized_data_alert; no per-alert endpoint. Attribute by alertId in targetPageRef.state.c__alertId (15/18-char-safe), NOT metricId (collides). ``` **Three silent-failure traps to carry into any alert work:** - **Thresholds are raw 0-1 ratios**, not display percentages -- 5% is `"0.05"`, `"1"` means 100%. - **POST field names/casing differ from GET** -- POST uses `utterance` (not `alertName`) and PascalCase `type` discriminators, so copying a GET response back into a POST fails. - **Notifications need `X-UNS-Type-Filter: all`** -- without it `connect/notifications*` returns custom types only, so AHM notifications (type `templatized_data_alert`) come back empty; an empty list is a false negative, not "never fired." --- ## Reference Files | Reference | Contents | |---|---| | `references/stdm-queries.md` | STDM query procedures, Apex service deployment, response parsing | | `references/ahm-alerts.md` | AHM data-alert create/list/update/delete, trigger history, SDM/metric/agent discovery, threshold schema, metric verification | | `references/issue-classification.md` | Issue pattern table, root cause categories, structural analysis checks | | `references/reproduce-reference.md` | Phase 2 preview procedures, trace diagnosis, classification criteria | | `references/improve-reference.md` | Phase 3 editing, deployment chain, verification, safety, test cases | | `references/stdm-schema.md` | DMO field schemas, data hierarchy, quality notes, agent name resolution |

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…