agentforce-architectur…
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
System-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering
Claude Code
$ npx -y skills add forcedotcom/sf-skills --skill experience-afv-analytics-query --agent claude-code
Codex
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a codex -y
Cursor
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a cursor -y
Gemini CLI
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a gemini-cli -y
GitHub Copilot
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a github-copilot -y
OpenCode
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a opencode -y
Windsurf
$ npx skills add forcedotcom/sf-skills --skill experience-afv-analytics-query -a windsurf -y
name: experience-afv-analytics-query description: "System-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering by period (default current), orgType (default All), recordType, modelName (default All), and other explicitly returned row fields after one parameterless API call." metadata: version: "1.0" minApiVersion: "68.0" accessCheck: "(DxDevopsAnalytics.orgHasDevopsAnalyticsAccess)" domains: - "Experience" - "Agentforce"
Use this skill when a user asks to retrieve Agentforce Vibes (AFV) usage or instrumentation metrics for the current Salesforce org.
This skill describes one public, read-only Connect API operation:
The route is available at external API version **v68.0 or later**. Call it at v68.0; do not infer a lower version from the source spec's generic `info.version` or `servers` example. v67.0 returns `404 NOT_FOUND`. A version above the org's own maximum also returns `404`; that is an org limit, not a reason to call a version below v68.0.
1. Call `GET /services/data/v68.0/instrumentation/afv-metrics`. 2. Send no path parameters, query parameters, or request body. 3. Read the returned `AFVMetricsOutputRepresentation`:
metric names and values. 4. If `success` is `false`, surface `message` and the raw response. Do not present the rows as a successful metrics result or retry automatically. 5. If `success` is `true` and `rows` is empty, report the no-data result and stop. Do not retry, treat it as an API error, or fall back to an internal API. 6. Branch on each row's `recordType` before reading class-specific fields. Do not assume that any particular record class is present. Preserve unknown record types and fields instead of dropping them.
Users can narrow the displayed metrics with optional result filters. These filters control local processing after the complete response is received; they are not Connect API query parameters or `get-afv-metrics` dispatch inputs.
| Filter | Accepted value | Matching rule | |---|---|---| | `period` | `current` (default) or `prior` | Exact match on `rows[*].period`. Reject another explicit value before calling the API. | | `orgType` | `All` (default) or an org-type value returned by the API | Case-insensitive exact match on `rows[*].orgType`. `All` is a literal roll-up value, not a wildcard. | | `recordType` | One or more record-type names | Exact match on `rows[*].recordType`. Known values include `aggregate`, `dailyTimeSeries`, `modelMetrics`, `orgBreakdown`, `userMetrics`, and `weeklyActiveUsers`, but accept an exact future value when the user supplies it. | | `modelName` | `All` (default) or a model name returned by the API | Case-insensitive exact match on `rows[*].modelName`. `All` is a literal roll-up value, not a wildcard. | | Other returned row field | Explicit field name and value supplied by the user | Exact match only when that field is present. Do not invent aliases or assume the field exists on every record type. |
If the user does not supply `period`, apply `period=current`; if the user does not supply `orgType`, apply `orgType=All`; if the user does not supply `modelName`, apply `modelName=All`. These are default local result filters. An explicit value overrides its corresponding default. A request that compares the current and prior periods explicitly selects both values and therefore overrides the single-period default. Likewise, a request to compare or rank models explicitly selects the concrete model names present in the response instead of the `All` model roll-up. If the user supplies more than one filter name, combine them with AND. If the user supplies multiple values for the same field, match any of those values. Each default still applies when the user supplies another filter but omits one of these three fields.
Apply filters only after checking HTTP status, `success`, and the unfiltered `rows` array:
1. Capture the requested result filters from the user's prompt and add the defaults `period=current`, `orgType=All`, and `modelName=All` when those fields were omitted and the request does not imply a multi-value comparison. 2. Call `get-afv-metrics` once with no arguments and no query string. 3. If `success` is `false` or the complete `rows` array is empty, follow the normal response handling without filtering. 4. Otherwise, filter the returned rows in memory and render the matching rows. 5. Report the filters applied, the total rows returned by the API, and the number of rows matched.
A successful response with rows but zero filter matches, including when a default filter finds no rows, is a successful zero-match view, not an empty API response. Report that the complete response contained no matching rows. Do not retry, change the request URL, infer zero metric values, or report that the API itself returned no data. When the requested `recordType` is `userMetrics`, also apply the permission-dependent guidance below instead of treating the absence as proof of zero user activity.
This repository provides Salesforce agent skills, plugins, and sample apps for building applications.
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use this skill to upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec…
Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific…
Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates,…
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…
Use to design an AI agent persona — identity, voice, tone, behavioral style, guardrails — and encode it into Agent Script (.agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.