pgx
AI 에이전트를 위한 경량 Postgres, Rust로 구현, 하나의 런타임에서 수천 개의 격리된 데이터베이스 제공
에이전트 데이터 작업을 위한 결정론적 원장
Deterministic ledger for agentic data work.
데이터Python · NixGitHub @xorq-labs직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗
Xorq is three interlinked things, plus the interfaces built on them.
Interfaces on top serve different kinds of users. The CLI doubles as the
headless mode for agents, and xorq catalog tui is the view for humans.
Below, the ten-entry ledger of an insurance pricing pipeline from A Commit vs. a Ledger Entry. The selected entry is the scored test set: its lineage runs through three fitted models down to the two source reads, next to its schema and a git log with one commit per change.
On DABStep, 450 data-analysis questions over payment transaction data, a Xorq ledger of 33 named expressions takes Haiku from 50% to 84%, 9 points above the Sonnet baseline (Orientation Over Reasoning).
One metric question, 100 runs per configuration (Faithful, Reproducible, Wrong). Two of the post's nine configurations, both Haiku running with Xorq, differing only in whether a reviewed definition of the metric was preloaded:
| Re-derived from source files | Selected from a reviewed entry | |
|---|---|---|
| Correct | 0 of 100 | 100 of 100 |
| Median turns | 21 | 4 |
| Cost per run | $0.09 | $0.02 |
❯ pip install "xorq[examples]"
❯ xorq init -t penguins && cd xorq-template
❯ xorq uv build expr.py
builds/4c915297a711
❯ xorq catalog init
Initialized catalog at ~/.local/share/xorq/catalogs/default
❯ xorq catalog add builds/4c915297a711/ -a penguins-predict
Added 4c915297a711
❯ xorq catalog run penguins-predict -o out.parquet
Build turns an expression into a directory named by its hash, holding the
manifest, the project wheel, and pinned requirements. Add puts that directory
in the ledger under its hash and an alias. Run executes the entry in the
environment it pins. The template's build needs Python 3.11 or newer; if uv
picks a 3.10 interpreter, set UV_PYTHON_PREFERENCE=only-managed.
Xorq expressions support caching, multi-engine execution, and UDFs. xo._
is the row reference, so xo._.species is the species column of the current
table.
import xorq.api as xo
penguins = xo.examples.penguins.fetch()
expr = (
penguins
.filter(xo._.species.notnull())
.group_by("species")
.agg(avg_bill_length=xo._.bill_length_mm.mean())
)
.cache(xo.ParquetCache.from_kwargs()) materializes any node.
.into_backend(xo.duckdb.connect()) moves its data to another engine. The
same expression runs on DataFusion, DuckDB, SQLite, pandas, Snowflake,
Databricks, BigQuery, Trino, Postgres, PyIceberg, and GizmoSQL. Operators
exchange Arrow RecordBatches, with no DAG of tasks to checkpoint.
xo.Pipeline.from_instance turns a scikit-learn pipeline into a deferred
expression.
The ledger is a git repo on the filesystem, which the CLI calls a catalog. Aliases are symlinks, entries are zipped builds, and metadata sidecars are plain YAML, so an agent that clones it can discover everything with file operations. The hashes below come from one build and will not match yours:
❯ tree git-catalogs/penguins
git-catalogs/penguins
├── aliases
│ └── penguins-agg.zip -> ../entries/b45d9db8189a.zip
├── catalog.yaml
├── entries
│ └── b45d9db8189a.zip
└── metadata
└── b45d9db8189a.zip.metadata.yaml
❯ git -C git-catalogs/penguins log --format=%s
add: b45d9db8189a (aliases penguins-agg)
add catalog.yaml
initial commit
An entry is a manifest plus the environment to run it. The manifest is the
content-addressed specification of the pipeline: one node per operation, each
referenced by hash, with schema, lineage, and inputs read straight off it.
The wheel and pinned requirements.txt next to it make the entry portable to
another sandbox, your machine, or production.
definitions:
nodes:
'@read_dbd8d81198f1':
op: Read
method_name: read_parquet
name: penguins
schema_ref: schema_11039d461f5b
'@filter_f7eedc0c6f85':
op: Filter
parent: { node_ref: '@read_dbd8d81198f1' }
predicates:
- { op: NotNull, arg: { op: Field, name: species, ... } }
'@aggregate_b45d9db8189a':
op: Aggregate
parent: { node_ref: '@filter_f7eedc0c6f85' }
by:
species: { op: Field, name: species, ... }
metrics:
avg_bill_length: { op: Mean, arg: { op: Field, name: bill_length_mm, ... } }
expression:
node_ref: '@aggregate_b45d9db8189a'
schema_ref: { schema_ref: schema_cdf21e46eb8a }
Verbs that act on an entry take its hash or an alias such as prod. The ones
that produce a pipeline (pin, rebase, compose) write it back as a new entry;
entries are never edited in place, though aliases can move. Writes push the
catalog to its remotes by default.
❯ xorq catalog run prod -o out.parquet # execute in the entry's pinned environment
❯ xorq catalog run-cached prod -o out.parquet # run, wrapping the result in a parquet cache
❯ xorq catalog check # entries, aliases and metadata agree with disk
❯ xorq catalog check-sources prod # did a source schema drift? reports, never repairs
❯ xorq catalog rebase prod # rebuild over drifted source schemas as a new entry
❯ xorq catalog pin prod -e --alias prod-pinned # materialize and freeze the caches as a new entry
❯ xorq catalog compose src transform -a pipeline # source entry + unbound transform entry, as one
❯ xorq serve-flight-udxf builds/<hash> # serve a build's UDXF nodes over Arrow Flight
A UDXF is how arbitrary compute joins the system: a Python function that takes an Arrow table and returns one, run in its own process behind Flight, named and cataloged like any other node. See User-Defined Exchange Functions.
Pre-1.0. Expect breaking changes with migration guides.