Login
Get Started

Configuring Your First Guardian

Estimated reading: 1 minute 6 views

Configuring Your First Guardian
In this guide, you will configure your first Carlo Guardian to monitor and enforce ethical AI policies.

What is a Guardian?

A Guardian acts as a protection layer between your application and AI models.
It analyzes prompts and responses to ensure they comply with governance policies.

Step 1: Import the Carlo SDK

import carlo

Step 2: Create a Guardian Instance

Initialize a new Guardian using your API key.

guardian = carlo.Guardian(
api_key=”YOUR_API_KEY”
)

Step 3: Attach Your AI Provider

Connect your AI model provider.

guardian.connect_provider(
provider=”openai”,
model=”gpt-4″
)

Step 4: Activate Monitoring

Enable governance monitoring for all requests.
guardian.enable_monitoring()

Your Guardian is now protecting your AI system.
Next Step

Now that your Guardian is configured, the next step is to **connect Carlo with your AI framework**.
Continue to:
Connecting to LangChain

Leave a Comment

Share this Doc

Configuring Your First Guardian

Or copy link

CONTENTS
Need Help? Chat with us
Compliance Intake

Talk to Compliance Support

Share a few details so we can route you to the right compliance expert.

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.