# TrajectoryLogger

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/tracing/trajectory-logger.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/tracing/trajectory-logger.ts#L46)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `attach` | `attach(session: AttachableSession)` | `void` |
| `record` | `record(event: string, data: Record<string, unknown>)` | `void` |
| `getEntries` | `getEntries()` | `TrajectoryEntry[]` |
| `toJSONL` | `toJSONL()` | `string` |
| `flush` | `flush()` | `void` |
| `clear` | `clear()` | `void` |

## Where it refuses work

- `TrajectoryLogger` stops the work with an early return when `e.delta`.
- `TrajectoryLogger` stops the work with an early return when `!this.config.outputPath`.
- `TrajectoryLogger` stops the work with an early return when `this.flushedCount >= this.entries.length`.
