Launch Week 3: Five days of launches

Governance Control Groups

Overview

The Confident AI SDK exposes every Governance Control Group 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 Control Groups

Lists your organization's governance control groups, newest created first, with each group's controls counted rather than named. A group is a label for organizing controls and does not itself govern anything — what a control gates comes from the governance policies holding it, never from its group.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.organization.list_governance_control_groups(
    page=1,
    page_size=25,
)

For async mode, call a_list_governance_control_groups and await it as shown below:

result = await client.organization.a_list_governance_control_groups(...)

Parameters

ParameterTypeDescription
pageOptional[int]The page to return. Defaults to 1.
page_sizeOptional[int]The number of control groups per page, at most 100. Defaults to 25.

Returns

This method returns an object of type GovernanceControlGroupList.

Create Governance Control Group

Creates a governance control group and returns its id. The group starts empty, since which controls belong to it is set on each control rather than here, and putting a control in a group has no effect on which projects it gates or when it is assessed.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.organization.create_governance_control_group(
    name="SOC 2 readiness",
    description="The controls our SOC 2 auditor asks about each quarter.",
)

For async mode, call a_create_governance_control_group and await it as shown below:

result = await client.organization.a_create_governance_control_group(...)

Parameters

ParameterTypeDescription
namestrRequired. The name of the control group, unique within your organization.
descriptionOptional[str]What the group collects. Send null to leave it unset.

Returns

This method returns an object of type GovernanceControlGroupRef.

Get Governance Control Group

Retrieves a single governance control group with the controls inside it, which the list endpoint reports only as a count. Each control is named rather than resolved.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.organization.get_governance_control_group(
    control_group_id="<GOVERNANCE-CONTROL-GROUP-ID>",
)

For async mode, call a_get_governance_control_group and await it as shown below:

result = await client.organization.a_get_governance_control_group(...)

Parameters

ParameterTypeDescription
control_group_idstrRequired. The id of the governance control group.

Returns

This method returns an object of type GovernanceControlGroup.

Delete Governance Control Group

Permanently deletes a governance control group. The controls that were in it are not deleted and become ungrouped, and they keep gating exactly the projects they gated before, since a group never scoped that. Warning: This action cannot be undone.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.organization.delete_governance_control_group(
    control_group_id="<GOVERNANCE-CONTROL-GROUP-ID>",
)

For async mode, call a_delete_governance_control_group and await it as shown below:

result = await client.organization.a_delete_governance_control_group(...)

Parameters

ParameterTypeDescription
control_group_idstrRequired. The id of the governance control group.

Returns

This method returns an object of type GovernanceControlGroupRef.

Types

GovernanceControlGroup

A label for organizing an organization's governance controls, and nothing more. A group does not scope evaluation: which projects a control gates, and therefore when it is assessed, comes from the governance policies holding that control, so moving a control between groups changes nothing about what it checks or where. A control belongs to at most one group, and membership is set on the control rather than here.

class GovernanceControlGroup:
    id: str
    name: str
    description: Optional[str]
    controls_count: int = Field(alias="controlsCount")
    created_at: str = Field(alias="createdAt")
    updated_at: str = Field(alias="updatedAt")
    controls: List[GovernanceControlGroupMember]

idstrRequired

The id of the control group, generated by Confident AI.

Example: "<GOVERNANCE-CONTROL-GROUP-ID>"

namestrRequired

The name of the control group, unique within your organization.

Example: "SOC 2 readiness"

descriptionOptional[str]Required

What the group collects, or null when it has none.

Example: "The controls our SOC 2 auditor asks about each quarter."

controls_countintRequired

How many controls are in the group.

Example: 4

created_atstrRequired

When the control group was created.

Example: "2025-01-14T09:30:00+00:00"

updated_atstrRequired

When the control group's own name or description last changed. Moving a control in or out of the group does not touch it, since membership is stored on the control.

Example: "2025-01-18T16:45:00+00:00"

controlsList[GovernanceControlGroupMember]Required

The controls in the group, ordered by name.

See GovernanceControlGroupMember.

GovernanceControlGroupList

One page of governance control groups, with the total across all pages.

class GovernanceControlGroupList:
    governance_control_groups: List[GovernanceControlGroupSummary] = Field(alias="governanceControlGroups")
    total_governance_control_groups: int = Field(alias="totalGovernanceControlGroups")
    page: int
    page_size: int = Field(alias="pageSize")

governance_control_groupsList[GovernanceControlGroupSummary]Required

The organization's control groups for the current page, newest created first.

See GovernanceControlGroupSummary.

total_governance_control_groupsintRequired

The number of control groups in the organization, across every page.

Example: 3

pageintRequired

The page this response covers.

Example: 1

page_sizeintRequired

The number of control groups per page.

Example: 25

GovernanceControlGroupMember

A control as it appears inside its group. Retrieve the control by id for its health, its policy membership and its definition.

class GovernanceControlGroupMember:
    id: str
    name: str
    description: Optional[str]
    type: GovernanceControlType

idstrRequired

The id of the control, generated by Confident AI.

Example: "<GOVERNANCE-CONTROL-ID>"

namestrRequired

The name of the control.

Example: "Production error rate under 2%"

descriptionOptional[str]Required

What the control checks and why, or null when it has none.

Example: "Traces must error on fewer than 2% of production requests over the last day."

typeGovernanceControlTypeRequired

GovernanceControlGroupRef

A reference to a governance control group by its id.

class GovernanceControlGroupRef:
    id: str

idstrRequired

The id of the governance control group.

Example: "<GOVERNANCE-CONTROL-GROUP-ID>"

GovernanceControlGroupSummary

A control group as it appears in a list, with its controls counted rather than named.

class GovernanceControlGroupSummary:
    id: str
    name: str
    description: Optional[str]
    controls_count: int = Field(alias="controlsCount")
    created_at: str = Field(alias="createdAt")
    updated_at: str = Field(alias="updatedAt")

idstrRequired

The id of the control group, generated by Confident AI.

Example: "<GOVERNANCE-CONTROL-GROUP-ID>"

namestrRequired

The name of the control group, unique within your organization.

Example: "SOC 2 readiness"

descriptionOptional[str]Required

What the group collects, or null when it has none.

Example: "The controls our SOC 2 auditor asks about each quarter."

controls_countintRequired

How many controls are in the group.

Example: 4

created_atstrRequired

When the control group was created.

Example: "2025-01-14T09:30:00+00:00"

updated_atstrRequired

When the control group's own name or description last changed. Moving a control in or out of the group does not touch it, since membership is stored on the control.

Example: "2025-01-18T16:45:00+00:00"

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"

RUNTIME · PRE_DEPLOYMENT_EVALS · PRE_DEPLOYMENT_RED_TEAMING · OPERATIONAL

Building a production pipeline?Design a scalable API workflow for evals, datasets, traces, and promptsTalk to an engineer

Last updated on

Built byConfident AI