AgentFS

Projects

Create and manage project settings and inspect project contents.

Projects provide the first path segment for files. Use a project name in a file path, or use its ID in collection filters.

Project object

FieldTypeDescription
typestringAlways project.
idstringProject identifier.
namestringProject name.
site_urlstring or nullProject site URL, when one is set.
storage_regionstringWhere the project's files are stored. Always us-east for new projects.
default_visibilitystringpublic, unlisted, or private.
default_expires_ininteger or nullDefault file expiration in seconds.
file_countintegerNumber of ready files in the project.
size_bytesintegerTotal bytes in ready files.
created_atstringISO 8601 creation time.
updated_atstringISO 8601 update time.

List projects

GET /v1/projects

List projects when the API key has read permission on each project (an organization scope or a project scope with an empty prefix). The API filters inaccessible projects before it applies the cursor.

Query parameters

ParameterTypeRequiredDescription
limitintegerNoNumber of items, from 1 through 200. Defaults to 50.
cursorstringNoOpaque cursor from the previous response.

Response fields

FieldTypeDescription
itemsarrayProject objects.
next_cursorstring or nullCursor for the next page, or null when there is no next page.

Returns 200 OK.

Request

Request
curl "https://agentfs.cloud/v1/projects?limit=50" \
  -H "Authorization: Bearer $AGENTFS_KEY"

Response

200 OK
{
  "items": [
    {
      "type": "project",
      "id": "p_1a2b",
      "name": "reports",
      "site_url": null,
      "storage_region": "us-east",
      "default_visibility": "unlisted",
      "default_expires_in": null,
      "file_count": 12,
      "size_bytes": 482130,
      "created_at": "2026-03-01T12:00:00.000Z",
      "updated_at": "2026-03-02T12:00:00.000Z"
    }
  ],
  "next_cursor": null
}

Errors

unauthorized (401), invalid_agent_label (400), invalid_query (400), internal_error (500).

Get a project

GET /v1/projects/:project

Return one project by name. Project names are matched case-insensitively, and the API key must have read permission on the whole project (an empty path prefix).

Path parameters

ParameterTypeRequiredDescription
projectstringYesURL-encoded project name.

Response fields

Returns a project object.

Returns 200 OK.

Request

Request
curl https://agentfs.cloud/v1/projects/reports \
  -H "Authorization: Bearer $AGENTFS_KEY"

Response

200 OK
{
  "type": "project",
  "id": "p_1a2b",
  "name": "reports",
  "site_url": null,
  "storage_region": "us-east",
  "default_visibility": "unlisted",
  "default_expires_in": null,
  "file_count": 12,
  "size_bytes": 482130,
  "created_at": "2026-03-01T12:00:00.000Z",
  "updated_at": "2026-03-02T12:00:00.000Z"
}

Errors

unauthorized (401), invalid_agent_label (400), project_not_found (404), forbidden (403), internal_error (500).

Create a project

POST /v1/projects

Create a project. The API key must have organization-level write permission; a project-scoped key cannot create a project.

Request body

Send JSON with Content-Type: application/json.

FieldTypeRequiredDescription
namestringYes1–100 characters. The final name must start with a letter or digit and contain only letters, digits, ., _, and -.
default_visibilitystringNopublic, unlisted, or private. Defaults to unlisted.
default_expires_ininteger or nullNoPositive seconds up to 31,536,000 (one year), or null.

Returns 201 Created with a project object. The API route does not accept site_url on create.

Response fields

Returns a project object.

Request

Request
curl -X POST https://agentfs.cloud/v1/projects \
  -H "Authorization: Bearer $AGENTFS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "reports",
    "default_visibility": "unlisted",
    "default_expires_in": 86400
  }'

Response

201 Created
{
  "type": "project",
  "id": "p_1a2b",
  "name": "reports",
  "site_url": null,
  "storage_region": "us-east",
  "default_visibility": "unlisted",
  "default_expires_in": 86400,
  "file_count": 0,
  "size_bytes": 0,
  "created_at": "2026-03-02T12:00:00.000Z",
  "updated_at": "2026-03-02T12:00:00.000Z"
}

Errors

unauthorized (401), invalid_agent_label (400), forbidden (403), invalid_project (400), project_exists (409), region_unavailable (422), project_create_failed (500), internal_error (500).

Update project settings

PATCH /v1/projects/:project

Update a project's default visibility or expiration. The API key must have write permission for the project.

Path parameters

ParameterTypeRequiredDescription
projectstringYesURL-encoded project name.

Request body

Send JSON with Content-Type: application/json. Include at least one field.

FieldTypeRequiredDescription
default_visibilitystringNopublic, unlisted, or private.
default_expires_ininteger or nullNoPositive seconds up to 31,536,000, or null. Omit it to keep the current value.
storage_regionstringNoDo not send this field. Any supplied value is rejected because a project's storage region cannot change.

Returns 200 OK with the updated project object.

Response fields

Returns a project object.

Request

Request
curl -X PATCH https://agentfs.cloud/v1/projects/reports \
  -H "Authorization: Bearer $AGENTFS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"default_visibility":"public"}'

Response

200 OK
{
  "type": "project",
  "id": "p_1a2b",
  "name": "reports",
  "site_url": null,
  "storage_region": "us-east",
  "default_visibility": "public",
  "default_expires_in": null,
  "file_count": 12,
  "size_bytes": 482130,
  "created_at": "2026-03-01T12:00:00.000Z",
  "updated_at": "2026-03-02T12:01:00.000Z"
}

Errors

unauthorized (401), invalid_agent_label (400), invalid_project_settings (400), jurisdiction_immutable (409), project_not_found (404), forbidden (403), internal_error (500).

Delete a project

DELETE /v1/projects/:project

Delete a project the API key can delete. The key must have delete permission for the project.

Only team owners and admins can delete a project; for an API key, that is the role of the key's owner. By default, the project must contain no files. Pass recursive=true to delete its files and folders with the project. The rows are deleted at once, whatever the project's size, and the stored bytes within the hour.

Path parameters

ParameterTypeRequiredDescription
projectstringYesURL-encoded project name.

Query parameters

ParameterTypeRequiredDescription
recursivestringNoDelete contents only when the value is exactly true. Any other value behaves as false.

Response

Returns 204 No Content with an empty body.

204 No Content
HTTP/1.1 204 No Content

Request

Request
curl -X DELETE "https://agentfs.cloud/v1/projects/reports?recursive=true" \
  -H "Authorization: Bearer $AGENTFS_KEY"

Errors

unauthorized (401), invalid_agent_label (400), project_not_found (404), forbidden (403), project_not_empty (409), internal_error (500).

On this page