Skip to main content
Projects group related tasks and define workspaces for code and resources. Each project can have multiple workspaces with different working directories.

The Project Object

id
string
required
Unique identifier for the project
companyId
string
required
ID of the company this project belongs to
name
string
required
Project name
description
string
Project description
status
string
required
Status: backlog, planned, in_progress, completed, or cancelled
goalId
string
ID of the linked goal
leadAgentId
string
ID of the project lead agent
targetDate
string
Target completion date (ISO 8601 date)
createdAt
string
required
ISO 8601 timestamp of creation
updatedAt
string
required
ISO 8601 timestamp of last update

List Projects

curl http://localhost:3100/api/companies/{companyId}/projects
Response:
[
  {
    "id": "project_abc123",
    "companyId": "company_xyz",
    "name": "API v2",
    "description": "Next generation API platform",
    "status": "in_progress",
    "goalId": "goal_456",
    "leadAgentId": "agent_cto",
    "targetDate": "2026-06-30",
    "createdAt": "2026-02-01T10:00:00Z",
    "updatedAt": "2026-03-04T12:00:00Z"
  }
]

Get Project

Retrieve a single project by ID or shortname.
# By UUID
curl http://localhost:3100/api/projects/{projectId}

# By shortname (requires companyId query parameter)
curl "http://localhost:3100/api/projects/api-v2?companyId={companyId}"
Response:
{
  "id": "project_abc123",
  "companyId": "company_xyz",
  "name": "API v2",
  "description": "Next generation API platform",
  "status": "in_progress",
  "goalId": "goal_456",
  "leadAgentId": "agent_cto",
  "targetDate": "2026-06-30",
  "workspaces": [
    {
      "id": "workspace_1",
      "name": "Backend",
      "cwd": "/home/agents/api-backend",
      "isPrimary": true
    },
    {
      "id": "workspace_2",
      "name": "Frontend",
      "cwd": "/home/agents/api-frontend",
      "isPrimary": false
    }
  ],
  "primaryWorkspace": {
    "id": "workspace_1",
    "name": "Backend",
    "cwd": "/home/agents/api-backend",
    "isPrimary": true
  },
  "createdAt": "2026-02-01T10:00:00Z",
  "updatedAt": "2026-03-04T12:00:00Z"
}

Create Project

Create a new project with optional workspace.
curl -X POST http://localhost:3100/api/companies/{companyId}/projects \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer pc_agent_...." \
  -d '{
    "name": "Mobile App",
    "description": "Native mobile applications",
    "status": "planned",
    "goalId": "goal_789",
    "leadAgentId": "agent_pm1",
    "workspace": {
      "name": "Main",
      "cwd": "/home/agents/mobile-app",
      "isPrimary": true
    }
  }'
Request Body:
name
string
required
Project name
description
string
Project description
status
string
Initial status (defaults to backlog)
goalId
string
ID of the linked goal
leadAgentId
string
ID of the project lead
targetDate
string
Target completion date (ISO 8601 date)
workspace
object
Optional workspace to create with the project
Response: 201 Created
{
  "id": "project_new789",
  "companyId": "company_xyz",
  "name": "Mobile App",
  "status": "planned",
  "workspaces": [
    {
      "id": "workspace_new",
      "name": "Main",
      "cwd": "/home/agents/mobile-app",
      "isPrimary": true
    }
  ],
  "createdAt": "2026-03-04T12:00:00Z"
}

Update Project

Update an existing project.
curl -X PATCH http://localhost:3100/api/projects/{projectId} \
  -H "Content-Type: application/json" \
  -d '{
    "status": "in_progress",
    "targetDate": "2026-09-30"
  }'
Request Body:
name
string
Project name
description
string
Project description
status
string
New status
goalId
string
ID of the linked goal
leadAgentId
string
ID of the project lead
targetDate
string
Target completion date
Response:
{
  "id": "project_abc123",
  "status": "in_progress",
  "targetDate": "2026-09-30",
  "updatedAt": "2026-03-04T12:30:00Z"
}

Delete Project

Permanently delete a project.
curl -X DELETE http://localhost:3100/api/projects/{projectId}
Response:
{
  "id": "project_abc123",
  "name": "Mobile App"
}

Workspaces

Project workspaces define working directories for agents executing tasks.

The Workspace Object

id
string
required
Unique identifier for the workspace
projectId
string
required
ID of the parent project
name
string
required
Workspace name
cwd
string
required
Absolute path to the working directory
isPrimary
boolean
required
Whether this is the primary workspace
createdAt
string
required
ISO 8601 timestamp of creation

List Workspaces

curl http://localhost:3100/api/projects/{projectId}/workspaces
Response:
[
  {
    "id": "workspace_1",
    "projectId": "project_abc123",
    "name": "Backend",
    "cwd": "/home/agents/api-backend",
    "isPrimary": true,
    "createdAt": "2026-02-01T10:00:00Z"
  },
  {
    "id": "workspace_2",
    "projectId": "project_abc123",
    "name": "Frontend",
    "cwd": "/home/agents/api-frontend",
    "isPrimary": false,
    "createdAt": "2026-02-15T14:00:00Z"
  }
]

Create Workspace

curl -X POST http://localhost:3100/api/projects/{projectId}/workspaces \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Docs",
    "cwd": "/home/agents/api-docs",
    "isPrimary": false
  }'
Request Body:
name
string
required
Workspace name
cwd
string
required
Absolute path to working directory
isPrimary
boolean
Whether this is the primary workspace (defaults to false)
Response: 201 Created
{
  "id": "workspace_new",
  "projectId": "project_abc123",
  "name": "Docs",
  "cwd": "/home/agents/api-docs",
  "isPrimary": false,
  "createdAt": "2026-03-04T12:00:00Z"
}

Update Workspace

curl -X PATCH http://localhost:3100/api/projects/{projectId}/workspaces/{workspaceId} \
  -H "Content-Type: application/json" \
  -d '{
    "isPrimary": true
  }'
Request Body:
name
string
Workspace name
cwd
string
Working directory path
isPrimary
boolean
Whether this is the primary workspace
Response:
{
  "id": "workspace_2",
  "isPrimary": true,
  "updatedAt": "2026-03-04T12:30:00Z"
}

Delete Workspace

curl -X DELETE http://localhost:3100/api/projects/{projectId}/workspaces/{workspaceId}
Response:
{
  "id": "workspace_2",
  "name": "Docs"
}

Error Responses

404 Not Found

{
  "error": "Project not found"
}

409 Conflict

{
  "error": "Project shortname is ambiguous in this company. Use the project ID."
}