# Pop an item from a session

Launch stage: Beta

`POST /api/2.0/agents/{parent=session-stores/*/sessions/*}/items:pop`

Pops the newest item from a session.

API scopes: agent-kit

## Path parameters

- `parent` (string, required)
  Resource name of the containing session, in the form
   `session-stores/{session_store_id}/sessions/{session_id}`.

## Returns

- `item` (object, optional)
  Removed item, if any.
  - `item_id` (string, optional, Output only)
    Stable service-generated item ID.
  - `data` (object, required)
    Complete SDK-native, JSON-compatible item. The service stores and returns this value without
     interpreting provider-specific fields such as `type`, `role`, or `content`.
  - `create_time` (string, optional, Output only)
    Server-assigned time when the append commits. Values are nondecreasing within a session. Item
     listing orders by this timestamp; equal timestamps are resolved by committed append order.

## Response

```json
{
  "item": {
    "item_id": "string",
    "data": {},
    "create_time": "string"
  }
}
```

