Skip to main content

Python SDK Overview

The Custodian Labs Python SDK helps developers build and deploy conversational AI custodians in their applications.

Use it to configure a Custodian, add examples or knowledge files, deploy it as a reusable app, and continue multi-turn conversations.

When to Use the SDK

Your goalRecommended path
Build a conversational Custodian with custom instructions, knowledge files, and chat sessionsUse the Python SDK
Transform sensitive text or files directly in your applicationUse the Guardian Layer API
Try privacy data transformation before integrating it into your applicationUse the Dashboard

If your application only needs direct de-identification, start with the Guardian Layer Overview instead.

Core Concepts at a Glance

ConceptWhat it means
CustodianStores your model, instructions, examples, and optional knowledge files.
AppA deployed Custodian that can receive chat messages.
CustodianSquadA deployed group of specialized Custodians that can route or pipeline messages.
Data sourceA file used to provide relevant context through RAG.
Chat sessionA conversation that retains context across multiple messages.

The basic lifecycle is:

Configure a Custodian → deploy it as an App → start a Chat Session

The following pages explain each step in more detail.

Next Steps

  1. Install the Python SDK
  2. Authenticate with Your API Key
  3. Create Your First Custodian
  4. Add Data Sources and RAG
  5. Build a Custodian Squad