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 goal | Recommended path |
|---|---|
| Build a conversational Custodian with custom instructions, knowledge files, and chat sessions | Use the Python SDK |
| Transform sensitive text or files directly in your application | Use the Guardian Layer API |
| Try privacy data transformation before integrating it into your application | Use the Dashboard |
If your application only needs direct de-identification, start with the Guardian Layer Overview instead.
Core Concepts at a Glance
| Concept | What it means |
|---|---|
Custodian | Stores your model, instructions, examples, and optional knowledge files. |
App | A deployed Custodian that can receive chat messages. |
CustodianSquad | A deployed group of specialized Custodians that can route or pipeline messages. |
| Data source | A file used to provide relevant context through RAG. |
| Chat session | A 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.