Build a Demo Agent Workflow Using Cursor Rules for NVIDIA NeMo Agent Toolkit#
Learn how to use Cursor rules for NeMo Agent toolkit development to create and run a demo agent workflow.
About Cursor Rules#
Cursor rules in NeMo Agent toolkit act as an intelligent development that offers structured assistance for developers at all experience levels. The key functionalities of Cursor rules are as follows:
Streamline workflow creation with intelligent prompts: You can build complete agent workflows, integrate functions, and configure tools through natural language commands. It allows you to transform complex development tasks into simple conversational interactions.
Accelerate development workflows: You can use Cursor rules to develop NeMo Agent toolkit efficiently and consistently as it provides streamlined workflows with established and tested patterns. It also enhances productivity by minimizing routine tasks, while applying best practices for coding, documentation, and configuration.
Learn and understand NeMo Agent toolkit quickly and simply: For less experienced developers, Cursor rules provide an interactive approach to mastering NeMo Agent toolkit through contextual assistance and comprehensive examples for typical development workflows.
Standardization: Ensures uniform development standards, such as formatting, type annotations, and documentation requirements, across development teams and projects. Thus, decreasing code review overhead during submissions.
Common Prompts#
Note
For optimal Cursor rules experience, avoid using the Auto
mode for LLM model selection. Instead, manually choose a model from the selection menu, such as claude-4-sonnet
.
The following are frequently used prompts to begin development:
Installing NeMo Agent Toolkit:
Install NeMo Agent toolkit with all dependencies and verify the installation is working correctly.
Environment setup:
Help me set up NeMo Agent toolkit development environment with all required dependencies and configurations.
Workflow creation:
Create a workflow named demo_workflow in examples directory with description "Demo workflow for testing features".
Function integration:
Add a text processing function to my workflow that splits text into sentences and counts words.
Running and serving workflows:
Run my workflow locally for testing and then serve it as an API endpoint on port 8080.
For complete documentation with all available rules, prompts, and examples, refer to the Cursor Rules Reference.
Building a Demo Agent with Cursor Rules#
Follow the steps below for a comprehensive example that demonstrates creating and running a functional agent workflow using Cursor rules:
Install NeMo Agent Toolkit#
Before you begin, make sure you have cloned the NeMo Agent toolkit repository and opened the project in Cursor, by selecting File > Open Workspace from File... > select the nat.code-workspace in the repository
.
Prompt:
Install NeMo Agent toolkit with all required dependencies and verify the installation
The assistant will reference and apply the toolkit-installation rule to validate prerequisites and install the toolkit, followed by installation verification.

Explore Available Tools#
Prompt:
Find datetime-related functions and tools available in NeMo Agent toolkit
The assistant will reference and apply the info rule to discover available tools and functions.

Create the Workflow#
Prompt:
Create a new workflow named `demo_workflow` in the examples folder
The assistant will reference and apply the general rule to generate a new workflow using the nat workflow create
command.

Configure the DateTime Function#
Prompt:
Add the current_datetime function to the demo_workflow
The assistant will reference and apply the add-functions rule to integrate the function into the workflow.

Integrate the ReAct Agent#
Prompt:
Integrate ReAct agent to the workflow
The assistant will reference and apply the general rule to integrate a ReAct agent within the workflow.

Run the Workflow#
Prompt:
Run the demo_workflow
The assistant will reference and apply the run-serve rule to run the workflow.

Congratulations! You have successfully created a functional demo workflow using Cursor rules with minimal manual coding!
Note
Keep your prompts specific and concise. For instance, rather than stating “Create a workflow”, specify “Create a workflow named demo_workflow
in examples directory with description Demo workflow for testing features
”.
Cursor Rules Organization#
NeMo Agent toolkit offers a comprehensive collection of Cursor rules organized into four primary categories:
Foundation Rules: Core code quality standards and cursor rules management
Setup and Installation Rules: Environment configuration and toolkit installation procedures
CLI Command Rules: Complete CLI operations and command handling
Workflow Development Rules: Function and tool development for workflow creation
For a comprehensive overview of all supported tasks, including detailed prompts, examples, and capabilities for each rule, refer to the Cursor Rules Reference.