') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - DeepLink-org/Persisting: Persistent Storage for Parameters, KV Cache, and Trajectories · GitHub
Skip to content

Repository files navigation

Persisting

Persistent infrastructure for the Agent era.

CIDocumentationLicense: Apache-2.0

Persisting connects durable model state—parameters and KV caches—with durable Agent history—trajectories and execution records. The current product is the path from execution to queryable history:

  • pvisor is an executor that produces persistable, reviewable facts: staged Effects and execution records from one Agent Run;
  • pchronicle browses, queries, exchanges, and serves trajectory Datasets.

Each command works on its own. Connected, they cover pvisor run --safe → review/apply → configured capture → a queryable Dataset.

Current Persisting workflows and the execution-to-history throughline

Install

pip install persisting[lance]
pvisor --version
pchronicle --version

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

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

See the installation guide for platform requirements and executor setup.

Run one Agent and review its changes

pvisor run --safe codex
pvisor review last
pvisor apply last --all # or: pvisor drop last

--safe stages workspace changes; nothing enters your project tree before you accept it. The exact boundary is platform-dependent and recorded with the Run—consult the execution guide before treating it as a security boundary.

Query Agent trajectory history

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.

After capture is configured, selected pVisor Run events can enter a pChronicle Dataset. See the capture guide.

Current maturity

CapabilityStatus
pVisor host execution, review, checkpoints, and transactional workspaceImplemented
pChronicle local/S3 catalog, bounded SQL, analysis, find, import/exportImplemented
pChronicle loopback-only read API and embedded Web UIImplemented
Gateway capture and cooperative proxy policyImplemented
Container/libkrun executors and transparent network boundariesPlatform-dependent; see the pVisor and OverlayNet docs
Queue and document SearchSeparate stable capabilities
Tensor Memory / TTASExperimental

Documentation

Criterion.rs microbenchmarks and hyperfine lifecycle scenarios are compared against main in CI; see the benchmark contract.

Latest nightly pChronicle benchmark: 819a818a6a77 on linux/x86_64 (2026-08-31T06:59:25.611024+00:00).

CaseMetricValue
criterion/atif_conversion/parse_corpuslatency_median_ns4.153e+06 ns
criterion/atif_conversion/roundtrip_corpuslatency_median_ns5.535e+06 ns
criterion/projection_cpu/events_to_storyline_corpuslatency_median_ns2.462e+05 ns
system/projection_pipeline/event_appendinitial_append_ms66.845 ms
system/projection_pipeline/projection_buildbuild_ms4949.119 ms
system/projection_pipeline/projection_incrementalsync_ms37.92 ms
system/lance_vs_json/lifecyclecold_query_ms3034.517 ms
system/lance_vs_json/lifecycleget_storyline_full_ms8.474 ms
system/lance_vs_json/lifecyclereplace_storyline_ms39.607 ms
system/lance_vs_json/selectivelance_qps384.7 ops/s
system/lance_vs_json/group_bylance_qps521.8 ops/s
system/lance_vs_json/summarylance_over_json0.244 ratio
system/json_streaming_ndjson/json_streamingp95_ms10.516 ms
system/json_streaming_ndjson/json_streamingrows_s3.98e+05 ops/s
system/json_streaming_ndjson/json_streamingprocess_peak_rss_mib36.844 MiB
hyperfine/projection_pipelinewall_median_seconds5.083 s
hyperfine/lance_vs_jsonwall_median_seconds39.421 s

Open the complete benchmark run.

License

Apache License 2.0. See NOTICE for third-party attributions and separately licensed bundled components.

About

Persistent Storage for Parameters, KV Cache, and Trajectories

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages