Skip to content

confident-ai/confident-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confident AI SDKs

Official SDKs for the Confident AI platform management API — programmatically manage organizations, projects, API keys, members, invitations, roles, and policies.

Language Package Location
Python confidentai python/
TypeScript confidentai typescript/

Evaluations, traces, datasets, prompts? Those are project-key-scoped and live in deepeval (Python) and deepeval (TypeScript). These SDKs focus on platform administration.

Design

Both SDKs share one ergonomic surface:

# Python
from confidentai import ConfidentAI

client = ConfidentAI(api_key="confident_org_...")
organization = client.organization().get()    # -> Organization
project = client.project("project_id").get()   # -> Project
projects = client.projects.list()              # -> list[Project]
// TypeScript
import { ConfidentAI } from "confidentai";

const client = new ConfidentAI({ apiKey: "confident_org_..." });
const organization = await client.organization().get();   // -> Organization
const project = await client.project("project_id").get();  // -> Project
const projects = await client.projects.list();             // -> Project[]

Scoped clients expose resources with consistent list / get / create / update / delete methods (plus action methods like invitations.create, apiKeys.create, members.updateRole):

client.organization().members.list()
client.organization().roles.create("Analyst", policy_ids=[...])
client.project("id").api_keys.create(name="agent key")

Authentication

These endpoints require an organization API key, supplied via the api_key/apiKey argument or the CONFIDENT_ORG_API_KEY environment variable. (It is intentionally not CONFIDENT_API_KEY, which deepeval already uses for a project key — the distinct name lets both SDKs coexist.) The base URL resolves from CONFIDENT_BASE_URL or CONFIDENT_REGION (US / EU), defaulting to https://api.confident-ai.com.

Conventions

  • Python mirrors deepeval: Poetry, requests, Pydantic v2, the CONFIDENT_API_KEY header, the { success, data } response envelope, and pytest.
  • TypeScript mirrors deepeval.ts: tsc build, axios, interface-based types, and Jest with jest.mock("axios").

Development

# Python
cd python && poetry install && poetry run pytest

# TypeScript
cd typescript && npm install && npm test && npm run build

See python/ROUTES.md for the full endpoint → method map.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors