@mastra/core
Version:
32 lines (19 loc) • 796 B
Markdown
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
**Added in:** `@mastra/core@1.4.0`
Retrieves a specific experiment (run) by its ID.
## Usage example
```typescript
import { Mastra } from '@mastra/core'
const mastra = new Mastra({
/* storage config */
})
const dataset = await mastra.datasets.get({ id: 'dataset-id' })
const experiment = await dataset.getExperiment({ experimentId: 'exp-id' })
console.log(`Status: ${experiment.status}`)
console.log(`${experiment.succeededCount}/${experiment.totalItems} succeeded`)
```
**experimentId** (`string`): ID of the experiment to retrieve.
**result** (`Promise<Experiment>`): The experiment record. See dataset.listExperiments() for the full shape.