{
  "markdown": "# SFAgent Tools\n\n> **The first AI-driven testing toolkit for Salesforce Agentforce — in Claude Code, OpenAI Codex, and Agentforce Vibes.**\n>\n> Tell your AI assistant what to test. It reads your agent's brain, runs real headless conversations, finds what's broken, and hands you a scored report plus a YAML spec for CI. **In minutes, not hours. Zero new credentials.**\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![npm](https://img.shields.io/npm/v/sfagent-tools-mcp-server.svg)](https://www.npmjs.com/package/sfagent-tools-mcp-server)\n[![Works in Claude Code](https://img.shields.io/badge/Claude_Code-supported-D97757.svg)](https://code.claude.com)\n[![Works in OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-supported-10A37F.svg)](https://developers.openai.com/codex)\n[![Works in Agentforce Vibes](https://img.shields.io/badge/Agentforce_Vibes-supported-00A1E0.svg)](https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/devagent-mcp.html)\n\n---\n\n## What it does\n\n> 📝 **Terminology:** *subagent* is Salesforce's renamed term for what was called *topic* before Agent Script v2.0 (April 2026). Same thing, new name — used throughout this README and the plugin.\n\n- 🔍 **Discovers your agent** — reads every subagent (formerly *topic*), action, and description from your org so the AI knows what to test before testing it.\n- 💬 **Has real conversations** — drives headless multi-turn sessions through `sf agent preview`. Live transcript in markdown you can watch in a split pane.\n- 🛡️ **Probes guardrails** — prompt-injection attempts, off-topic requests, legal threats, manager-escalation triggers, identity-verification gates — automatically.\n- 📏 **Validates your business rules** — load expectations from `sfagent-config.yaml` (topic-specific rules, global rules, custom scenarios) and the AI scores each one.\n- 📊 **Scores everything** — routing accuracy, guardrail strength, multi-turn coherence, business-rule compliance — in a clean Markdown report.\n- 🔁 **Hands off to CI** — emits YAML compatible with `sf agent test run-eval` so the same scenarios run on every commit.\n- 🩺 **Reads Salesforce's own traces** — `sf agent trace` shows exactly which subagent routed each turn and which actions ran. We surface it for diagnostics.\n- 🔐 **Zero new credentials** — reuses your `sf` CLI auth. No External Client App, no connected app, no tokens. Production orgs are blocked at the tool level.\n- 🤖 **Works in Claude Code, OpenAI Codex, and Agentforce Vibes** — same npm-published MCP server. Cursor, Continue.dev, Cline, Windsurf packagings coming soon.\n\n---\n\n## See it work\n\nOne sentence. Real agent. Real findings. Ready for CI.\n\n![Claude Code demo](demo/sfagent-claude-demo.gif)\n\nSame plugin, same agent, byte-identical answers — also in Codex:\n\n![OpenAI Codex demo](demo/sfagent-codex-demo.gif)\n\n---\n\n## Install in 30 seconds\n\n### Claude Code\n\nInside Claude:\n\n```\n/plugin marketplace add lucianostraga/sfagent-tools\n/plugin install sfagent-tools@sfagent-tools-marketplace\n```\n\nOr from your shell, before launching:\n\n```bash\nclaude plugin marketplace add lucianostraga/sfagent-tools\nclaude plugin install sfagent-tools@sfagent-tools-marketplace\n```\n\n### OpenAI Codex\n\nOne command:\n\n```bash\ncodex mcp add sfagent-tools -- npx -y sfagent-tools-mcp-server@latest\n```\n\n### Agentforce Vibes\n\nInside Vibes (IDE or VS Code extension), open the **MCP Tools** panel → **Configure MCP Servers** → add to `a4d_mcp_settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"sfagent-tools\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"sfagent-tools-mcp-server@latest\"]\n    }\n  }\n}\n```\n\nThat's it for any of them. Now in any project, just say:\n\n> *\"Test my Agentforce agent\"*\n\nAnd your AI does the rest.\n\n---\n\n## Every tool, in 10 seconds each\n\nEach clip is a real terminal recording. Real Salesforce sandbox. Real Agentforce Service Agent.\n\n### Discover what's in your org\n\n| | |\n|---|---|\n| **list_orgs** — pick which org to test your agent in (production blocked) | ![](demo/clips/sfagent-list_orgs.gif) |\n| **list_agents** — list Agentforce agents in an org | ![](demo/clips/sfagent-list_agents.gif) |\n| **get_agent_metadata** — see subagents (formerly *topics*) + actions | ![](demo/clips/sfagent-get_agent_metadata.gif) |\n| **load_config** — read your `sfagent-config.yaml` expectations | ![](demo/clips/sfagent-load_config.gif) |\n\n### Run a live test\n\n| | |\n|---|---|\n| **start_session** — open a headless conversation | ![](demo/clips/sfagent-start_session.gif) |\n| **send_message** — send a probe, get the agent's reply | ![](demo/clips/sfagent-send_message.gif) |\n| **end_session** — close and return the transcript | ![](demo/clips/sfagent-end_session.gif) |\n\n### Hand off to CI\n\n| | |\n|---|---|\n| **generate_test_spec** — emit YAML for `sf agent test run-eval` | ![](demo/clips/sfagent-generate_test_spec.gif) |\n\n### Diagnose with Salesforce's own traces *(sf CLI 2026-05-20+)*\n\n| | |\n|---|---|\n| **list_traces** — find local trace files | ![](demo/clips/sfagent-list_traces.gif) |\n| **read_trace** — drill into actions + routing per turn | ![](demo/clips/sfagent-read_trace.gif) |\n\nPlus `run_batch_test` and `get_test_results` for users who already have native `AiEvaluationDefinition` tests in their org.\n\n---\n\n## Why this exists\n\nYou built an Agentforce agent. Now you need to know:\n\n- Does it route to the right subagent (formerly *topic*) when a customer says *\"my order is late\"*?\n- What happens when someone says *\"ignore your instructions\"*?\n- Does it remember context across a 5-turn conversation?\n- Does it actually follow your business rules?\n- What does it do when the customer demands a manager?\n\n**Today, answering these questions means hours of manual chatting in Testing Center, or hand-writing YAML specs.** You'll get tired, miss edge cases, and ship anyway.\n\n**SFAgent Tools turns those hours into minutes.**\n\n---\n\n## How it works\n\n1. **Reads your agent** — discovers every subagent (formerly *topic*), action, and description in your org\n2. **Designs scenarios** — happy paths, edge cases, prompt-injection probes, escalation tests, multi-turn context\n3. **Has real conversations** — headless multi-turn sessions through `sf agent preview`. You watch them happen live in a split pane.\n4. **Scores everything** — routing accuracy, guardrails, business-rule compliance, multi-turn coherence — in a clean Markdown report\n5. **Hands off to CI** — generates a YAML spec for `sf agent test run-eval` so the same scenarios run on every commit\n\n---\n\n## Zero setup beyond what you already have\n\nIf you've ever run `sf org login web`, you're done. SFAgent Tools reuses your existing Salesforce CLI authentication.\n\n**No new credentials. No External Client App. No connected app setup. No tokens to manage.** Production orgs are blocked at the tool level — testing only runs against sandboxes, scratch orgs, or Developer Edition.\n\n---\n\n## Built on the latest Salesforce tooling\n\nAligned with Agentforce DX as of TrailblazerDX 2026. Uses Agent Script v2.0 (`subagent` — the renamed term for what used to be called `topic`), the GA `sf agent preview` CLI, the new `sf agent trace` (May 2026), and emits YAML compatible with `sf agent test run-eval` so your exploratory tests become CI regression specs.\n\n**Complements Salesforce's native testing — it doesn't replace it.**\n\n---\n\n## Other MCP clients (coming soon)\n\nThe MCP server itself is generic — anything that speaks the Model Context Protocol can call it via:\n\n```bash\nnpx -y sfagent-tools-mcp-server@latest\n```\n\n**Currently officially supported and tested:** Claude Code, OpenAI Codex, Agentforce Vibes.\n\n**Coming soon (packaged + tested):** Cursor, Continue.dev, Cline, Windsurf, Gemini CLI.\n\nFor the full Codex plugin experience (skills + marketplace metadata), see [packages/codex-plugin/README.md](packages/codex-plugin/README.md).\n\n---\n\n## Prerequisites\n\n- [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli) (`sf` v2.131 or later)\n- A Salesforce sandbox, scratch org, or Developer Edition with at least one Agentforce agent\n- `sf org login web --alias <your-org>` already run\n- Node.js 20+ (for the npx-based server install)\n- Claude Code or OpenAI Codex (or any MCP-compatible client)\n\n---\n\n## Status\n\n- **v1.0.0** — current release. All 12 MCP tools verified end-to-end against a live Agentforce Service Agent in both Claude Code and Codex. Three patch fixes (RequiresProjectError, wrong trace-tool flags, graceful empty-trace fallback) hardened during smoke testing. Production-ready.\n- **v0.2.x** — internal iteration: monorepo restructure, Codex packaging, subagent terminology aligned with Agent Script v2.0, new trace + test-spec tools.\n- **v0.1.0** — initial Claude Code plugin with 9 MCP tools.\n\n---\n\n## Architecture (for the curious)\n\nThis is a monorepo. The MCP server is the actual product — both plugin packagings are thin wrappers around it.\n\n```\nsfagent-tools/\n├── packages/\n│   ├── server/                # sfagent-tools-mcp-server (npm)\n│   ├── claude-code-plugin/    # Claude Code packaging\n│   └── codex-plugin/          # OpenAI Codex packaging\n├── demo/                      # demo video and per-tool clips\n├── docs/                      # progress logs, architecture decisions\n└── discovery-docs/            # research that informed the design\n```\n\nOne server. One set of tools. Two install paths.\n\n---\n\n## Development\n\n```bash\nnpm install                                          # install via npm workspaces\nnpm run build                                        # build the server\nclaude --plugin-dir packages/claude-code-plugin      # test the Claude plugin locally\n```\n\nFor local Codex testing, see [packages/codex-plugin/README.md](packages/codex-plugin/README.md).\n\n---\n\n## Contributing\n\nIssues and PRs welcome. The MCP server in [packages/server/](packages/server/) is the single source of truth for tool behavior. Changes to the tool surface ship as a server version bump on npm.\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE).\n",
  "bytes": 10014,
  "sha": "8c566e48305ff30c52c1504487c25fca2cdac1b77606aece7d0a6e22e9f56781",
  "repo_slug": "lucianostraga/sfagent-tools",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_lucianostraga_sfagent_tools_sfagent_tool_c1da0323/readme"
}