> ## 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.

# Import Run • AI Agent SDK

> import_run: Write an exported run into ``journal`` and return its run id.

# import\_run

Function

> This function is defined in the [**portable**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/portable.md) module.

Write an exported run into `journal` and return its run id.

Refuses to import over an existing run unless `overwrite=True`: silently
merging two runs' events would produce a replay index that belongs to
neither, and the failure would surface much later as a confusing resume.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def import_run(journal: RunJournal, blob: Dict[str, Any]) -> str
```

## Parameters

**journal** `RunJournal` *required*

No description available.

**blob** `Dict[str, Any]` *required*

No description available.

### Returns

**Returns** `str`

The result of the operation.

## Uses

* `PortableRunError`
* `journal.run_meta`
* `JournalEvent`
* `journal.delete_run`
* `journal.open_run`
* `journal.close_run`

## Used By

* [`import_run_json`](../functions/import_run_json)

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/portable.py#L85)**
>
> `praisonaiagents/runtime/portable.py` at line 85


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