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

# events • AI Agent SDK

> events: Return all journal events for ``run_id`` ordered by ``(seq, kind)``.

# events

Method

> This is a method of the [**RunJournal**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RunJournal.md) class in the [**journal**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/journal.md) module.

Return all journal events for `run_id` ordered by `(seq, kind)`.

Ordering by `(seq, rowid)` preserves append order within a step so a
`tool_call` always precedes its `tool_result`.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def events(run_id: str) -> List[JournalEvent]
```

## Parameters

**run\_id** `str` *required*

No description available.

### Returns

**Returns** `List[JournalEvent]`

The result of the operation.

## Uses

* `fetchall`
* `execute`
* `json.loads`
* `JournalEvent`

## Used By

* [`RunJournal.replay_index`](../functions/RunJournal-replay_index)
* [`RunJournal.last_iteration`](../functions/RunJournal-last_iteration)
* [`RunJournal.assert_replay_order`](../functions/RunJournal-assert_replay_order)
* [`export_run`](../functions/export_run)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/journal.py#L351)
>
> `praisonaiagents/runtime/journal.py` at line 351


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