agentleFS
NVIDIAKnown publisherNVIDIA/NeMo-Agent-Toolkit/.cursor/rules/nat-tests/nat-test-llm.mdc

NeMo-Agent-Toolkit / nat-tests

Cursor rule2.7k starsChanged 16 months agoApache-2.0View on GitHub

Follow these rules when the user's request involves using NAT test LLM (nat_test_llm) to simulate deterministic responses in workflows or tests

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 4 mentionsMay 2026: 2 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/NeMo-Agent-Toolkit repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about NVIDIA/NeMo-Agent-Toolkit

The biggest 5 of 15 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 15

Talked about on GitHub (15 times).

On GitHub · 15

10 more on GitHub

The file

We split this nat-test-llm.mdc into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use _type: nat_test_llm in llms to stub responses.

    line 8
  2. Very specific:

    Create TestLLMConfig(response_seq=[...], delay_ms=0), add_llm("main", cfg), then get_llm("main", …

    line 24
  3. Very specific:

    Ensure nat.test.llm is importable (install the nvidia-nat-test package from packages/ or import nat.test.llm once).

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
nat-test-llm.mdc
---
description: Follow these rules when the user's request involves using NAT test LLM (nat_test_llm) to simulate deterministic responses in workflows or tests
globs:
alwaysApply: false
---
# Test LLM (nat_test_llm)

- Use `_type: nat_test_llm` in `llms` to stub responses.
- Fields:
  - `response_seq`: list of strings; cycles per call; `[]` returns empty string.
  - `delay_ms`: per-call artificial latency in milliseconds.
- YAML example:
    ```yaml
    llms:
    main:
        _type: nat_test_llm
        response_seq: [alpha, 2, "gamma"]
        delay_ms: 0
    workflow:
    _type: chat_completion
    llm_name: main
    ```
- Programmatic (builder):
  - Create `TestLLMConfig(response_seq=[...], delay_ms=0)`, `add_llm("main", cfg)`, then `get_llm("main", wrapper_type=<LANGCHAIN|LLAMA_INDEX|CREWAI|SEMANTIC_KERNEL|AGNO>)` and call the wrapper’s method (`ainvoke`, `achat`, `call`, etc.).
  - Python example:
    ```python
    from nat.test.llm import TestLLMConfig
    from nat.builder.workflow_builder import WorkflowBuilder
    from nat.builder.framework_enum import LLMFrameworkEnum

    async def main():
        async with WorkflowBuilder() as builder:
            # 1) Add the test LLM with a deterministic cycle of responses
            await builder.add_llm(
                "main",
                TestLLMConfig(response_seq=["alpha", "beta", "gamma"], delay_ms=0),
            )
            # 2) Get a wrapper for the framework and call the test LLM
            llm = await builder.get_llm("main", wrapper_type=LLMFrameworkEnum.LANGCHAIN)
            print(await llm.ainvoke("hello"))  # alpha
            print(llm.invoke("world"))         # beta
    ```
- Registration:
  - Ensure `nat.test.llm` is importable (install the `nvidia-nat-test` package from `packages/` or import `nat.test.llm` once).
- Notes:
  - The `response_seq` cycle persists within a loaded workflow instance and resets on reload.
  - Returns plain strings; no NAT retry/thinking patches applied.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.