Visão 360° do Data Cloud de uma única sessão do Agentforce. USAR quando o usuário pedir para rastrear, inspecionar, resumir ou descrever uma sessão específica do Agentforce por ID de sessão (UUID de Agent Session `019d…` ou ID de MessagingSession `0Mw…`). Também vale para descoberta de sessões — encontrar/listar/buscar sessões por período, agente, canal, resultado ou texto da conversa — quando o usuário ainda não tem um ID de sessão. NÃO USAR para perguntas de arquitetura em tempo de design (use agentforce-architecture-analyze) nem para perguntas de desempenho/latência/SLO em tempo de execução que exijam telemetria da plataforma além do Data Cloud.
Compatibilidade
Pelo seu gateway Versatile, qualquer cliente MCP carrega as instruções desta skill. Se ele também consegue fazer o trabalho depende do que a skill precisa e do que o cliente executa.
Requer
- python
- Rede
| Cliente | Funciona | Por quê | Lê SKILL.md nativamente |
|---|---|---|---|
| Claude Code | Completo | Tem tudo o que esta skill precisa | Sim |
| Codex CLI | Completo | Tem tudo o que esta skill precisa | Sim |
| Cursor | Completo | Tem tudo o que esta skill precisa | Sim |
| Gemini CLI | Completo | Tem tudo o que esta skill precisa | Sim |
| VS Code Copilot | Completo | Tem tudo o que esta skill precisa | Sim |
| opencode / oh-my-pi | Completo | Tem tudo o que esta skill precisa | Sim |
| Claude Desktop | Não | Não executa o código que esta skill traz | Sim |
| ChatGPT and other chat-only MCP clients | Não | Não executa o código que esta skill traz | Não |
Como determinamos isso
Nada aqui foi executado ou testado. Cada veredito é derivado dos arquivos da própria skill e de uma tabela fixa de regras, então leia como uma previsão, não uma garantia.
Da skill lemos as ferramentas que o frontmatter permite, as linguagens dos scripts que ela traz, os comandos que cita no código, o uso de rede e os servidores MCP que espera.
De cada cliente usamos três coisas que ele faz na sua máquina sem servidores extras: executar comandos, ler e gravar arquivos e acessar a web. A busca embutida de um app de chat não conta, porque uma skill não consegue acioná-la.
Completo significa que o cliente faz tudo o que a skill precisa. Só as instruções significa que ele carrega e segue o texto, mas não tem uma capacidade que a skill usa. Não significa que a skill traz código e o cliente não consegue executá-lo.
- Alternativas
- 1 skill parecida unida a esta
---
name: agentforce-d360-analyze
description: "Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session id (Agent Session UUID `019d…` or MessagingSession id `0Mw…`). Also triggers on session discovery — find/list/search sessions by time, agent, channel, outcome, or conversation text — when the user has no session id yet. DO NOT TRIGGER for design-time architecture questions (use agentforce-architecture-analyze instead) or for runtime perf/latency/SLO questions that require platform telemetry beyond Data Cloud."
metadata:
version: "1.0"
domains: ["Agentforce", "Data 360"]
minApiVersion: "66.0"
relatedSkills:
- "agentforce-architecture-analyze"
cliTools:
- tool: ["python3"]
semver: ">=3.10.0"
- tool: ["sf"]
semver: ">=2.0.0"
---
# agentforce-d360-analyze — Data Cloud 360° session view
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.
## 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 `0Mw…` messaging id) AND no discovery expression (no time phrase / `--agent` / `--channel` / `--outcome` / `--grep` / verbs like "find" / "list").
> Which session should I pull from Data Cloud, and in which org?
>
> I need:
> - **Session id** — either an Agent Session UUID (`019db7f6-…`) or a MessagingSession id (`0Mw…`, 15/18 chars).
> - **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 `sf` CLI auth (the alias you configured with `sf org login`).
>
> Artifacts land in `~/.vibe/data/agentforce-d360-analyze/<org_id15>/<agent>__<ver>/<session_id>/` (override per-script with `--data-dir <path>`).
## Session id forms — UUID or MessagingSession id
Both forms are accepted on `--session`:
| Form | Example | Resolution |
|---|---|---|
| Agent Session UUID | `019dface-0000-7000-8000-000000000002` | Pass-through |
| MessagingSession id (`0Mw` prefix) | `0MwTESTMSG12345AAA` | Resolved via `resolve_session.py` — live DC lookup on first fetch, disk-first thereafter |
**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 `~/.vibe/data/agentforce-d360-analyze/<org_id15>/<agent>__<ver>/<session_id>/` (default; overridable per-script with `--data-dir <path>`) — the messaging id is a lookup key only, never a directory name. The dominant agent (first in `sorted(agents_observed)`) names the `<agent>__<ver>/` segment.
## Resolving the script prefix
`<SKILL_DIR>` = the absolute path to **this skill's own directory** (the folder holding this
`SKILL.md`); resolve it from the skill path in context and substitute it below. Runtimes
install skills in different places (`~/.claude/skills/`, `~/.vibe/skills/`, a plugin cache, a
project `.claude/skills/`), so the block also probes the known install roots at runtime and
uses the first that actually contains this skill's scripts. An exported `SKILL_ROOT` wins.
```bash
_skill=agentforce-d360-analyze
for _c in "${SKILL_ROOT:-}" "<SKILL_DIR>" \
"${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/$_skill}" \
"${VIBES_SKILLS_DIR:+$VIBES_SKILLS_DIR/$_skill}" \
"$HOME/.claude/skills/$_skill" "$PWD/.claude/skills/$_skill" \
"${PLUGIN_ROOT:-$HOME/.vibe/skills}/$_skill"; do
[ -n "$_c" ] || continue
# Some stagers (ADK eval) nest the bundled files under <skill>/artifacts/.
for _r in "$_c" "$_c/artifacts"; do
[ -f "$_r/scripts/fetch_dc.py" ] && { SKILL_ROOT="$_r"; break 2; }
done
done
[ -f "${SKILL_ROOT:-}/scripts/fetch_dc.py" ] || { echo "$_skill: scripts not found — set SKILL_ROOT to this skill's directory" >&2; exit 1; }
prefix="$SKILL_ROOT/scripts"
```
Every subsequent invocation in this doc uses `"$prefix/..."`.
## Session discovery (no id yet)
When the user doesn't have a session id, run `discover_sessions.py` against the STDM session DMO. Prints a numbered picker; user picks one; proceed with the chosen UUID.
```bash
python3 "$prefix/discover_sessions.py" [--org <alias>] [filters...]
```
**`--org` is optional.** "My org", "our org", or no alias at all means the sf CLI default target org — omit `--org` and the script uses `sf config get target-org`. Pass `--org <alias>` only when the user names an alias. If no default is set the script exits with "no --org given and no default target org set"; relay its `sf config set target-org <alias>` hint and ask the user for an alias.
**Filters** (all optional): `--since <expr>` (default last 24h; accepts "last 2 hours", "today", ISO dates), `--agent <api-name>`, `--channel <Messaging|Builder|Voice>`, `--outcome <USER_ENDED|ESCALATED|TRANSFERRED|TIMEOUT|NOT_SET>`, `--grep <substring>` (conversation text), `--tz <IANA>`, `--limit <N>` (default 20).
**Output**: markdown table with `#`, `UUID`, `Start (UTC)`, `Agent`, `Channel`, `Duration`, `Outcome`. User replies with a number; proceed with that UUID.
## Pipeline — three stages
```text
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. `fetch_dc.py --session <sid> [--org <alias>]` chains all three by default.
### Invocation
```bash
python3 "$prefix/fetch_dc.py" --session <session-id-or-messaging-id> [--org <alias>]
```
`--org` is optional here too: without it (the user said "my org" or named no alias) the CLI default target org is used. With no default set, `fetch_dc.py` reports `DC_ACCESS_DENIED` with reason `no_org` (exit 10 when headless) — ask the user for an alias and re-run with `--org <alias>`.
Flags: `--verbose` for per-DMO row counts; `--no-assemble` / `--no-render` to stop early. All entry scripts (`fetch_dc.py`, `assemble_dc.py`, `render_dc.py`, `resolve_session.py`, `discover_sessions.py`) accept `--data-dir <path>` and `--cache-dir <path>` to override the default `~/.vibe/{data,cache}/agentforce-d360-analyze/` roots — pass these when the host runtime needs artifacts under a different distribution layout.
### Output artifacts
Everything lands under `~/.vibe/data/agentforce-d360-analyze/<org_id15>/<agent>__<ver>/<session_id>/` (default; override with `--data-dir <path>`):
```text
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 `status: empty`; no file is written. `assemble_dc` tolerates missing files. See `references/artifacts.md` for the full read order.
## The DC-only blind spot — read before committing to a root cause
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.
### What DC IS good at
- **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`.
## Prerequisites
| Tool | Required |
|---|---|
| `sf` CLI (authenticated against the target org) | yes — `sf org login web --alias <alias>`, and the CLI must provide `sf org auth show-access-token` (startup preflight enforces this) |
| Data Cloud enabled on the target org | yes — the STDM + GenAI DMOs must have materialized for the session |
| Python 3.10+ | yes — pipeline scripts |
## Typical prompts — what they map to
| User says | Skill does |
|---|---|
| *"Trace session `<uuid>` in my-org"* | `fetch_dc.py --session <uuid> --org my-org` → assemble → render |
| *"Summarize what happened in `0Mw…`"* | Resolve `0Mw…` → UUID, then full DC pipeline |
| *"Find escalated sessions today in my-org on Messaging"* | Run `discover_sessions.py --since today --outcome ESCALATED --channel Messaging`, print picker, user picks, then DC pipeline |
| *"Walk me through this session"* | Same as trace — read the rendered summary top to bottom |
## What comes back to the user
After the pipeline completes, the rendered `dc._session_summary.md` carries these top-level sections:
1. **Session identity** — UUID, start/end, duration, agent, channel, end type, participant counts
2. **Session bootstrap** — channel mode + bootstrap variables (`identity.mode`, `identity.bootstrap_variables`)
3. **ID reference** — full UUIDs for everything truncated in the hierarchical trace
4. **Transcript** — USER ↔ AGENT narrative per TURN interaction
5. **Complete hierarchical trace** — Interaction → Step → Generation → GatewayRequest, with `+start + duration = +end` math
6. **Per-turn summary** — one row per interaction
7. **Planner LLM calls (full prompts + responses)** — opt-in via `--show-prompts`; suppressed by default
8. **Visual analysis** — gantt + LLM-call overlay
9. **Session counts** — engineer-facing table of manifest counts
10. **Empties diagnostics** — one row per DMO with `rows == 0` and a populated `_unavailable_reason`
11. **Catalog (session-filtered)** — TagDefinitions / TagDefinitionAssociations / Tags filtered to agents observed in the session
For deep-dive, open `dc._session_tree.json` — the single source of truth the summary was rendered from. See `references/dc_pipeline_contract.md` for the full pipeline contract and `references/dc_dmo_fields.md` for per-DMO field reference.
## Caveats
- **`gateway_requests_dropped_by_stdm`** — when DC reports zero `gateway_requests` rows 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 as `planner_ran_no_gateway_logs`; the operator can check platform telemetry to disambiguate. See `references/dc_pipeline_contract.md` §2.8.
- **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 `interactions_not_materialized_yet` if STDM hasn't caught up. Re-run after a minute or two.
76 arquivos, 680,3 KB
- README.md6,2 KB
- SKILL.md13,2 KB
- assets/dc/app_generation.sql1,9 KB
- assets/dc/content_category.sql1,5 KB
- assets/dc/content_quality.sql1,3 KB
- assets/dc/discover_sessions.sql2,3 KB
- assets/dc/feedback.sql1,5 KB
- assets/dc/feedback_details.sql1,3 KB
- assets/dc/gateway_records.sql1,6 KB
- assets/dc/gateway_request_llm.sql1,6 KB
- assets/dc/gateway_request_metadata.sql1,5 KB
- assets/dc/gateway_request_tags.sql1,4 KB
- assets/dc/gateway_requests.sql3,4 KB
- assets/dc/gateway_responses.sql1,7 KB
- assets/dc/generations.sql1,9 KB
- assets/dc/interactions.sql2 KB
- assets/dc/messages.sql2,1 KB
- assets/dc/messaging_session.sql1,7 KB
- assets/dc/moment_interactions.sql1,4 KB
- assets/dc/moments.sql1,5 KB
- assets/dc/participants.sql1,8 KB
- assets/dc/sessions.sql3 KB
- assets/dc/steps.sql2,6 KB
- assets/dc/tag_associations.sql1,7 KB
- assets/dc/tag_definition_associations.sql1,4 KB
- assets/dc/tag_definitions.sql1,8 KB
- assets/dc/tags.sql1,3 KB
- assets/dc/telemetry_spans.sql2,1 KB
- references/artifacts.md2,7 KB
- references/dc_dmo_fields.md42,1 KB
- references/dc_pipeline_contract.md26,3 KB
- scripts/_shared/__init__.py122 B
- scripts/_shared/cli_override.py3,3 KB
- scripts/_shared/fs_guard.py13,2 KB
- scripts/_shared/paths.py5,8 KB
- scripts/_shared/runtime.py2 KB
- scripts/_shared/sql.py548 B
- scripts/assemble_dc.py69,6 KB
- scripts/config.py1,8 KB
- scripts/dc.py13,8 KB
- scripts/discover_sessions.py21,1 KB
- scripts/fetch_dc.py45,1 KB
- scripts/render_dc.py69,7 KB
- scripts/resolve_session.py10,8 KB
- scripts/storage.py3,1 KB
- scripts/tests/__init__.py0 B
- scripts/tests/_bootstrap.py483 B
- scripts/tests/fixtures/__init__.py0 B
- scripts/tests/fixtures/synthetic_session.py14,6 KB
- scripts/tests/test_assemble_dc_bootstrap_and_mode.py4,2 KB
- scripts/tests/test_assemble_dc_gateway_direct.py8,3 KB
- scripts/tests/test_assemble_dc_gateway_direct_integration.py6,4 KB
- scripts/tests/test_assemble_dc_helpers.py10 KB
- scripts/tests/test_assemble_dc_integration.py9,3 KB
- scripts/tests/test_dc_and_resolve_session.py26,7 KB
- scripts/tests/test_default_target_org.py18,8 KB
- scripts/tests/test_discover_sessions.py19 KB
- scripts/tests/test_discover_sessions_grep_ci.py8,2 KB
- scripts/tests/test_fetch_dc_helpers.py10,6 KB
- scripts/tests/test_fetch_dc_identity.py22 KB
- scripts/tests/test_fetch_dc_main.py9,4 KB
- scripts/tests/test_fetch_dc_waterfall.py8,6 KB
- scripts/tests/test_fetch_dc_waterfall_full.py11,2 KB
- scripts/tests/test_identity_coherence.py13,8 KB
- scripts/tests/test_render_dc_branches.py9,9 KB
- scripts/tests/test_render_dc_gateway_direct.py5,1 KB
- scripts/tests/test_render_dc_helpers.py10,5 KB
- scripts/tests/test_render_dc_integration.py7,7 KB
- scripts/tests/test_render_dc_planner_llm_calls.py11,8 KB
- scripts/tests/test_render_dc_show_prompts_gating.py8,7 KB
- scripts/tests/test_resolve_from_disk.py4,1 KB
- scripts/tests/test_resolve_session_main.py5,2 KB
- scripts/tests/test_runtime_override.py4,2 KB
- scripts/tests/test_session_shape.py3,5 KB
- scripts/tests/test_session_shape_dropped_by_stdm.py3,5 KB
- scripts/tests/test_skill_md_prefix_block.py6,8 KB
- Licença
- Apache-2.0encontrada em repository
- Listagem
- Baixar o YAML
Gateway na porta 7465 alterar
Fica salvo só neste navegador.
Ainda não tem o gateway? Cole isto no seu terminal e clique em Importar de novo.
git clone https://github.com/versatile-sh/connector-engine && cd connector-engine && make upImportar abre o seu próprio gateway em uma nova aba; esta página nunca se conecta a ele. Como funciona