---
title: "AgentSession"
description: "packages/contract/src/agent.ts is the exact shape."
---

> 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

packages/contract/src/agent.ts is the exact shape.

## Fields

- `AgentSession.number` (integer, required)
- `AgentSession.kind` (string, required)
  - one of `"task"`, `"issue"`, `"review"`, `"chat"`
- `AgentSession.status` (string, required)
  - one of `"working"`, `"waiting"`, `"failed"`, `"stopped"`
- `AgentSession.reason` (string | null, required)
- `AgentSession.repo` (string, required)
- `AgentSession.branch` (string | null, required) — Named by a person or from its issue; null for an assistant's chat until the person names one.
- `AgentSession.program` (string, required) — pi
- `AgentSession.model` (string, required)
- `AgentSession.issue` (integer | null, required)
- `AgentSession.launched_by` (string, required)
- `AgentSession.machine` (string, required) — The session's credential, cloud-<n>.
- `AgentSession.workspace` (string | null, required)
  - one of `"mount"`, `"clone"`, `null`
- `AgentSession.awaiting_checks` (boolean, required) — Its merge waits for required checks still running; Pando tells it when they are green.
- `AgentSession.first_message` (string | null, required) — An assistant's chat: its first message, cut at 200 characters; null for other kinds.
- `AgentSession.created_at` (string, required)
  - format `date-time`
- `AgentSession.updated_at` (string, required)
  - format `date-time`
- `AgentSession.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.


Source: https://docs.gitpando.com/api/schemas/AgentSession/index.md
