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

# reduceUpdates

```typescript
reduceUpdates(updates: SessionUpdate[]): { events: SessionEvent[]; text: string; toolCalls: ToolCall[] }
```

Fold a batch of raw updates (e.g. a replay) into typed events.

## Parameters

**updates** `SessionUpdate[]` *required*

**Type:** `SessionUpdate[]`

## Returns

`{ events: SessionEvent[]; text: string; toolCalls: ToolCall[] }`


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