Skip to main content

matrx-records

The records server: the record read/write paths, the eight agent verbs and their generated tool cache, the merge-field resolver and its provenance writer, and the record workflow nodes.

It is imported by the app and never imports it. It talks to the database only through matrx-orm, and only through the custom.* store's own doors, under the operating person's own principal — there is no agent identity and there are no service roles.

from matrx_records import Principal, RecordStore

store = RecordStore(Principal(user_id=uid, organization_id=org, claims=jwt_claims))
tables = await store.table_list()

Host wiring is one call at startup:

from matrx_records import configure_records
configure_records(database="supabase_automation_matrix", session_factory=my_act_as_user)

The scope system, read from the store (SCOPES-READS-SERVER)

Every server reader of scopes reads matrx_records.store.scopes.ScopeReader — never the old context.* tables. A scope type is a Table the context system keeps, a scope a Record of it, a context item a Field; the reader answers in the old column names:

from matrx_records.store.scopes import ScopeReader

reader = ScopeReader.for_ambient(user_id=uid)          # the operating person, or the run's person
types = await reader.types(org_ids)                     # lists: the contract RPCs, one statement
scopes = await reader.scopes(org_ids, type_ids=[tid])
docs = await reader.scope_documents([org], type_ids=[tid])  # every Record WITH its values
one = await reader.scopes_by_id([sid])                  # by id, in whichever org it opens in
items = await reader.items(org, [tid])                  # Fields, with the old value_type word

Values kept as files are read whole with ScopeReader.whole_value(scope, key). The old scope tables are retired (2026-10-05); the store is the only writer, so there is nothing to compare against.

The server half — routing an existing record path (CUT-N-13)

An aidream path that reads or writes records asks the gateway, and the gateway decides per caller: the record store when custom/system_enabled resolves on for that person's organization, the path's own existing body when it does not.

from matrx_records.server import route_read

rows = await route_read(
    source="context.scopes",                       # the legacy relation
    match={"id": scope_id},
    legacy=lambda: Scopes.filter(id=scope_id).values("id", "name"),
)

legacy is the OFF arm, so today's behavior is unchanged while the knob is false and it is impossible to route a path without naming what it used to do. The ramp is per SOURCE: the switch says the organization keeps its data in the store, not that every relation has moved, so a source with no Table of its own slug is not adopted yet and keeps reading and writing today's tables — the Route says so, with the remedy. Only a source whose Table exists resolves through the store (RecordsGateway.route_for; feedback f35b12ec). attrs=True when the legacy arm hands back model instances; RecordsGateway.read_joined(...) for a path whose legacy arm is a SQL JOIN across two record-bearing relations.

Which paths those are is a query, never a list:

from matrx_records.server import the_enumeration

for path in await the_enumeration():
    print(path.relative_path, path.sources, path.routed)

It intersects matrx-orm's model registry with platform.deprecated_relations (the platform's own supersession register) and then reads the repository's import graph. tests/test_server_paths_against_the_store.py is parametrized over it, so a path nobody repointed fails by name and a legacy relation declared tomorrow pulls its paths in with no code change.

The outside door's verbs (TABLE-API-1, 2026-09-29)

The table API and the AI Matrx MCP (aidream services/table_api) reach the store only through these, as the person: table_read (a Table's words, Fields and choice options), record_page (custom.read_records_page: filter, search, sort, page, total), record_headers_of (version and timestamps), table_of, records_holding (ids per key value, one statement), record_change_many and record_upsert (one transaction; advisory lock on the key; a person's verb, or an agent's only with change_approval saying nobody is asked) and record_archive (a person's archive / restore; an agent uses record_delete, which asks first).

Metadata

Release files for matrx-records 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrx-records 0.1.12
File Size Uploaded Provenance
matrx_records-0.1.12.tar.gz 677.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for matrx-records 0.1.12
File Interpreter ABI Platform
matrx_records-0.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / matrx_records-0.1.12.tar.gz

Download URL matrx_records-0.1.12.tar.gz
Size 677.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c54b778a5dd60684853380a842c42dcf0e8e8dba8e3108e54287f203981da87
BLAKE2b-256 checksum
How to use checksums
0030c649409f95316e795ef315e772fc6ec732ea17d7906d46608e42eff24ed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / matrx_records-0.1.12-py3-none-any.whl

Download URL matrx_records-0.1.12-py3-none-any.whl
Size 459.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02a2b257e7b72d61e36fcc4340ad9882b7a0f157973a760b06d7a05820f16084
BLAKE2b-256 checksum
How to use checksums
db309df67e613d4790299661179c807a3098dab2bbd1ffaeceac461b9b96d0c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for matrx-records 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matrx_records-0.1.12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page