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

# JSONLEventSink

> The JSONL half of the evidence: two append-only files in one directory (SPEC §6).

`ctrlrun.JSONLEventSink` — class, defined at `src/ctrlrun/receipt.py:429`

```python theme={null}
class JSONLEventSink()
    def __init__(directory: str | os.PathLike[str])
```

The JSONL half of the evidence: two append-only files in one directory (SPEC §6).

`receipts.jsonl` and `events.jsonl` beside the state database, so `.ctrlrun/` holds the
whole record of what an agent did. The store is authoritative — these files are the
portable copy, written after the store accepted the same record.

Each write opens, appends one line and closes, so several processes sharing a store
(SPEC-v0.1 §5.3 E1) interleave whole lines rather than fragments of them.

SPEC-v0.2 §4.3 — this used to live inside `SQLiteStateStore`, which wrote both halves.
`Control` owns it now, as one `EventSink` among however many an application registers.
The files it writes, and where, are unchanged.

## Next

* [Python API index](/reference/api/index).
* [Get started](/get-started/quickstart) · [Why](/why).


## Related topics

- [Receipts and evidence](/concepts/receipts-and-evidence.md)
- [Claims](/CLAIMS.md)
- [Python API](/reference/api/index.md)
- [EventSink](/reference/api/EventSink.md)
- [OTelEventSink](/reference/api/otel-OTelEventSink.md)
