Back to Events
Building Safe AI Agents with Guardrails
Past

Building Safe AI Agents with Guardrails

January 6, 2026, 01:00 Europe/Berlin
Alexey Grigorev

Continue with the workshop writeup

Open the canonical pages, recording, materials, and code repo.

View workshop writeup

We start with a DataTalks.Club Data Engineering Zoomcamp FAQ assistant. Then we add checks that keep the agent on topic and block unsafe responses. The checks also show how to cancel wasted work when a guardrail fails. We first use the OpenAI Agents SDK for its built-in guardrails. Then we rebuild the same idea with tools and plain asyncio, so it works with other agent frameworks.

Links

The external resources:

The notebook you will build

By the end, you wrap a tool-using FAQ agent in guardrails:

flowchart LR USER["User question"] INPUT["Input topic guardrail"] FAQ["FAQ assistant agent"] SEARCH["search_faq tool minsearch index"] OUTPUT["Output safety guardrail"] ANSWER["User-facing answer"] OPENAI["OpenAI model calls"] USER --> INPUT INPUT -->|passes| FAQ INPUT -->|trips| ANSWER FAQ --> SEARCH FAQ --> OPENAI INPUT --> OPENAI OUTPUT --> OPENAI FAQ --> OUTPUT OUTPUT -->|passes| ANSWER OUTPUT -->|trips| ANSWER

The base agent can already search the FAQ, but it tries to answer unrelated questions too. The input guardrail blocks questions outside the course domain. The output guardrail checks the agent response for policy problems. Examples are promising deadline extensions or writing homework for a student.

In the later parts we show the same checks as tools. We also build a small async runner that can cancel work when a guardrail trips.

Hosted by

Alexey Grigorev

Alexey Grigorev

Chief Agent Officer at AI Shipping Labs

Software engineer and machine learning practitioner with 15+ years of experience building production ML systems. I focus on practical, production-grade ML and AI systems, from early prototypes to reliable systems in production.

I'm the founder of DataTalks.Club, a free community that connects tens of thousands of practitioners worldwide, and the creator of the Zoomcamp series, free, code-first programs that have reached 100,000+ learners globally.

At AI Shipping Labs, I'm building the kind of environment that would have accelerated my own career growth. After years of teaching at scale, I wanted something more focused: a space for action-oriented builders who want to turn AI ideas into real projects. The community gives members the structure, accountability, and peer support to ship practical AI products consistently, even alongside their main jobs.

alexey@aishippinglabs.com

Feedback