---
title: "The caller's own chats with the repository assistant, newest first"
---

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

Path: Pando API › agents

`GET /v1/monorepos/{owner}/{monorepo}/assistant`

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `listChats.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `listChats.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`

## Query parameters

- `listChats.query.before` (integer, optional)
- `listChats.query.limit` (integer, optional)
  - min 1; max 100; default `30`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://app.gitpando.com/v1/monorepos/string/string/assistant \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/assistant';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/assistant"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "sessions": [
    {
      "number": 0,
      "kind": "task",
      "status": "working",
      "reason": "string",
      "repo": "string",
      "branch": "string",
      "program": "string",
      "model": "string",
      "issue": 0,
      "launched_by": "string",
      "machine": "string",
      "workspace": "mount",
      "awaiting_checks": true,
      "first_message": "string",
      "branch_facts": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "next_before": 0,
  "counts": {
    "all": 0,
    "working": 0,
    "waiting": 0
  }
}
```

- `listChats.response.200.sessions` (array<object>, required)
  - `listChats.response.200.sessions.number` (integer, required)
  - `listChats.response.200.sessions.kind` (string, required)
    - one of `"task"`, `"issue"`, `"review"`, `"chat"`
  - `listChats.response.200.sessions.status` (string, required)
    - one of `"working"`, `"waiting"`, `"failed"`, `"stopped"`
  - `listChats.response.200.sessions.reason` (string | null, required)
  - `listChats.response.200.sessions.repo` (string, required)
  - `listChats.response.200.sessions.branch` (string | null, required) — Named by a person or from its issue; null for an assistant's chat until the person names one.
  - `listChats.response.200.sessions.program` (string, required) — pi
  - `listChats.response.200.sessions.model` (string, required)
  - `listChats.response.200.sessions.issue` (integer | null, required)
  - `listChats.response.200.sessions.launched_by` (string, required)
  - `listChats.response.200.sessions.machine` (string, required) — The session's credential, cloud-<n>.
  - `listChats.response.200.sessions.workspace` (string | null, required)
    - one of `"mount"`, `"clone"`, `null`
  - `listChats.response.200.sessions.awaiting_checks` (boolean, required) — Its merge waits for required checks still running; Pando tells it when they are green.
  - `listChats.response.200.sessions.first_message` (string | null, required) — An assistant's chat: its first message, cut at 200 characters; null for other kinds.
  - `listChats.response.200.sessions.created_at` (string, required)
    - format `date-time`
  - `listChats.response.200.sessions.updated_at` (string, required)
    - format `date-time`
  - `listChats.response.200.sessions.branch_facts` (object | null, optional) — In a list only. Its branch now (state, ahead, merged_at, checks); null while the branch is not made yet.
- `listChats.response.200.next_before` (integer | null, required)
- `listChats.response.200.counts` (object, required) — For the same filters, in every state.
  - `listChats.response.200.counts.all` (integer, required)
  - `listChats.response.200.counts.working` (integer, required)
  - `listChats.response.200.counts.waiting` (integer, required)


Source: https://docs.gitpando.com/api/agents/listChats/index.md
