Skip to main content
This example demonstrates how to build agentic applications with NeMo Guardrails, enabling autonomous AI agents to take actions while maintaining safety and control boundaries.

Overview

Agentic applications allow AI to:
  • Take autonomous actions (API calls, database operations, tool usage)
  • Make decisions based on context and goals
  • Chain multiple steps to accomplish complex tasks
  • Operate within safety boundaries defined by guardrails

Basic Agent with Guardrails

1

Configure the agent

2

Define agent flows

3

Implement action safety checking

4

Define agent actions

Multi-Step Agent Workflow

Create agents that chain multiple actions:

Agent with Tool Selection

Let the agent choose appropriate tools:

Usage Examples

Example Conversations

1

Safe multi-step task

2

Blocked dangerous action

3

Invalid parameters detected

4

Research workflow

Safety Best Practices for Agents

  1. Whitelist Actions - Explicitly define allowed actions; default deny
  2. Validate Inputs - Check all parameters before execution
  3. Log Everything - Maintain audit trail of all actions
  4. Require Confirmation - Ask for user confirmation on critical actions
  5. Implement Rollback - Allow undoing actions when possible
  6. Rate Limiting - Prevent abuse through action throttling
  7. Sandbox Testing - Test agents in isolated environments first

Advanced: Agent with Human-in-the-Loop

Monitoring and Observability

Track agent behavior: