Governance Projects
Overview
The Confident AI SDK exposes every Governance Project method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
List Governance Projects
Lists every project in your organization with its governance standing, ordered by project name, alongside an organization-wide roll-up of how many projects fall into each status. Projects enrolled in no governance policy are included, with a status of not_enrolled and a null health, since the inventory is what tells you which projects are ungoverned.
from confident_ai import ConfidentAI
from confident_ai.organization import GovernanceProjectStatus
client = ConfidentAI()
result = client.organization.list_governance_projects(
status=GovernanceProjectStatus.HEALTHY,
page=1,
page_size=25,
)For async mode, call a_list_governance_projects and await it as shown below:
result = await client.organization.a_list_governance_projects(...)Parameters
| Parameter | Type | Description |
|---|---|---|
status | Optional[GovernanceProjectStatus] | Only return projects with this status. The governanceProjectPortfolio roll-up always covers the whole organization and is not narrowed by this filter. See GovernanceProjectStatus. |
page | Optional[int] | The page to return. Defaults to 1. |
page_size | Optional[int] | The number of projects per page, at most 100. Defaults to 25. |
import { ConfidentAI } from "confident-ai";
import { GovernanceProjectStatus } from "confident-ai/organization";
const client = new ConfidentAI();
const result = await client.organization.listGovernanceProjects(
{ status: GovernanceProjectStatus.HEALTHY, page: 1, pageSize: 25 },
);Parameters
| Parameter | Type | Description |
|---|---|---|
status | GovernanceProjectStatus | Only return projects with this status. The governanceProjectPortfolio roll-up always covers the whole organization and is not narrowed by this filter. See GovernanceProjectStatus. |
page | number | The page to return. Defaults to 1. |
pageSize | number | The number of projects per page, at most 100. Defaults to 25. |
Returns
This method returns an object of type GovernanceProjectList.
Get Governance Project
Retrieves one project's governance view in full: every control its policy applies, inherited ones included, together with its recent verdict history. A project enrolled in no policy is reported as not found, so use the inventory listing to tell an ungoverned project from one that does not exist.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.organization.get_governance_project(
project_id="<PROJECT-ID>",
)For async mode, call a_get_governance_project and await it as shown below:
result = await client.organization.a_get_governance_project(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.organization.getGovernanceProject(
"<PROJECT-ID>",
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project. |
Returns
This method returns an object of type GovernanceProject.
Types
GovernanceControlStatus
The verdict of assessing one governance control against a project or organization.
class GovernanceControlStatus(Enum):
PASS = "PASS"
FAIL = "FAIL"
ERROR = "ERROR"
NO_DATA = "NO_DATA"enum GovernanceControlStatus {
PASS = "PASS",
FAIL = "FAIL",
ERROR = "ERROR",
NO_DATA = "NO_DATA",
}PASS · FAIL · ERROR · NO_DATA
GovernanceControlType
What a governance control checks: RUNTIME watches production behaviour, PRE_DEPLOYMENT_EVALS and PRE_DEPLOYMENT_RED_TEAMING gate a release, and OPERATIONAL covers process rather than the system itself.
class GovernanceControlType(Enum):
RUNTIME = "RUNTIME"
PRE_DEPLOYMENT_EVALS = "PRE_DEPLOYMENT_EVALS"
PRE_DEPLOYMENT_RED_TEAMING = "PRE_DEPLOYMENT_RED_TEAMING"
OPERATIONAL = "OPERATIONAL"enum GovernanceControlType {
RUNTIME = "RUNTIME",
PRE_DEPLOYMENT_EVALS = "PRE_DEPLOYMENT_EVALS",
PRE_DEPLOYMENT_RED_TEAMING = "PRE_DEPLOYMENT_RED_TEAMING",
OPERATIONAL = "OPERATIONAL",
}RUNTIME · PRE_DEPLOYMENT_EVALS · PRE_DEPLOYMENT_RED_TEAMING · OPERATIONAL
GovernanceControlVersionReference
The version of a control's definition an assessment was computed against.
class GovernanceControlVersionReference:
id: str
version: stridstrRequired
The id of the control version, generated by Confident AI.
Example: "<GOVERNANCE-CONTROL-VERSION-ID>"
versionstrRequired
The human-readable label of the control version.
Example: "00.00.02"
interface GovernanceControlVersionReference {
id: string;
version: string;
}idstringRequired
The id of the control version, generated by Confident AI.
Example: "<GOVERNANCE-CONTROL-VERSION-ID>"
versionstringRequired
The human-readable label of the control version.
Example: "00.00.02"
GovernancePolicyAssessment
One recorded verdict: what one version of one governance control found when it was assessed against one project under this policy. Assessments are append-only, so the current standing of a (control, project) pair is its newest assessment.
class GovernancePolicyAssessment:
id: str
governance_control_id: str = Field(alias="governanceControlId")
governance_control_version: GovernanceControlVersionReference = Field(alias="governanceControlVersion")
project_id: str = Field(alias="projectId")
status: GovernanceControlStatus
evidence: Optional[Dict[str, Any]]
error: Optional[str]
created_at: str = Field(alias="createdAt")idstrRequired
The id of the assessment, generated by Confident AI.
Example: "<GOVERNANCE-ASSESSMENT-ID>"
governance_control_idstrRequired
The id of the governance control that was assessed.
Example: "<GOVERNANCE-CONTROL-ID>"
governance_control_versionGovernanceControlVersionReferenceRequired
project_idstrRequired
The id of the project the control was assessed against.
Example: "<PROJECT-ID>"
statusGovernanceControlStatusRequired
evidenceOptional[Dict[str, Any]]Required
The data behind the verdict. Its keys depend on the control's type, and it is null when the assessment produced none.
Example: {"measured":0.94,"threshold":0.9}
errorOptional[str]Required
Why the check itself failed to run, or null when it ran. This is set on an ERROR verdict and says nothing about whether the project complies.
created_atstrRequired
When the assessment was recorded.
Example: "2025-01-15T02:00:00+00:00"
interface GovernancePolicyAssessment {
id: string;
governanceControlId: string;
governanceControlVersion: GovernanceControlVersionReference;
projectId: string;
status: GovernanceControlStatus;
evidence: Record<string, unknown> | null;
error: string | null;
createdAt: string;
}idstringRequired
The id of the assessment, generated by Confident AI.
Example: "<GOVERNANCE-ASSESSMENT-ID>"
governanceControlIdstringRequired
The id of the governance control that was assessed.
Example: "<GOVERNANCE-CONTROL-ID>"
governanceControlVersionGovernanceControlVersionReferenceRequired
projectIdstringRequired
The id of the project the control was assessed against.
Example: "<PROJECT-ID>"
statusGovernanceControlStatusRequired
evidenceRecord<string, unknown> | nullRequired
The data behind the verdict. Its keys depend on the control's type, and it is null when the assessment produced none.
Example: {"measured":0.94,"threshold":0.9}
errorstring | nullRequired
Why the check itself failed to run, or null when it ran. This is set on an ERROR verdict and says nothing about whether the project complies.
createdAtstringRequired
When the assessment was recorded.
Example: "2025-01-15T02:00:00+00:00"
GovernancePolicyReference
A governance policy, named by id.
class GovernancePolicyReference:
id: str
name: stridstrRequired
The id of the governance policy.
Example: "<GOVERNANCE-POLICY-ID>"
namestrRequired
The name of the governance policy.
Example: "EU AI Act readiness"
interface GovernancePolicyReference {
id: string;
name: string;
}idstringRequired
The id of the governance policy.
Example: "<GOVERNANCE-POLICY-ID>"
namestringRequired
The name of the governance policy.
Example: "EU AI Act readiness"
GovernanceProject
A project's governance view in full: the controls its policy applies and the verdict history behind its status. Only an enrolled project has this view — a project belonging to no governance policy has nothing to assess and is reported as not found.
class GovernanceProject:
id: str
name: str
description: Optional[str]
owner: Optional[UserReference]
governance_policy: Optional[GovernancePolicyReference] = Field(alias="governancePolicy")
controls: List[GovernanceProjectControl]
assessments: List[GovernancePolicyAssessment]idstrRequired
The id of the project.
Example: "<PROJECT-ID>"
namestrRequired
The name of the project.
Example: "Customer Support Agent"
descriptionOptional[str]Required
What the project is for, or null when it has no description.
Example: "Front-line support assistant for billing questions."
ownerOptional[UserReference]Required
The organization member who owns the project, or null when nobody holds the owner role on it.
See UserReference.
governance_policyOptional[GovernancePolicyReference]Required
The governance policy this project is enrolled in.
controlsList[GovernanceProjectControl]Required
Every control that applies to this project, including the ones its policy inherits from the policies it extends.
assessmentsList[GovernancePolicyAssessment]Required
The project's verdict history over the last 30 days, newest first. Several assessments of the same control on the same day are collapsed to the last one, so each control appears at most once per day however often it was recomputed.
interface GovernanceProject {
id: string;
name: string;
description: string | null;
owner: UserReference | null;
governancePolicy: GovernancePolicyReference | null;
controls: GovernanceProjectControl[];
assessments: GovernancePolicyAssessment[];
}idstringRequired
The id of the project.
Example: "<PROJECT-ID>"
namestringRequired
The name of the project.
Example: "Customer Support Agent"
descriptionstring | nullRequired
What the project is for, or null when it has no description.
Example: "Front-line support assistant for billing questions."
ownerUserReference | nullRequired
The organization member who owns the project, or null when nobody holds the owner role on it.
See UserReference.
governancePolicyGovernancePolicyReference | nullRequired
The governance policy this project is enrolled in.
controlsGovernanceProjectControl[]Required
Every control that applies to this project, including the ones its policy inherits from the policies it extends.
assessmentsGovernancePolicyAssessment[]Required
The project's verdict history over the last 30 days, newest first. Several assessments of the same control on the same day are collapsed to the last one, so each control appears at most once per day however often it was recomputed.
GovernanceProjectControl
A control that applies to this project through the policy it is enrolled in. The two base-policy fields record where the control comes from: baseGovernancePolicy is present only on a control the project's policy inherits, which is managed on that base policy, while alsoInBaseGovernancePolicy is present when the project's policy attaches the control directly and a base policy holds it too. Verdicts are not folded in here — read them from assessments.
class GovernanceProjectControl:
id: str
name: str
description: Optional[str]
type: GovernanceControlType
current_version: Optional[GovernanceControlVersionReference] = Field(alias="currentVersion")
base_governance_policy: Optional[GovernancePolicyReference] = Field(default=None, alias="baseGovernancePolicy")
also_in_base_governance_policy: Optional[GovernancePolicyReference] = Field(default=None, alias="alsoInBaseGovernancePolicy")idstrRequired
The id of the governance control.
Example: "<GOVERNANCE-CONTROL-ID>"
namestrRequired
The name of the governance control.
Example: "Groundedness above 0.9"
descriptionOptional[str]Required
What the control checks, or null when it has no description.
Example: "Answers must stay grounded in the retrieved context."
typeGovernanceControlTypeRequired
current_versionOptional[GovernanceControlVersionReference]Required
The version of the control's definition an assessment would use now, or null when no version has been snapshotted yet.
base_governance_policyOptional[GovernancePolicyReference]
also_in_base_governance_policyOptional[GovernancePolicyReference]
interface GovernanceProjectControl {
id: string;
name: string;
description: string | null;
type: GovernanceControlType;
currentVersion: GovernanceControlVersionReference | null;
baseGovernancePolicy?: GovernancePolicyReference;
alsoInBaseGovernancePolicy?: GovernancePolicyReference;
}idstringRequired
The id of the governance control.
Example: "<GOVERNANCE-CONTROL-ID>"
namestringRequired
The name of the governance control.
Example: "Groundedness above 0.9"
descriptionstring | nullRequired
What the control checks, or null when it has no description.
Example: "Answers must stay grounded in the retrieved context."
typeGovernanceControlTypeRequired
currentVersionGovernanceControlVersionReference | nullRequired
The version of the control's definition an assessment would use now, or null when no version has been snapshotted yet.
baseGovernancePolicyGovernancePolicyReference
alsoInBaseGovernancePolicyGovernancePolicyReference
GovernanceProjectHealth
The check counts behind a project's governance status. checksRun is the denominator of its pass rate, so a project with controls that have never run reports a checksTotal above its checksRun.
class GovernanceProjectHealth:
checks_total: int = Field(alias="checksTotal")
checks_run: int = Field(alias="checksRun")
checks_failing: int = Field(alias="checksFailing")
streak_days: int = Field(alias="streakDays")
last_assessed_at: Optional[str] = Field(alias="lastAssessedAt")checks_totalintRequired
How many controls apply to this project through its policy.
Example: 6
checks_runintRequired
How many of those controls have produced a counted verdict. A control that is unconfigured, or whose only verdict is NO_DATA, is not counted here.
Example: 5
checks_failingintRequired
How many of those controls have a failing latest verdict.
Example: 1
streak_daysintRequired
How many consecutive days the project has gone with no failing control.
Example: 12
last_assessed_atOptional[str]Required
When this project was most recently assessed, or null when it has never been assessed within the health window.
Example: "2025-01-15T02:00:00+00:00"
interface GovernanceProjectHealth {
checksTotal: number;
checksRun: number;
checksFailing: number;
streakDays: number;
lastAssessedAt: string | null;
}checksTotalnumberRequired
How many controls apply to this project through its policy.
Example: 6
checksRunnumberRequired
How many of those controls have produced a counted verdict. A control that is unconfigured, or whose only verdict is NO_DATA, is not counted here.
Example: 5
checksFailingnumberRequired
How many of those controls have a failing latest verdict.
Example: 1
streakDaysnumberRequired
How many consecutive days the project has gone with no failing control.
Example: 12
lastAssessedAtstring | nullRequired
When this project was most recently assessed, or null when it has never been assessed within the health window.
Example: "2025-01-15T02:00:00+00:00"
GovernanceProjectList
One page of the governance inventory, with the organization-wide roll-up alongside it.
class GovernanceProjectList:
governance_projects: List[GovernanceProjectSummary] = Field(alias="governanceProjects")
total_governance_projects: int = Field(alias="totalGovernanceProjects")
governance_project_portfolio: GovernanceProjectPortfolio = Field(alias="governanceProjectPortfolio")
page: int
page_size: int = Field(alias="pageSize")governance_projectsList[GovernanceProjectSummary]Required
The projects for the current page, ordered by project name, with their governance standing.
total_governance_projectsintRequired
How many projects match the status filter across every page. This is the length of the filtered list, not the size of the organization — read governanceProjectPortfolio.total for that.
Example: 12
governance_project_portfolioGovernanceProjectPortfolioRequired
pageintRequired
The page this response covers.
Example: 1
page_sizeintRequired
The number of projects per page.
Example: 25
interface GovernanceProjectList {
governanceProjects: GovernanceProjectSummary[];
totalGovernanceProjects: number;
governanceProjectPortfolio: GovernanceProjectPortfolio;
page: number;
pageSize: number;
}governanceProjectsGovernanceProjectSummary[]Required
The projects for the current page, ordered by project name, with their governance standing.
totalGovernanceProjectsnumberRequired
How many projects match the status filter across every page. This is the length of the filtered list, not the size of the organization — read governanceProjectPortfolio.total for that.
Example: 12
governanceProjectPortfolioGovernanceProjectPortfolioRequired
pagenumberRequired
The page this response covers.
Example: 1
pageSizenumberRequired
The number of projects per page.
Example: 25
GovernanceProjectPortfolio
An organization-wide roll-up of project statuses. The five bucket counts are mutually exclusive and sum to total, and the roll-up always covers the whole organization even when the accompanying list is filtered or paginated.
class GovernanceProjectPortfolio:
total: int
healthy: int
needs_attention: int = Field(alias="needsAttention")
critical: int
awaiting: int
not_enrolled: int = Field(alias="notEnrolled")
aggregate_pass_rate: Optional[float] = Field(alias="aggregatePassRate")totalintRequired
How many projects your organization has in total.
Example: 12
healthyintRequired
How many projects have no failing control.
Example: 7
needs_attentionintRequired
How many projects have failing controls but a pass rate at or above the healthy threshold.
Example: 2
criticalintRequired
How many projects have failing controls and a pass rate below the healthy threshold.
Example: 1
awaitingintRequired
How many projects are enrolled in a policy but have never been assessed.
Example: 1
not_enrolledintRequired
How many projects belong to no governance policy.
Example: 1
aggregate_pass_rateOptional[float]Required
The share of passing checks across every enrolled project, from 0 to 100, or null when nothing has been assessed anywhere.
Example: 92
interface GovernanceProjectPortfolio {
total: number;
healthy: number;
needsAttention: number;
critical: number;
awaiting: number;
notEnrolled: number;
aggregatePassRate: number | null;
}totalnumberRequired
How many projects your organization has in total.
Example: 12
healthynumberRequired
How many projects have no failing control.
Example: 7
needsAttentionnumberRequired
How many projects have failing controls but a pass rate at or above the healthy threshold.
Example: 2
criticalnumberRequired
How many projects have failing controls and a pass rate below the healthy threshold.
Example: 1
awaitingnumberRequired
How many projects are enrolled in a policy but have never been assessed.
Example: 1
notEnrollednumberRequired
How many projects belong to no governance policy.
Example: 1
aggregatePassRatenumber | nullRequired
The share of passing checks across every enrolled project, from 0 to 100, or null when nothing has been assessed anywhere.
Example: 92
GovernanceProjectStatus
Where a project stands under governance. not_enrolled means it belongs to no governance policy and so has nothing to assess; awaiting means it is enrolled but no control has produced a verdict yet; healthy means no control is failing. needs_attention and critical both have failing controls and differ only by pass rate, with critical below Confident AI's healthy threshold.
class GovernanceProjectStatus(Enum):
HEALTHY = "healthy"
NEEDS_ATTENTION = "needs_attention"
CRITICAL = "critical"
AWAITING = "awaiting"
NOT_ENROLLED = "not_enrolled"enum GovernanceProjectStatus {
HEALTHY = "healthy",
NEEDS_ATTENTION = "needs_attention",
CRITICAL = "critical",
AWAITING = "awaiting",
NOT_ENROLLED = "not_enrolled",
}HEALTHY · NEEDS_ATTENTION · CRITICAL · AWAITING · NOT_ENROLLED
GovernanceProjectSummary
A project as it appears in the governance inventory: which policy governs it, how many controls that brings, and where it currently stands. Every project in the organization appears here, enrolled or not.
class GovernanceProjectSummary:
id: str
name: str
description: Optional[str]
owner: Optional[UserReference]
governance_policy: Optional[GovernancePolicyReference] = Field(alias="governancePolicy")
controls_count: int = Field(alias="controlsCount")
status: GovernanceProjectStatus
health: Optional[GovernanceProjectHealth]idstrRequired
The id of the project.
Example: "<PROJECT-ID>"
namestrRequired
The name of the project.
Example: "Customer Support Agent"
descriptionOptional[str]Required
What the project is for, or null when it has no description.
Example: "Front-line support assistant for billing questions."
ownerOptional[UserReference]Required
The organization member who owns the project, or null when nobody holds the owner role on it.
See UserReference.
governance_policyOptional[GovernancePolicyReference]Required
The governance policy this project is enrolled in, or null when it is enrolled in none.
controls_countintRequired
How many controls apply to this project through the policy it is enrolled in, counting the ones that policy inherits. 0 for a project enrolled in no policy.
Example: 6
statusGovernanceProjectStatusRequired
healthOptional[GovernanceProjectHealth]Required
The project's check counts, or null when it is enrolled in no policy and so has nothing to assess.
interface GovernanceProjectSummary {
id: string;
name: string;
description: string | null;
owner: UserReference | null;
governancePolicy: GovernancePolicyReference | null;
controlsCount: number;
status: GovernanceProjectStatus;
health: GovernanceProjectHealth | null;
}idstringRequired
The id of the project.
Example: "<PROJECT-ID>"
namestringRequired
The name of the project.
Example: "Customer Support Agent"
descriptionstring | nullRequired
What the project is for, or null when it has no description.
Example: "Front-line support assistant for billing questions."
ownerUserReference | nullRequired
The organization member who owns the project, or null when nobody holds the owner role on it.
See UserReference.
governancePolicyGovernancePolicyReference | nullRequired
The governance policy this project is enrolled in, or null when it is enrolled in none.
controlsCountnumberRequired
How many controls apply to this project through the policy it is enrolled in, counting the ones that policy inherits. 0 for a project enrolled in no policy.
Example: 6
statusGovernanceProjectStatusRequired
healthGovernanceProjectHealth | nullRequired
The project's check counts, or null when it is enrolled in no policy and so has nothing to assess.
UserReference
A Confident AI user, as referenced by the records they created.
class UserReference:
id: str
email: str
name: Optional[str]
image: Optional[str]idstrRequired
This is the id of the user.
Example: "<USER-ID>"
emailstrRequired
This is the email address of the user.
Example: "jane@acme.com"
nameOptional[str]Required
This is the display name of the user, or null when they have not set one.
Example: "Jane Doe"
imageOptional[str]Required
This is the URL of the user's avatar, or null when they have none.
interface UserReference {
id: string;
email: string;
name: string | null;
image: string | null;
}idstringRequired
This is the id of the user.
Example: "<USER-ID>"
emailstringRequired
This is the email address of the user.
Example: "jane@acme.com"
namestring | nullRequired
This is the display name of the user, or null when they have not set one.
Example: "Jane Doe"
imagestring | nullRequired
This is the URL of the user's avatar, or null when they have none.
Last updated on