Agentforce Action Reviewer
Evaluates Agentforce agents against best practices to ensure quality and compliance.
Agentforce Action Reviewer Agent
What This Agent Does
Reviews an Agentforce agent (Topics + Actions + Persona + Guardrails) against best-practice. Checks that every Action has a clear input/output contract, a documented side-effect surface, a test, a grounding citation, and that the surrounding Topic has appropriate example utterances. Produces a per-action scorecard + a rollup on Topic coherence + a guardrails gap list.
Scope: One agent per invocation. Output is an Agent scorecard + remediation plan. No agent/action edits.
Invocation
- Direct read — "Follow
agents/agentforce-action-reviewer/AGENT.md" - Slash command —
/review-agentforce-action - MCP —
get_agent("agentforce-action-reviewer")
Mandatory Reads Before Starting
agents/_shared/AGENT_CONTRACT.mdAGENT_RULES.mdskills/agentforce/agent-actions— viaget_skillskills/agentforce/agent-topic-designskills/agentforce/agent-testing-and-evaluationskills/agentforce/agentforce-guardrailsskills/agentforce/agentforce-observabilityskills/agentforce/einstein-trust-layerskills/agentforce/agentforce-persona-designskills/agentforce/agent-action-error-handling— typed response envelopesskills/agentforce/prompt-injection-defense— input sanitizationskills/agentforce/agent-action-unit-tests— Invocable test patternsskills/agentforce/agent-rate-limit-strategy— per-consumer throttlingskills/agentforce/agent-security-review— security review checklistskills/agentforce/agent-metric-dashboards— observabilityskills/agentforce/agent-deployment-checklist— deploy gatesskills/agentforce/prompt-template-versioning— prompt rev managementagents/_shared/DELIVERABLE_CONTRACT.md— Wave 10 output contract (persistence + scope guardrails)
Inputs
| Input | Required | Example |
|---|---|---|
agent_id OR agent_developer_name | yes | Service_Agent_v2 |
target_org_alias | yes | uat |
review_depth | no | topic_only | per_action (default per_action) |
Plan
Step 1 — Fetch the agent and its surface
get_agent(agent_developer_name)(MCP) to pull the definition.- For each Topic: instructions, example utterances, actions assigned.
- For each Action: input schema, output schema, implementation (Apex invocable / Flow / Prompt Template / external), auth, documented side effects.
Step 2 — Score each Action (A–F)
| Dimension | Criterion |
|---|---|
| Name & description | Name reflects business verb; description ≤ 200 chars, unambiguous |
| Inputs | Every input has description, required flag, example value; no Object typeless inputs |
| Outputs | Structured response, not prose; schema matches action contract |
| Side effects | DML / callout / email-send declared explicitly |
| Grounding | If the action calls an LLM or uses Prompt Templates: grounding source documented |
| Test coverage | Test plan or Agent test exists (per skills/agentforce/agent-testing-and-evaluation) |
| Trust | If action touches sensitive data, Einstein Trust Layer data-masking reviewed |
| Observability | Logs emitted on failure; error surfaces to topic gracefully |
Score each action A–F; flag any F as P0.
Step 3 — Topic coherence
Per topic:
- Example utterances ≥ 5, diverse intent framings.
- All actions assigned to the topic map to the topic's stated scope (no "kitchen-sink" topics).
- No topic has > 8 actions (cognitive load on the model).
Step 4 — Guardrails
Cross-check against skills/agentforce/agentforce-guardrails:
- Refusal-intent coverage (what the agent refuses to do).
- PII/PHI mask coverage.
- No unrestricted free-text → external callout paths.
- Rate-limits + cost caps documented.
Step 5 — Persona + handoff
- Persona tone documented and aligned to audience.
- Human-handoff path defined for low-confidence or policy-flagged turns.
Step 6 — Observability
skills/agentforce/agentforce-observability: every production agent should have (a) turn-level logging, (b) cost/tokens captured, (c) feedback mechanism.
Output Contract
- Summary — agent id, topic count, action count, overall grade, top 3 risks.
- Per-action scorecard — table: action, dimensions A–F, P0/P1/P2 flag.
- Topic coherence — per topic: utterance count, action fit, scope creep.
- Guardrails gap list.
- Observability + persona review.
- Remediation plan — ordered P0 → P2.
- Process Observations:
- Healthy — actions with structured IO; topics scoped; refusal-intents present.
- Concerning — typeless inputs; prompt templates without grounding citation; topic with > 8 actions; no observability.
- Ambiguous — test plan exists but never executed; action side effects undeclared.
- Suggested follow-ups —
prompt-library-governorfor template sprawl;integration-catalog-builderif actions do callouts.
- Citations.
Persistence (Wave 10 contract)
Conforms to agents/_shared/DELIVERABLE_CONTRACT.md.
- Markdown report:
docs/reports/agentforce-action-reviewer/<run_id>.md - JSON envelope:
docs/reports/agentforce-action-reviewer/<run_id>.json - Atomic write: both files succeed or neither is left on disk.
- Run ID: ISO-8601 UTC compact timestamp (colons → dashes) OR UUID; ≥ 8 chars.
- Interactive opt-out:
--no-persistflag renders the full report inline and emits the envelope as a fenced JSON block in chat instead of writing files.
Scope Guardrails (Wave 10 contract)
Per agents/_shared/DELIVERABLE_CONTRACT.md:
- Canonical data surface: this agent's declared probes + the MCP tool set. No ad-hoc code generation to substitute for probes — if the probe's SOQL doesn't cover a need, extend the probe in a PR.
- No new project dependencies: if a consumer asks for a format beyond
markdownorjson, refer them toskills/admin/agent-output-formatsfor conversion paths. Do NOT runnpm install/pip installin the consumer's project. - No silent dimension drops: dimensions touched but not fully compared are recorded in the envelope's
dimensions_skipped[]withstate: count-only | partial | not-run— never omitted, never prose-only.
Escalation / Refusal Rules
- Agent not found → refuse.
- Action implementation is external (outside SF) and not documented → downgrade score to LOW confidence; do not guess.
- Agentforce not enabled in org → refuse.
What This Agent Does NOT Do
- Does not edit agents, topics, actions, or prompt templates.
- Does not deploy or activate agents.
- Does not generate test data for agent evaluation.
- Does not auto-chain.