nvcf / examples
AGENTS.md261 starsChanged 9 days agoApache-2.0View on GitHub
Guide for AI agents working inside examples/. Runnable NVCF sample containers, Helm charts, and load tests. Top-level groups: Local development tooling for self-hosted NVCF lives in tools/ncp-local-cluster/, not under examples/. Per-example README.md files hold the run instructions. Read them before modifying a sample. Each example is self-contained. Common flows: Smoke-test with curl. See each sample's README.md for endpoint paths and payloads. The container should write progress JSON to ${NVCT_PROGRESS_FILE_PATH} or ${NVCT_RESULTS_DIR}/progress. See each sample's README.md for task-specific environment variables. Multi-node…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-tooling/AGENTS.mdAGENTS.md
- deploy/helm/cassandra/AGENTS.mdAGENTS.md
- deploy/helm/cert-manager/AGENTS.mdAGENTS.md
- deploy/helm/cloud-functions/AGENTS.mdAGENTS.md
- deploy/helm/cloud-tasks/AGENTS.mdAGENTS.md
- deploy/helm/encrypted-secret-store/AGENTS.mdAGENTS.md
- deploy/helm/icms/AGENTS.mdAGENTS.md
- deploy/helm/llm-request-router/AGENTS.mdAGENTS.md
- deploy/helm/nats/AGENTS.mdAGENTS.md
- deploy/helm/notary/AGENTS.mdAGENTS.md
- deploy/helm/nvcf-pki/AGENTS.mdAGENTS.md
- deploy/helm/openbao/AGENTS.mdAGENTS.md
- deploy/helm/vanity-gateway/AGENTS.mdAGENTS.md
- deploy/releases/AGENTS.mdAGENTS.md
- deploy/stacks/AGENTS.mdAGENTS.md
- deploy/stacks/observability/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/benchmark/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- docs/overview/samples/scripts/AGENTS.mdAGENTS.md
- infra/cassandra/AGENTS.mdAGENTS.md
- infra/openbao/AGENTS.mdAGENTS.md
- infra/openbao/plugins/vault-plugin-secrets-jwt/AGENTS.mdAGENTS.md
- infra/openbao/tests/AGENTS.mdAGENTS.md
- migrations/cassandra/AGENTS.mdAGENTS.md
- migrations/openbao/AGENTS.mdAGENTS.md
- src/compute-plane-services/byoo-otel-collector/AGENTS.mdAGENTS.md
- src/compute-plane-services/ess-agent/AGENTS.mdAGENTS.md
- src/compute-plane-services/image-credential-helper/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvca/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvsnap/docs/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvstor/AGENTS.mdAGENTS.md
- src/compute-plane-services/request-trace-uploader/AGENTS.mdAGENTS.md
- src/control-plane-services/admin-token-issuer-proxy/AGENTS.mdAGENTS.md
- src/control-plane-services/api-keys/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-functions/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-tasks/AGENTS.mdAGENTS.md
- src/control-plane-services/encrypted-secret-store/AGENTS.mdAGENTS.md
- src/control-plane-services/function-autoscaler/AGENTS.mdAGENTS.md
- src/control-plane-services/function-autoscaler/local_env/AGENTS.mdAGENTS.md
- src/control-plane-services/instance-cluster-management/AGENTS.mdAGENTS.md
- src/control-plane-services/nats-auth-callout/AGENTS.mdAGENTS.md
- src/control-plane-services/notary/AGENTS.mdAGENTS.md
- src/invocation-plane-services/grpc-proxy/AGENTS.mdAGENTS.md
- src/invocation-plane-services/http-invocation/AGENTS.mdAGENTS.md
- src/invocation-plane-services/llm-api-gateway/AGENTS.mdAGENTS.md
- src/invocation-plane-services/ratelimiter/AGENTS.mdAGENTS.md
- src/invocation-plane-services/vanity-gateway/AGENTS.mdAGENTS.md
- src/libraries/go/lib/AGENTS.mdAGENTS.md
- src/libraries/go/worker/AGENTS.mdAGENTS.md
- src/libraries/java/nv-boot-parent/AGENTS.mdAGENTS.md
- src/libraries/python/nv-cloud-function-helpers/AGENTS.mdAGENTS.md
- src/libraries/rust/nvcf-info/AGENTS.mdAGENTS.md
- src/libraries/rust/stargate/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/helm/AGENTS.mdAGENTS.md
- tests/bdd/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- tools/docs-version-sync/AGENTS.mdAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 99
No Markdown bold, no emojis, no em-dash (U+2014), ASCII only.
- Distinctive: line 103
Do not introduce new frameworks or dependencies that are not already in use by a neighbouring sample.
- Distinctive: line 110
Run its documented smoke test.
- Distinctive: line 113
If a change does not lend itself to an automated test (docs only, configuration-only tuning), say so in the MR.
- Distinctive: line 118
Write a README.md describing what the sample does, its prerequisites, and how to run it.
- Distinctive: line 119
Add SPDX headers to every source file.
- Very specific: line 120
Update the top-level examples/README.md table for the new sample.
- Very specific: line 121
If the sample produces images that must ship, reference the public-facing registry path (nvcr.io/...
- Very specific: line 125
Follow the repo root AGENTS.md conventions: Conventional Commits v1.0.0, DCO sign-off (git commit -s), and structured MR description.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md - examples/
Guide for AI agents working inside examples/.
What lives here
Runnable NVCF sample containers, Helm charts, and load tests.
Top-level groups:
function-samples/: long-running services (FastAPI echo, streaming, multi-endpoint, gRPC echo, secrets, vLLM with OTLP, BYOO telemetry with a reference sink, load tester).function-samples/helmchart-samples/: Helm charts that wrap the FastAPI and multi-node samples.task-samples/: one-shot NVCT task containers and Helm charts (simple, BYOO, Helm, multi-node).load-tests/: k6 scripts forfunctions/(HTTP, gRPC, SSE, streaming) andtasks/(health, create, list tasks/events/results).cluster-monitoring-sample/: Prometheus ServiceMonitor and OTEL collector configs for NVCA.
Local development tooling for self-hosted NVCF lives in tools/ncp-local-cluster/, not under examples/.
Per-example README.md files hold the run instructions. Read them before modifying a sample.
Building and running
Each example is self-contained. Common flows:
Python / FastAPI / gRPC containers
cd examples/function-samples/<sample>
docker build -t <sample> .
docker run --rm -p 8000:8000 <sample>Smoke-test with curl. See each sample's README.md for endpoint paths and payloads.
Python task containers
cd examples/task-samples/<sample>
docker build -t <sample> .
docker run --rm -v ${PWD}:/tmp/output -e NVCT_RESULTS_DIR=/tmp/output <sample>The container should write progress JSON to ${NVCT_PROGRESS_FILE_PATH} or
${NVCT_RESULTS_DIR}/progress. See each sample's README.md for task-specific
environment variables.
Helm charts
cd examples/function-samples/helmchart-samples/<chart>
helm lint <chart-subdir>
helm install <release> <chart-subdir> -f <override>.yamlMulti-node helm charts use override.yaml for cluster-specific tuning; keep example overrides generic and parameter-driven.
Go binaries (load tester)
cd examples/function-samples/load-tester-supreme/http-server
go build ./...Stay on Go versions listed in each go.mod. Do not tie load-tester build configuration to the monorepo-wide Go toolchain; these run out-of-tree.
function-samples/openai-compatible-sample and
function-samples/byoo-telemetry-sample are the exceptions: each has a
hand-written http-server/BUILD.bazel, and the OpenAI-compatible sample is a
registered release subproject whose release image is built from it. examples/
is excluded from Gazelle, so update that file's srcs when you add or rename a
Go file, then run:
bazel build //examples/function-samples/<sample>/http-server:image_index
bazel test //examples/function-samples/<sample>/http-server:http-server_testk6 load tests
cd examples/load-tests
k6 run functions/<test>.js
k6 run tasks/<test>.jsk6 scripts accept endpoint URLs and keys through environment variables. Do not hardcode NGC keys, auth tokens, or customer-facing endpoints. Every test must read credentials from env.
NVCT task samples
cd examples/task-samples/<sample>
docker build -t <sample> .Each task sample README documents the self-hosted NVCT launch flow (registry credentials, API key, and POST /v2/orgs/<org>/nvct/tasks). Helm variants package a chart and reference it by OCI URL on task submission.
Code style
- No Markdown bold, no emojis, no em-dash (U+2014), ASCII only. See
.cursor/skills/documentation-style/SKILL.md. - Python: format with the conventions in each sample; no repo-wide linter is wired up to
examples/. - Shell:
set -euo pipefailat the top of every script; preferbashexplicitly when using bashisms. - YAML: 2-space indent; quote values only when needed.
- Do not introduce new frameworks or dependencies that are not already in use by a neighbouring sample.
Tests
Each sample is its own unit. There is no shared test runner for examples/. When changing a sample:
- Rebuild its container or chart.
- Run its documented smoke test.
- Note the verification you ran in the MR
## Testingsection.
If a change does not lend itself to an automated test (docs only, configuration-only tuning), say so in the MR.
Adding a new example
- Pick a directory under the matching group (
function-samples/,task-samples/, etc.) or create a new group if none fits. - Write a
README.mddescribing what the sample does, its prerequisites, and how to run it. - Add SPDX headers to every source file.
- Update the top-level
examples/README.mdtable for the new sample. - If the sample produces images that must ship, reference the public-facing registry path (
nvcr.io/...with a public org) and keep secrets out of repo.
Commits and MRs
Follow the repo root AGENTS.md conventions: Conventional Commits v1.0.0, DCO sign-off (git commit -s), and structured MR description. Scope commits to (examples) or a sub-path when a single sample changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

