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

# Record Completed Run • AI Agent SDK

> record_completed_run: Persist a pointer to the trace file of the just-completed run.

# record\_completed\_run

Function

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

Persist a pointer to the trace file of the just-completed run.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def record_completed_run(trace_path: Any, meta: Optional[Dict[str, Any]]) -> Path
```

## Parameters

**trace\_path** `Any` *required*

Path to the trace artifact (JSON or JSONL).

**meta** `Optional`

Optional run metadata (agent name, status, etc.).

### Returns

**Returns** `Path`

The path the pointer was written to.

## Uses

* `resolve`
* `Path`
* `time.time`
* `last_run_pointer_path`
* `json.dumps`

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/last_run.py#L60)**
>
> `praisonaiagents/trace/last_run.py` at line 60


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