Skip to main content
TL;DR: Wrap a Groq Agent in a small class that runs dome.async_guard_input before the model and dome.async_guard_output after it, then evaluate the unprotected and protected versions to measure the difference.
This tutorial builds a news Agent on Groq’s serverless inference, evaluates it with Vijil, and protects it with Dome. The full runnable code is in the GroqAgents tutorial folder.

Prerequisites

Free-plan Vijil users also need an Ngrok authtoken (NGROK_AUTHTOKEN).

Walkthrough

1

Build the Agent

The base Agent calls Groq’s OpenAI-compatible endpoint and uses Tavily for web search:
2

Add Dome Protection

Wrap the Agent so inputs and outputs pass through Dome. Guard the input first, short-circuit if it is flagged, then guard the model output:
3

Evaluate Both Versions

Register each Agent with the Vijil SDK and run the security harness. See the Evaluate SDK guide for the full evaluation flow. The tutorial script runs the unprotected Agent by default and the protected Agent with a flag:
Compare the two Trust Scores to see how much Dome improves the Agent’s security posture.

Troubleshooting

Ngrok is safe; traffic reaching your Agent comes only from Vijil’s systems.
If you hit rate limits, lower the request frequency or upgrade your Groq and Tavily accounts.

Next Steps

Autotuned Guardrails

Generate a configuration from the evaluation

Protection Overview

How Dome guards inputs and outputs
Last modified on July 16, 2026