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

# Digest

> The company's sessions and agents in one read: what waits on you, what failed, recent work, and each channel.

The digest is the dashboard's side rail in one request. It reads the lists the rail draws, for the
company the credential belongs to, and nothing else. Each list is cut at a cap. Past a cap, page the
list route itself.

## Read the digest

`GET /v1/digest` — scopes `sessions:read` and `agents:read`

No query parameters. Every session in it is top-level (a delegated thread is not listed) and
newest first.

| Field | What it holds | Cap |
| - | - | - |
| `agents` | The company's agents, newest first, as `GET /v1/agents` lists them. | 100 |
| `waiting.awaiting_approval` | Idle sessions parked on an approval. | 100 |
| `waiting.awaiting_answer` | Idle sessions parked on a question. | 100 |
| `waiting.budget_paused` | Idle sessions paused at their budget. | 100 |
| `failed` | Failed sessions. | 50 |
| `recent` | All sessions. | 50 |
| `channels` | For each agent in `agents`, its channel's current session: the newest one marked `metadata.room` with that agent's id that has not completed, failed or been cancelled. An agent with none has no entry. | one per agent |

Each capped list is `{ data, has_more }`. `has_more` is `true` when the list goes on past its cap.

```json theme={"system"}
{
  "object": "digest",
  "agents": { "data": [{ "object": "agent", "id": "agt_…", "name": "CEO" }], "has_more": false },
  "waiting": {
    "awaiting_approval": { "data": [{ "object": "session", "id": "ses_…", "status": "idle", "stop_reason": "awaiting_approval" }], "has_more": false },
    "awaiting_answer": { "data": [], "has_more": false },
    "budget_paused": { "data": [], "has_more": false }
  },
  "failed": { "data": [], "has_more": false },
  "recent": { "data": [{ "object": "session", "id": "ses_…" }], "has_more": true },
  "channels": { "data": [{ "object": "session", "id": "ses_…", "metadata": { "room": "agt_…" } }] }
}
```

Agents and sessions are the full objects their own routes answer.

The digest only reads. A channel from before channels were marked shows no session here; reading it
with `GET /v1/sessions?room={agent_id}` finds its conversation.

A key missing either scope is `forbidden`. A company without an active plan is
`subscription_required`, except for the person setting it up and its CEO. An agent's own token cannot read it.

## Read an agent's chat screen

`GET /v1/chat` — scopes `sessions:read` and `agents:read`

An agent, its newest chats, and the recent messages of one chat, in one request: what the dashboard
draws when it opens a chat.

| Query | What it does |
| - | - |
| `agent` | The agent. Optional; without it, the company's CEO. |
| `session` | The chat to open. Optional. Without it, the open chat is the newest one a person started that is still open, is not a channel's, and belongs to no app; else the newest such chat of any kind. |

| Field | What it holds |
| - | - |
| `agent` | The agent, as `GET /v1/agents/{id}` answers it. `null` when the company has no such agent (or no CEO yet). |
| `sessions` | The agent's newest top-level sessions, as `GET /v1/sessions?agent_id=…` lists them, cut at 20: `{ data, has_more }`. |
| `open` | The chat to open, or `null`: `session`, its last 200 events (`events`, the same rows as `GET /v1/sessions/{id}/events?include_accepted=true`), `has_older` when earlier events exist, and `files`, the files those events name (up to 100; empty for a key without `files:read`). |

An `agent` that is not this company's answers `agent: null` and no chats. A `session` that is not that agent's chat answers `open: null`. The route only reads.


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