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
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
from importlib.metadata import version
import os
print(version("nemoguardrails"))
print("GROQ_API_KEY" in os.environ)0.24.1 True
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
| Key | Needed for | Where to get it |
|---|---|---|
GROQ_API_KEY | Every lesson | console.groq.com/keys, free |
LOGFIRE_TOKEN (optional) | Sending traces to a dashboard, in Tracing with Logfire | logfire.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.
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.Related
- Previous: NeMo Guardrails overview
- Next: An assistant that answers anything
- Reference: Installation guide
- Run the check in a new terminal where you have not exported the key, and read the second line.
- Run
nemoguardrails --helpand find thechatcommand.
Little by little, you're building something great.