Projects organize threads and provide shared context (GitHub repos, execution targets).

GET /api/projects

List all projects for the tenant.

POST /api/projects

Create a new project.
{
  "name": "My App",
  "sourceType": "github",
  "description": "Main application repository",
  "githubRepoUrl": "https://github.com/org/repo",
  "githubBranch": "main",
  "githubOwner": "org",
  "visibility": "private",
  "executionTarget": "local"
}
FieldTypeDescription
namestringProject name (max 256 chars)
sourceTypestringSource type (max 64 chars)
descriptionstringDescription (max 2048 chars)
githubRepoUrlstringGitHub repository URL
githubBranchstringDefault branch
githubOwnerstringRepository owner
localPathstringLocal filesystem path
visibility"public" | "private"Project visibility
executionTarget"local" | "docker" | "cloud"Where agents execute

GET /api/projects/:id

Get project details.

PATCH /api/projects/:id

Update project settings.
{
  "name": "Updated Name",
  "description": "Updated description",
  "localPath": "/new/path",
  "executionTarget": "docker",
  "settings": { "model": "claude-opus-4" }
}

DELETE /api/projects/:id

Delete a project.

POST /api/projects/:id/archive

Archive a project.

POST /api/projects/:id/unarchive

Unarchive a project.

Analytics

GET /api/analytics/workspace

Workspace analytics — thread counts, token usage, cost breakdown over time.

GET /api/analytics/github

GitHub contribution analytics — commits, PRs, reviews tied to agent activity.