> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autonomyai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Projects & Workspaces

> The two IDs every task needs, and how a repo becomes buildable.

Almost every tool takes a `project_id`, and task tools also take a `workspace_id`. Here's what they are and how to get them.

## Project

A **project** is a repository connected to Autonomy. `list_projects` returns the projects you have access to, each with a `project_id` and a `status_data.status`.

A newly connected repo starts in `PENDING_INITIALIZATION`. Before you can build in it, its workspace has to be provisioned:

<Steps>
  <Step title="List projects">
    `list_projects` - find your project and check `status_data.status`.
  </Step>

  <Step title="Initialize if needed">
    If the status isn't `READY`, call `initialize_project(project_id)`. This provisions the sandbox/workspace and runs detection (install scripts, validation).
  </Step>

  <Step title="Poll until READY">
    Poll `list_projects` until the project is `READY` - that's when it gets a `workspace_id`.
  </Step>
</Steps>

Use `list_available_projects` to see repos you can connect but haven't yet, and `add_projects` to link them.

## Workspace

A **workspace** is the initialized, buildable copy of a project - it's what a coding task runs against. You get a `workspace_id` from `list_projects` once the project is `READY`, and pass it to `start_task`.

<Warning>
  Workspaces can be recycled. If a call returns `410` / stale workspace, the `workspace_id` no longer exists - re-run `list_projects` to get a current one.
</Warning>

## Setting a project up

For the agent to actually build, the project needs its commands configured (install / validate / dev) and any required environment variables. That's covered in the [Setup tools](/tools/setup) and the built-in `setup` skill (`load_autonomy_skill name="setup"`).
