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

# List agents across projects

> List agents across projects.

`accessibleAgents(input: AgentsInput): AgentConnection!`

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`AgentsInput`](https://veryfront.com/docs/cloud/graphql/types/agentsinput) | No |

## Input fields

### input

[`AgentsInput`](https://veryfront.com/docs/cloud/graphql/types/agentsinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `accountId` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No | |
| `cursor` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `limit` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No | |
| `search` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `access` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `kind` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `runtimeStatus` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `sortBy` | [`AccessibleAgentSortBy`](https://veryfront.com/docs/cloud/graphql/types/accessibleagentsortby) | No | Field to sort by. Ties break by agent row ID ascending. Default: `"project_name"`. |
| `sortOrder` | [`AccessibleAgentSortOrder`](https://veryfront.com/docs/cloud/graphql/types/accessibleagentsortorder) | No | Sort direction. Defaults to asc, the order the directory has always used. Default: `"asc"`. |

## Response

Returns [`AgentConnection!`](https://veryfront.com/docs/cloud/graphql/types/agentconnection). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `data` | [`[AccessibleAgent!]!`](https://veryfront.com/docs/cloud/graphql/types/accessibleagent) | |
| `pageInfo` | [`PageInfo!`](https://veryfront.com/docs/cloud/graphql/types/pageinfo) | Pagination for the agent list. `pageInfo.next`: Opaque cursor to continue matching rows or remaining scan work. Follow it even when this page has no agents; null means no continuation remains. |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query AccessibleAgents($input: AgentsInput) {
  accessibleAgents(input: $input) {
    data {
      id
      agentId
      name
      updatedAt
      avatarUrl
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
```

```json title="variables.json" theme={null}
{}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.