investigating-agentforce-d360
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseinvestigating-agentforce-d360 — Data Cloud 360° session view
investigating-agentforce-d360 — Data Cloud 360°会话视图
Hierarchical session reconstruction from Data Cloud STDM + GenAI DMOs for one Agentforce session. Three stages — fetch → assemble → render. Typical wall-clock: ~10–30s for a ~15-turn session.
The pipeline is DC-only: it reads runtime audit rows that Data Cloud has materialized. It is not a runtime-availability tool — see "DC-only blind spot" below for what this skill cannot answer.
基于Data Cloud STDM + GenAI DMO的单个Agentforce会话分层重构。分为三个阶段——获取→组装→渲染。对于约15轮的会话,典型耗时约10–30秒。
该流水线仅基于DC:它读取Data Cloud已物化的运行时审计记录。它不是运行时可用性工具——以下是本技能无法回答的内容,详见下文“仅DC的盲区”。
If the user hasn't given enough to proceed
若用户未提供足够信息以继续
When invoked with no session id AND no discovery criteria, print this block verbatim — do not paraphrase, do not pre-run any script. Trigger condition: the input is empty OR contains no session-id shape (neither a UUID nor a messaging id) AND no discovery expression (no time phrase / / / / / verbs like "find" / "list").
0Mw…--agent--channel--outcome--grepWhich session should I pull from Data Cloud, and in which org?I need:
- Session id — either an Agent Session UUID (
) or a MessagingSession id (019db7f6-…, 15/18 chars).0Mw…
- No session id? — Tell me what you remember and I'll find it: how recent (e.g. "last 2 hours", "today", a date), which agent, which channel (Messaging / Builder / Voice), how it ended (escalated, user ended, transferred, timed out), or a phrase from the conversation. I'll show matching sessions as a numbered list — you pick one, I pull it.
- Org alias — for
CLI auth (the alias you configured withsf).sf org loginArtifacts land in(override per-script with~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/).--data-dir <path>
当调用时既无会话ID也无发现条件,逐字打印以下内容——请勿改写,请勿预运行任何脚本。触发条件:输入为空,或不包含会话ID格式(既非UUID也非格式的消息ID)且无发现表达式(无时间短语/////诸如“查找”/“列出”之类的动词)。
0Mw…--agent--channel--outcome--grep我应该从Data Cloud中拉取哪个会话,以及哪个组织?我需要:
- 会话ID —— 可以是Agent会话UUID(
)或MessagingSession ID(019db7f6-…,15/18个字符)。0Mw…
- 没有会话ID? —— 告诉我你记得的信息,我来查找:会话时间(例如“过去2小时”、“今天”、某个日期)、涉及哪个代理、哪个渠道(Messaging / Builder / Voice)、会话如何结束(升级、用户结束、转接、超时),或对话中的某个短语。我会将匹配的会话以编号列表展示——你选择一个,我来拉取。
- 组织别名 —— 用于
CLI认证(你通过sf配置的别名)。sf org login生成的产物会保存在(可通过脚本参数~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/覆盖默认路径)。--data-dir <path>
Session id forms — UUID or MessagingSession id
会话ID格式 — UUID或MessagingSession ID
Both forms are accepted on :
--session| Form | Example | Resolution |
|---|---|---|
| Agent Session UUID | | Pass-through |
MessagingSession id ( | | Resolved via |
Multi-match is real. One MessagingSession id can map to multiple Agent Session UUIDs. On multi-match the resolver prints every candidate and exits non-zero; the user re-invokes with a specific UUID.
Artifacts always land under (default; overridable per-script with ) — the messaging id is a lookup key only, never a directory name. The dominant agent (first in ) names the segment.
~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/--data-dir <path>sorted(agents_observed)<agent>__<ver>/--session| 格式 | 示例 | 解析方式 |
|---|---|---|
| Agent会话UUID | | 直接传递 |
MessagingSession ID( | | 通过 |
存在多匹配情况。一个MessagingSession ID可能对应多个Agent会话UUID。出现多匹配时,解析器会打印所有候选并以非零状态退出;用户需使用特定UUID重新调用。
产物始终保存在(默认路径;可通过脚本参数覆盖)——消息ID仅作为查找键,绝不会作为目录名。主导代理(中的第一个)命名目录段。
~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/--data-dir <path>sorted(agents_observed)<agent>__<ver>/Resolving the script prefix
解析脚本前缀
The default install puts the skill under the runtime's plugin root. If the
skill was cloned somewhere else (e.g. directly from the
repo into a custom path), set to point at the runtime's skills
directory.
forcedotcom/sf-skillsPLUGIN_ROOTbash
prefix="${SKILL_ROOT:-${PLUGIN_ROOT:-$HOME/.vibe/skills}/investigating-agentforce-d360}/scripts"Every subsequent invocation in this doc uses .
"$prefix/..."默认安装会将技能放在运行时的插件根目录下。如果技能被克隆到其他位置(例如直接从仓库克隆到自定义路径),请设置指向运行时的技能目录。
forcedotcom/sf-skillsPLUGIN_ROOTbash
prefix="${SKILL_ROOT:-${PLUGIN_ROOT:-$HOME/.vibe/skills}/investigating-agentforce-d360}/scripts"本文档中后续所有调用均使用。
"$prefix/..."Session discovery (no id yet)
会话发现(尚无ID时)
When the user doesn't have a session id, run against the STDM session DMO. Prints a numbered picker; user picks one; proceed with the chosen UUID.
discover_sessions.pybash
python3 "$prefix/discover_sessions.py" --org <alias> [filters...]Filters (all optional except ): (default last 24h; accepts "last 2 hours", "today", ISO dates), , , , (conversation text), , (default 20).
--org--since <expr>--agent <api-name>--channel <Messaging|Builder|Voice>--outcome <USER_ENDED|ESCALATED|TRANSFERRED|TIMEOUT|NOT_SET>--grep <substring>--tz <IANA>--limit <N>Output: markdown table with , , , , , , . User replies with a number; proceed with that UUID.
#UUIDStart (UTC)AgentChannelDurationOutcome当用户没有会话ID时,针对STDM会话DMO运行。打印编号选择器;用户选择一个;使用选中的UUID继续操作。
discover_sessions.pybash
python3 "$prefix/discover_sessions.py" --org <alias> [filters...]筛选器(除外均为可选):(默认过去24小时;接受“过去2小时”、“今天”、ISO日期格式)、、、、(对话文本)、、(默认20)。
--org--since <expr>--agent <api-name>--channel <Messaging|Builder|Voice>--outcome <USER_ENDED|ESCALATED|TRANSFERRED|TIMEOUT|NOT_SET>--grep <substring>--tz <IANA>--limit <N>输出:包含、、、、、、的Markdown表格。用户回复编号;使用该UUID继续操作。
#UUIDStart (UTC)AgentChannelDurationOutcomePipeline — three stages
流水线 — 三个阶段
fetch_dc.py → 24 dc.<name>.json + dc._session_manifest.json (DC Query REST waterfall, 5 waves)
assemble_dc.py → dc._session_tree.json (pure in-memory hierarchical join)
render_dc.py → dc._session_summary.md (human summary, multi-section)Each stage is independently runnable. chains all three by default.
fetch_dc.py --session <sid> --org <alias>fetch_dc.py → 24个dc.<name>.json + dc._session_manifest.json (DC Query REST API请求瀑布流,5轮请求)
assemble_dc.py → dc._session_tree.json (纯内存分层关联)
render_dc.py → dc._session_summary.md (人工可读摘要,多章节)每个阶段均可独立运行。默认情况下,会链式执行这三个阶段。
fetch_dc.py --session <sid> --org <alias>Invocation
调用方式
bash
python3 "$prefix/fetch_dc.py" --session <session-id-or-messaging-id> --org <alias>Flags: for per-DMO row counts; / to stop early. All entry scripts (, , , , ) accept and to override the default roots — pass these when the host runtime needs artifacts under a different distribution layout.
--verbose--no-assemble--no-renderfetch_dc.pyassemble_dc.pyrender_dc.pyresolve_session.pydiscover_sessions.py--data-dir <path>--cache-dir <path>~/.vibe/{data,cache}/investigating-agentforce-d360/bash
python3 "$prefix/fetch_dc.py" --session <会话ID或消息ID> --org <别名>参数:用于显示每个DMO的记录数;/用于提前终止流程。所有入口脚本(、、、、)均接受和参数,用于覆盖默认的根目录——当宿主运行时需要将产物放在不同的分发路径下时,可传递这些参数。
--verbose--no-assemble--no-renderfetch_dc.pyassemble_dc.pyrender_dc.pyresolve_session.pydiscover_sessions.py--data-dir <path>--cache-dir <path>~/.vibe/{data,cache}/investigating-agentforce-d360/Output artifacts
输出产物
Everything lands under (default; override with ):
~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/--data-dir <path>dc.sessions.json dc.steps.json dc.gateway_requests.json
dc.interactions.json dc.messages.json dc.gateway_responses.json
dc.participants.json dc.generations.json dc.gateway_request_llm.json
dc.content_quality.json dc.content_category.json dc.gateway_request_metadata.json
dc.tags.json dc.tag_definitions.json dc.gateway_request_tags.json
dc.tag_associations.json dc.tag_definition_associations.json
dc.feedback.json dc.feedback_details.json dc.gateway_records.json
dc.moments.json dc.moment_interactions.json
dc.telemetry_spans.json dc.app_generation.json
dc._session_manifest.json (per-DMO row counts + empties)
dc._session_tree.json (hierarchical join — session → interactions → steps → messages → generations → gateway)
dc._session_summary.md (rendered human summary)Zero-row queries are recorded in the manifest with ; no file is written. tolerates missing files. See for the full read order.
status: emptyassemble_dcreferences/artifacts.md所有产物均保存在(默认路径;可通过覆盖):
~/.vibe/data/investigating-agentforce-d360/<org_id15>/<agent>__<ver>/<session_id>/--data-dir <path>dc.sessions.json dc.steps.json dc.gateway_requests.json
dc.interactions.json dc.messages.json dc.gateway_responses.json
dc.participants.json dc.generations.json dc.gateway_request_llm.json
dc.content_quality.json dc.content_category.json dc.gateway_request_metadata.json
dc.tags.json dc.tag_definitions.json dc.gateway_request_tags.json
dc.tag_associations.json dc.tag_definition_associations.json
dc.feedback.json dc.feedback_details.json dc.gateway_records.json
dc.moments.json dc.moment_interactions.json
dc.telemetry_spans.json dc.app_generation.json
dc._session_manifest.json (每个DMO的记录数 + 空记录标识)
dc._session_tree.json (分层关联 — 会话 → 交互 → 步骤 → 消息 → 生成内容 → 网关请求)
dc._session_summary.md (渲染后的人工可读摘要)零记录查询会在清单中标记为;不会生成对应文件。可以容忍缺失文件。完整的读取顺序详见。
status: emptyassemble_dcreferences/artifacts.mdThe DC-only blind spot — read before committing to a root cause
仅DC的盲区 — 确定根本原因前请阅读
DC alone answers what happened — steps that ran, generations that fired, gateway requests that were logged. It does NOT answer what could have happened but didn't:
- Which topics were eligible for the classifier on a given turn (this lives in runtime planner telemetry, not DC).
- Which actions were declared on a topic vs. which survived rule expressions and were actually offered to the LLM.
- Why the LLM picked one topic/action over another (the full prompt + response text only lives in the planner runtime telemetry).
If the user's question is about why a particular topic or action was or wasn't used, DC-only is almost never sufficient. Tell the user: "Availability questions need the runtime planner trace for that turn — which is outside this skill's Data Cloud surface. Check the platform telemetry that mirrors the planner's logged decisions." Don't fabricate a root cause from runtime-only evidence.
仅靠DC只能回答发生了什么——运行的步骤、触发的生成操作、记录的网关请求。它无法回答本可能发生但实际未发生的情况:
- 在某一轮对话中,分类器符合条件的主题有哪些(该信息存在于运行时规划器遥测数据中,而非DC)。
- 某个主题上声明了哪些动作,与通过规则表达式筛选后实际提供给LLM的动作有哪些差异。
- 为什么LLM选择某个主题/动作而非其他(完整的提示词+响应文本仅存在于规划器运行时遥测数据中)。
如果用户的问题是关于为什么某个特定主题或动作被使用或未被使用,仅靠DC几乎永远不够。请告知用户:“可用性问题需要对应轮次的运行时规划器追踪数据——这超出了本技能的Data Cloud覆盖范围。请查看镜像规划器日志决策的平台遥测数据。”请勿仅根据运行时证据编造根本原因。
What DC IS good at
DC擅长的场景
- What ran — every step, every LLM call, every gateway request + response, in order, with timestamps and durations. Good for "walk me through the session".
- What the user saw — full message transcript (user + agent), ordered.
- What the LLM produced — generations, token counts, trust scores (toxicity, instruction adherence, content-category breakdown from +
content_quality).content_category - Tool invocations — action calls, inputs, outputs, errors (from +
gateway_request_metadata).gateway_records - Feedback + flags — user feedback, escalation markers, session-end type.
- Audit integrity — the 1:1 invariant between GatewayRequest and GatewayResponse is checked; drift is flagged in .
counts.audit_chain_1to1_ok
- 运行了什么——每个步骤、每个LLM调用、每个网关请求+响应,按顺序排列,包含时间戳和时长。适用于“带我梳理整个会话”的需求。
- 用户看到了什么——完整的消息对话记录(用户+代理),按顺序排列。
- LLM生成了什么——生成内容、令牌数、信任分数(毒性、指令依从性、来自+
content_quality的内容类别细分)。content_category - 工具调用——动作调用、输入、输出、错误(来自+
gateway_request_metadata)。gateway_records - 反馈与标记——用户反馈、升级标记、会话结束类型。
- 审计完整性——检查GatewayRequest与GatewayResponse之间1:1的一致性;若存在偏差,会在中标记。
counts.audit_chain_1to1_ok
Prerequisites
前置条件
| Tool | Required |
|---|---|
| yes — |
| Data Cloud enabled on the target org | yes — the STDM + GenAI DMOs must have materialized for the session |
| Python 3.10+ | yes — pipeline scripts |
| 工具 | 是否必需 |
|---|---|
| 是 —— |
| 目标组织已启用Data Cloud | 是 —— 会话对应的STDM + GenAI DMO必须已完成物化 |
| Python 3.10+ | 是 —— 流水线脚本依赖 |
Typical prompts — what they map to
典型提示语 — 对应操作
| User says | Skill does |
|---|---|
"Trace session | |
"Summarize what happened in | Resolve |
| "Find escalated sessions today in my-org on Messaging" | Run |
| "Walk me through this session" | Same as trace — read the rendered summary top to bottom |
| 用户表述 | 技能执行操作 |
|---|---|
“在my-org中追踪会话 | |
“总结 | 解析 |
| “在my-org中查找今天Messaging渠道中已升级的会话” | 运行 |
| “带我梳理这个会话” | 与追踪操作相同——从头到尾读取渲染后的摘要 |
What comes back to the user
返回给用户的内容
After the pipeline completes, the rendered carries these top-level sections:
dc._session_summary.md- Session identity — UUID, start/end, duration, agent, channel, end type, participant counts
- Session bootstrap — channel mode + bootstrap variables (,
identity.mode)identity.bootstrap_variables - ID reference — full UUIDs for everything truncated in the hierarchical trace
- Transcript — USER ↔ AGENT narrative per TURN interaction
- Complete hierarchical trace — Interaction → Step → Generation → GatewayRequest, with math
+start + duration = +end - Per-turn summary — one row per interaction
- Planner LLM calls (full prompts + responses) — opt-in via ; suppressed by default
--show-prompts - Visual analysis — gantt + LLM-call overlay
- Session counts — engineer-facing table of manifest counts
- Empties diagnostics — one row per DMO with and a populated
rows == 0_unavailable_reason - Catalog (session-filtered) — TagDefinitions / TagDefinitionAssociations / Tags filtered to agents observed in the session
For deep-dive, open — the single source of truth the summary was rendered from. See for the full pipeline contract and for per-DMO field reference.
dc._session_tree.jsonreferences/dc_pipeline_contract.mdreferences/dc_dmo_fields.md流水线完成后,渲染后的包含以下顶级章节:
dc._session_summary.md- 会话标识——UUID、开始/结束时间、时长、代理、渠道、结束类型、参与者数量
- 会话引导信息——渠道模式+引导变量(、
identity.mode)identity.bootstrap_variables - ID参考——分层追踪中所有截断内容的完整UUID
- 对话记录——每轮交互的USER ↔ AGENT叙事内容
- 完整分层追踪——Interaction → Step → Generation → GatewayRequest,附带计算
+开始时间 + 时长 = +结束时间 - 每轮会话摘要——每轮交互对应一行内容
- 规划器LLM调用(完整提示词+响应)——需通过参数启用;默认隐藏
--show-prompts - 可视化分析——甘特图+LLM调用叠加层
- 会话统计——面向工程师的清单统计表格
- 空记录诊断——每个DMO对应一行,若则显示填充的
rows == 0_unavailable_reason - 目录(会话筛选后)——筛选出会话中涉及的代理对应的TagDefinitions / TagDefinitionAssociations / Tags
如需深入分析,请打开——这是生成摘要的唯一可信数据源。完整的流水线契约详见,每个DMO的字段参考详见。
dc._session_tree.jsonreferences/dc_pipeline_contract.mdreferences/dc_dmo_fields.mdCaveats
注意事项
- — when DC reports zero
gateway_requests_dropped_by_stdmrows but runtime telemetry would show LLM calls did fire, this skill cannot definitively distinguish "STDM exporter dropped writes" from "logging genuinely disabled at the source". The session is reported asgateway_requests; the operator can check platform telemetry to disambiguate. Seeplanner_ran_no_gateway_logs§2.8.references/dc_pipeline_contract.md - Latency — Generation and GatewayRequest carry single-write timestamps, not start/end pairs. The renderer does not compute "latencies" between them — that delta reflects DC's serialization order, not how long the LLM call took.
- Data Cloud materialization lag — fresh sessions may show if STDM hasn't caught up. Re-run after a minute or two.
interactions_not_materialized_yet
- ——当DC报告
gateway_requests_dropped_by_stdm记录数为0,但运行时遥测数据显示LLM调用确实已触发时,本技能无法明确区分“STDM导出器丢弃了写入操作”与“源头确实禁用了日志记录”。会话会被标记为gateway_requests;操作人员可查看平台遥测数据以明确原因。详见planner_ran_no_gateway_logs第2.8节。references/dc_pipeline_contract.md - 延迟——Generation和GatewayRequest仅包含单次写入的时间戳,而非开始/结束时间对。渲染器不会计算它们之间的“延迟”——该差值反映的是DC的序列化顺序,而非LLM调用的实际耗时。
- Data Cloud物化延迟——如果STDM尚未完成处理,新会话可能会显示。请在1-2分钟后重新运行。
interactions_not_materialized_yet