NeMo Guardrailsnemoguardrails 0.24.1 · Python 3.10+
Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
37 small wins to finish your pathNext lesson →

Installation and setup

Installation and setup is the step that puts the nemoguardrails package in your Python environment and a free Groq API key in your shell, which is everything this course needs to run.

Last updated: 30 Sep, 2026 · NeMo Guardrails 0.24.1

NeMo Guardrails does not ship a model. It calls one over HTTP, so you need a key for a hosted model. Groq's free plan runs openai/gpt-oss-120b, and every example in this course uses it.

Installing nemoguardrails

pip install "nemoguardrails==0.24.1"

The package brings the runtime, the Colang parser and a command line. It also installs FastEmbed, the library behind its default embedding model; this course configures a different search in the Embedding model lesson, so no model weights are downloaded.

Getting a Groq API key

Getting a Groq API key · from The Complete AI Security Course In 8 Hours · 58:05 to 60:17

As in the clip: sign in at console.groq.com/keys, create an API key and copy it. The free plan needs no card. It has a daily token limit per key, which is plenty for this course.

The video's demo app asks for two keys, a main one and a backup, and says the same key works in both places. The code in this course reads one variable, GROQ_API_KEY.

export GROQ_API_KEY=gsk_...

Checking the install

Example
from importlib.metadata import version
import os

print(version("nemoguardrails"))
print("GROQ_API_KEY" in os.environ)

The first line is the installed version. True means the key is set in the shell that runs Python. A False here is the reason for most first-run errors, and the Main model and API key lesson shows the error it causes.

Keys this course uses

KeyNeeded forWhere to get it
GROQ_API_KEYEvery lessonconsole.groq.com/keys, free
LOGFIRE_TOKEN (optional)Sending traces to a dashboard, in Tracing with Logfirelogfire.pydantic.dev, free plan

Where you install it

  • In a fresh virtual environment or a Colab notebook, one per project.
  • Next to an existing application, when the rails will sit in front of a chatbot or a RAG pipeline you already have.
Watch out. Groq retires models. llama-3.3-70b-versatile and llama-3.1-8b-instant, which the video's notebook used, are no longer on the free plan; a config that names them fails with a model error. This course uses openai/gpt-oss-120b.
Try it yourself
  • Run the check in a new terminal where you have not exported the key, and read the second line.
  • Run nemoguardrails --help and find the chat command.

Little by little, you're building something great.