Project Management with Admin SDK
Create, read, update, and delete projects in your organization.
Overview
Projects are isolated workspaces for your datasets, prompts, traces, and evaluations. With the Admin SDK you can create, update, and delete projects programmatically. This supports project-per-agent, project-per-environment, and project-per-customer organization models.
List Projects
You can list every project in your organization.
from confidentai import ConfidentAI
client = ConfidentAI()
projects = client.projects.list()
for project in projects:
print(project.id, project.name)import { ConfidentAI } from "confidentai";
const client = new ConfidentAI();
const projects = await client.projects.list();
projects.forEach((project) => console.log(project.id, project.name));Create a Project
You can create a new project with just a name, while the description is optional. Creating a project also generates its first project API key, so the call returns both the project and that api_key (whose full secret is only available here).
created = client.projects.create(
name="Customer Support Bot",
description="Production support assistant",
)
print(created.project.id) # e.g. "clq9z3x1k0001la08f7t3g5p2"
print(created.api_key.value) # e.g. "confident_us_proj_...", shown only onceconst created = await client.projects.create({
name: "Customer Support Bot",
description: "Production support assistant",
});
console.log(created.project.id); // e.g. "clq9z3x1k0001la08f7t3g5p2"
console.log(created.apiKey?.value); // e.g. "confident_us_proj_..."Get a Project
You can retrieve a single project by its project_id.
project = client.project("clq9z3x1k0001la08f7t3g5p2")
project.get()const project = client.project("clq9z3x1k0001la08f7t3g5p2");
await project.get();Update a Project
You can update a project's name, description, or both, and only the fields you pass are changed.
project = client.project("clq9z3x1k0001la08f7t3g5p2")
project.update(name="Support Bot (v2)")const project = client.project("clq9z3x1k0001la08f7t3g5p2");
await project.update({ name: "Support Bot (v2)" });Delete a Project
You can permanently delete a project from your organization.
project = client.project("clq9z3x1k0001la08f7t3g5p2")
project.delete()const project = client.project("clq9z3x1k0001la08f7t3g5p2");
await project.delete();Next Steps
After projects are configured, manage access and keys:
Members & Invitations
Add users to projects and assign roles.
API Keys
Provision project-scoped API keys.
Last updated on