Projects: detailed guide
This page focuses on the project-specific parts of the SDK: creation, configuration, agent/team associations, and common patterns. If you haven’t set up aControlPlaneClient yet, see the Client Quick Start at Client Overview for initialization and authentication instructions.
Create a project example
The following example demonstrates creating a project using the Control Plane SDK:Core Operations
List Projects
Retrieve a list of projects with optional status filtering:| Parameter | Type | Default | Description |
|---|---|---|---|
status_filter | str | None | Filter by status: active, inactive, archived |
Get Project Details
Fetch a single project’s details by UUID:Get Default Project
Get or create the default project for the organization:Create Project
Create a new project:| Field | Type | Required | Description |
|---|---|---|---|
name | str | Yes | Project name |
key | str | Yes | Unique project key (e.g., PROD, STAGING) |
description | str | No | Project description |
restrict_to_environment | bool | No | Restrict project to specific environment (default: False) |
policy_ids | list | No | List of policy IDs to apply to the project |
Update Project
Update an existing project’s configuration (partial update - only provided fields are updated):Delete Project
Permanently remove a project by UUID:Agent Management
Add Agent to Project
Add an agent to a project with an optional role:List Agents in Project
Retrieve all agents associated with a project:Remove Agent from Project
Remove an agent from a project:Team Management
Add Team to Project
Add a team to a project with an optional role:List Teams in Project
Retrieve all teams associated with a project:Remove Team from Project
Remove a team from a project:Error Handling
The Projects Service raisesProjectError for API errors:
Best Practices
- Use descriptive project names that reflect the project’s scope
- Assign appropriate roles when adding agents and teams
- Use status filters to manage active vs archived projects
- Organize related agents and teams in the same project
- Use the default project for general-purpose resources
- Archive projects instead of deleting them to preserve history