Metadata-Version: 2.4
Name: persisting
Version: 0.3.1
Summary: Durable Agent trajectory processing, storage, and query infrastructure
Author: reiase
License-Expression: Apache-2.0
Project-URL: Homepage, https://deeplink-org.github.io/Persisting/
Project-URL: Documentation, https://deeplink-org.github.io/Persisting/
Project-URL: Repository, https://github.com/DeepLink-org/Persisting
Project-URL: Issues, https://github.com/DeepLink-org/Persisting/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pulsing
Requires-Dist: tensordict>=0.6.0
Provides-Extra: lance
Requires-Dist: lance>=0.9.0; extra == "lance"
Requires-Dist: pyarrow>=14.0.0; extra == "lance"
Provides-Extra: all
Requires-Dist: persisting[lance]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Dynamic: license-file

# <img src="docs/static/img/logos/persisting-icon.png" alt="Persisting" width="72" /> Persisting

**Persistent infrastructure for the Agent era.**

[![CI](https://github.com/DeepLink-org/Persisting/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepLink-org/Persisting/actions/workflows/ci.yml)
[![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://deeplink-org.github.io/Persisting/)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

<img src="docs/static/img/logos/persisting-with-text.png" alt="Persisting logo" width="360" />

Persisting contains **pChronicle**, which imports, browses, queries, exchanges,
and serves durable Agent trajectory Datasets.

<img src="docs/static/img/logos/pchronicle-with-text.png" alt="pChronicle" width="220" />

## Install

```bash
pip install persisting[lance]
pchronicle --version
```

The rolling nightly build installs the same commands without a Rust toolchain:

```bash
curl -fsSL https://raw.githubusercontent.com/DeepLink-org/Persisting/main/scripts/install-nightly.sh | bash
```

See the [installation guide](https://deeplink-org.github.io/Persisting/installation/)
for supported platforms and setup.

## Query Agent trajectory history

```bash
pchronicle onboard
pchronicle onboard query
pchronicle agent codex ./trajectory-data --ask "Which tools fail most often?"
```

The onboarding flow creates a temporary example Dataset—no source checkout
required. `pchronicle import` accepts ATIF, ACTF, and OpenAI Messages;
`pchronicle serve` starts a loopback-only, read-only Dataset UI and API.

## Current maturity

| Capability | Status |
|---|---|
| pChronicle local/S3 catalog, bounded SQL, analysis, find, import/export | Implemented |
| pChronicle loopback-only read API and embedded Web UI | Implemented |
| Queue and document Search | Separate stable capabilities |
| Tensor Memory / TTAS | Experimental |

## Documentation

- [Choose a workflow](https://deeplink-org.github.io/Persisting/overview/) — pick the entry point that matches your task
- [Explore durable history](https://deeplink-org.github.io/Persisting/pchronicle/get-started/) — browse and query a trajectory Dataset
- [Project architecture](https://deeplink-org.github.io/Persisting/system-design/) — ownership and delivery boundaries

Criterion.rs microbenchmarks and hyperfine lifecycle scenarios are compared
against `main` in CI; see the [benchmark contract](benchmark/pchronicle/README.md).

<!-- pchronicle-benchmark:start -->
Latest nightly pChronicle benchmark: `9502e5f40dbe` on `linux/x86_64` (2026-11-29T03:04:55.175407+00:00).

| Case | Metric | Value |
|---|---:|---:|
| `criterion/atif_conversion/parse_corpus` | `latency_median_ns` | 5.147e+06 ns |
| `criterion/atif_conversion/roundtrip_corpus` | `latency_median_ns` | 6.996e+06 ns |
| `system/lance_vs_json/lifecycle` | `cold_query_ms` | 2897.685 ms |
| `system/lance_vs_json/lifecycle` | `get_storyline_full_ms` | 9.984 ms |
| `system/lance_vs_json/lifecycle` | `replace_storyline_ms` | 43.432 ms |
| `system/lance_vs_json/selective` | `lance_qps` | 302.4 ops/s |
| `system/lance_vs_json/group_by` | `lance_qps` | 436.8 ops/s |
| `system/lance_vs_json/summary` | `lance_over_json` | 0.244 ratio |
| `system/json_streaming_ndjson/json_streaming` | `p95_ms` | 13.442 ms |
| `system/json_streaming_ndjson/json_streaming` | `rows_s` | 3.018e+05 ops/s |
| `system/json_streaming_ndjson/json_streaming` | `process_peak_rss_mib` | 49.953 MiB |
| `hyperfine/lance_vs_json` | `wall_median_seconds` | 39.011 s |

[Open the complete benchmark run](https://github.com/DeepLink-org/Persisting/actions/runs/46218579925).
<!-- pchronicle-benchmark:end -->

## License

[Apache License 2.0](LICENSE). See [`NOTICE`](NOTICE) for third-party
attributions and separately licensed bundled components.
