---
title: "Projects"
description: "Group related resources into projects for unified management through the Agent API: one-call health checks, scaling, cost tracking and clean teardown."
url: "https://edge.network/docs/agent/projects"
section: "Agent tooling"
---

# Projects

Group related resources together. A project might contain a VM, CDN deployment, storage bucket, and DNS records, all for one app.

## Why use projects

- **Clean teardown:** Delete all resources for an app in one command. No orphaned VMs or forgotten DNS records.
- **Health checks:** Check the status of everything related to an app in one call.
- **Cost tracking:** See how much each project costs per month.
- **No orphans:** Resources are tracked by project, preventing forgotten infrastructure.

## API endpoints

```text
GET    /agent/projects              # List all projects
POST   /agent/projects              # Create a project
GET    /agent/projects/{id}         # Get project with resources
GET    /agent/projects/{id}/health  # Health check all resources
POST   /agent/projects/{id}/scale   # Scale compute resources
DELETE /agent/projects/{id}         # Teardown (requires X-Confirm: teardown)
```

## Creating a project

```http
POST /agent/projects
Authorization: Bearer ea_live_...

{
  "name": "my-portfolio",
  "description": "Personal portfolio website"
}

# Response:
{
  "project": {
    "id": "proj_a1b2c3d4e5f6",
    "name": "my-portfolio",
    "description": "Personal portfolio website",
    "resources": [],
    "created_at": "2026-02-18T12:00:00Z"
  },
  "tell_user": "Project \"my-portfolio\" created."
}
```

Resources are added to the project as the agent creates them. When using composite actions like `deploy/static-site`, all created resources are automatically associated with the project.

## Tearing down a project

Tearing down a project deletes ALL resources associated with it: VMs, CDN deployments, storage buckets and DNS records. This requires the `X-Confirm: teardown` header as a safety measure.

```http
DELETE /agent/projects/proj_a1b2c3d4e5f6
Authorization: Bearer ea_live_...
X-Confirm: teardown

# Response:
{
  "deleted": true,
  "project": "my-app",
  "resources": [
    { "type": "compute", "id": "vm_xyz", "name": "my-app", "status": "deleted" },
    { "type": "cdn", "id": "dep_abc", "name": "my-app-cdn", "status": "deleted" },
    { "type": "storage", "id": "my-app", "name": "my-app", "status": "deleted" }
  ],
  "tell_user": "Project \"my-app\" and all 3 resources have been deleted."
}
```

> [!WARNING]
> **Without the `X-Confirm` header**, the API returns a 400 error with details about what would be deleted, giving the agent a chance to confirm with the user first.

## See also

- [Access codes](/docs/agent/access-codes): Create and scope agent credentials
- [Discovery endpoint](/docs/agent/discovery): The agent's entry point
