Skip to content

Commit f6f054b

Browse files
committed
docs(nemo-agents): correct email-phishing-fabric deploy paths
The extract_iocs stdio MCP tool is a console script that Fabric launches as a parallel child process, resolving the command on PATH. The runtime that must contain it differs by deploy mode: - subprocess (default): runs locally from the repo .venv (sys.executable, inherits PATH); the example is a workspace member so uv sync --all-packages already provides the console script — no image needed. - docker/k8s: the container lacks the package; bake it in with nemo agents package --pyproject (uv pip install .), then deploy --mode docker/k8s --image (--publish --registry for k8s). Replaces the misleading local 'uv pip install + bare deploy' instruction and the agent.yaml comment. Addresses review P1 (deployed agent could not start its MCP server under container modes). Signed-off-by: Nathan Walston <nwalston@nvidia.com>
1 parent 4a9bc7f commit f6f054b

2 files changed

Lines changed: 47 additions & 10 deletions

File tree

plugins/nemo-agents/examples/email-phishing-fabric/README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,57 @@ orchestrator (deepagents) ── delegates ──▶ phishing-analyzer subagen
4141

4242
## Run
4343

44-
`extract_iocs` must be importable in the deploy venv, so install this example
45-
first (its console script is referenced by `agent.yaml`):
44+
`extract_iocs` runs as a **stdio MCP server that Fabric launches as a parallel
45+
child process** of the agent: the deepagents adapter expands and `shlex`-splits
46+
the `url`, then spawns it, resolving the command on `PATH`. So the console
47+
script must exist in the environment the agent actually runs in — which differs
48+
by deployment mode. (deepagents adapter + `NVIDIA_API_KEY` required either way.)
4649

47-
```bash
48-
uv pip install plugins/nemo-agents/examples/email-phishing-fabric
49-
```
50+
### Local (`--mode subprocess`, the default)
5051

51-
Then create / deploy / invoke (deepagents adapter + `NVIDIA_API_KEY` required):
52+
This example is a uv workspace member, so `uv sync --all-packages` already
53+
installed `email-phishing-iocs-mcp` into the repo `.venv`. The subprocess
54+
deployment runs from that same venv (`sys.executable`) and inherits its `PATH`,
55+
so Fabric can spawn the tool — no extra install and no image needed:
5256

5357
```bash
5458
nemo agents create --name email-phishing-fabric \
5559
--agent-config plugins/nemo-agents/examples/email-phishing-fabric/agent.yaml
5660
nemo agents deploy --agent email-phishing-fabric --name email-phishing-fabric-deployment
5761
nemo agents invoke --agent-deployment email-phishing-fabric-deployment \
58-
--input "From: it-support@paypa1-secure.example\nSubject: Verify your account\n\nYour account is locked. Confirm your password at http://paypa1-secure.example/login"
62+
--input "From: it-support@paypa1-secure.example
63+
Subject: Verify your account
64+
65+
Your account is locked. Confirm your password at http://paypa1-secure.example/login"
66+
```
67+
68+
### Container (`--mode docker` / `k8s`)
69+
70+
A deployment container does **not** have this example installed, so a local
71+
`uv pip install` cannot reach it. Bake the package into an image with
72+
`nemo agents package` — project mode (`--pyproject`) runs `uv pip install .`,
73+
which provides the `email-phishing-iocs-mcp` console script — then deploy that
74+
image:
75+
76+
```bash
77+
nemo agents package \
78+
--agent plugins/nemo-agents/examples/email-phishing-fabric/agent.yaml \
79+
--pyproject plugins/nemo-agents/examples/email-phishing-fabric/pyproject.toml \
80+
--tag email-phishing-fabric:local
81+
82+
nemo agents create --name email-phishing-fabric \
83+
--agent-config plugins/nemo-agents/examples/email-phishing-fabric/agent.yaml
84+
nemo agents deploy \
85+
--agent email-phishing-fabric \
86+
--name email-phishing-fabric-deployment \
87+
--mode docker \
88+
--image email-phishing-fabric:local
5989
```
6090

91+
For Kubernetes, publish the image
92+
(`nemo agents package ... --publish --registry <registry>`) and pass the
93+
published image to `nemo agents deploy --mode k8s --image <image>`.
94+
6195
Evaluate against the sender-inclusive dataset:
6296

6397
```bash

plugins/nemo-agents/examples/email-phishing-fabric/agent.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ skills:
6666
paths: []
6767

6868
# extract_iocs is shipped by this example's package as the console script
69-
# `email-phishing-iocs-mcp` (see pyproject.toml). `uv pip install .` places it on
70-
# the deploy venv PATH; Fabric launches it as a stdio MCP server and exposes its
71-
# tool to the deepagents orchestrator and subagent.
69+
# `email-phishing-iocs-mcp` (see pyproject.toml). Fabric launches it as a stdio
70+
# MCP server — a parallel child process — resolving this command on PATH. It is
71+
# on PATH for local `--mode subprocess` runs (installed into .venv by
72+
# `uv sync --all-packages` as a workspace member) and baked into the image by
73+
# `nemo agents package` for `--mode docker`/`k8s` deploys. Fabric then exposes
74+
# its tool to the deepagents orchestrator and subagent.
7275
mcp:
7376
servers:
7477
iocs:

0 commit comments

Comments
 (0)