# List the projects an agent runs in

GET

/v1/agents/{agentId}/projects

```sh
curl --request GET \
  --url https://example.com/v1/agents/example/projects \
  --header 'Authorization: Bearer <token>'
```

The project the agent was first published in, then each other project a version of it can run in: one that a deployment which is not retired shipped a version into, an unregistered version included. A change to the agent reaches each of them. Only the projects the caller can read are named, its first project included. A retired agent still answers. Without environment orders, an agent has one project. Under `kindgi dev`, whose pack names no project, the list is empty.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.3.1/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**agentId**

required

string

AgentId — dotted namespace (`acme.drafting`).

## Responses

### 200

The projects.

application/json

object

**data**

required

Its first project first, then the others, each once.

Array\<object>

object

**projectId**

required

string format: uuid

##### Examplegenerated

```json
{
  "data": [
    {
      "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
    }
  ]
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No agent with that id under this tenant.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/agents/{agentId}`: Fetch the latest version of an agent](https://docs.kindgi.com/v0.3.1/reference/api/operations/agentsget.md)
- [`GET /v1/agents/{agentId}/versions`: List versions of an agent](https://docs.kindgi.com/v0.3.1/reference/api/operations/agentslistversions.md)
- [`POST /v1/agents/{agentId}/versions`: Derive an agent version with data-block pins swapped](https://docs.kindgi.com/v0.3.1/reference/api/operations/agentsderiveversion.md)
- [`GET /v1/agents/{agentId}/versions/{version}`: Fetch a specific agent version](https://docs.kindgi.com/v0.3.1/reference/api/operations/agentsgetversion.md)
- [Projects, packs and values](https://docs.kindgi.com/v0.3.1/concepts/projects-packs-values.md)
- [Agent and tool versions](https://docs.kindgi.com/v0.3.1/guides/agents/agent-and-tool-versions.md)
- [Error code `database-busy`](https://docs.kindgi.com/v0.3.1/reference/errors.md#database-busy)
- [Every error code](https://docs.kindgi.com/v0.3.1/reference/errors.md)
