Skip to main content

Okto Grafx

Embedded, local-first graph database for Python, with concurrent readers and writers, snapshot isolation, WAL-backed durability, verification and fail-closed recovery. No database server is required. The base installation includes NumPy and native CRC-32C; engine/domain mechanisms remain isolated behind ports.

Source version: 0.0.5 development, pre-alpha. This describes the checked-out source, not a claim that 0.0.5 is already published on PyPI. API and persistent-format compatibility must be checked before upgrading; see operations.

Install and start

Python 3.11–3.13; local Windows and POSIX filesystems.

pip install okto-grafx

This installs the release available from your configured package index. For this source revision, use pip install -e ".[dev,accel]" in a checkout. okto-grafx is the distribution name; okto_grafx is the Python import; oktografx is the CLI. In this 0.0.5 development revision, native CRC-32C and NumPy are base dependencies. The [accel] name remains a compatibility alias. New connections default to codec="numpy", vector_math="numpy" and checksum="auto". Explicit pure selectors remain available; vector auto retains its existing pure semantics. Earlier published releases may still require [accel] and explicit NumPy selectors.

from okto_grafx import connect

with connect(":memory:") as db:
    with db.begin("write") as txn:
        txn.execute("CREATE NODE TABLE Person(id INT64, name STRING, PRIMARY KEY(id))")
        txn.execute("CREATE (:Person {id: $id, name: $name})", {"id": 1, "name": "Ada"})
    result = db.execute("MATCH (p:Person) RETURN p.id, p.name")
    assert result.rows == ((1, "Ada"),)

Use a directory instead of :memory: for persistent data. db.execute() is a read-only autocommit door; writes use explicit transactions. A normal transaction context exit commits, and an exceptional exit rolls back. See the integration tutorial for relationships and durable reopen.

What is available

Capability Consumer documentation
Opt-in sparse hash directories, bounded repeated-key decoding and indexed retired-page discovery (0.0.5 development) Index layouts, operations
Explicit trusted typed scalar UDFs and optional scalar/vector Arrow batch import/export (0.0.5 development) Extensions and Arrow, compatibility evidence
Explicit Arrow-backed Pandas/Polars frames and bounded local Parquet import/export (0.0.5 development) Tabular interoperability
Typed bounded local CSV/JSONL readers and whole-call atomic import staging (0.0.5 development) Local text ingestion
Detached NetworkX multigraph and node/edge/result Arrow batch export (0.0.5 development) Graph exchange
Bounded prefix search and full-text over relationship properties (0.0.5 development) Full-text options and upgrade contract
Batched weighted projections; reusable identity/CSR/transition/simple topology, WCC/SCC, BFS/Dijkstra, personalized PageRank with opt-in NumPy, linear k-core and label propagation (0.0.5 development) Graph projections, scan contract
Configurable repeated-key cache, batched sparse heads and aggregate HNSW admission (0.0.5 development) Memory and maintenance
Multi-process/multi-thread access, snapshot transactions, optimistic conflicts and writer fencing Concurrency and recovery
Typed nodes/relationships, parameters, writes, traversal, aggregates, limited OPTIONAL MATCH and UNION Supported query language
Atomic executemany, streaming results and snapshot-bound physical scan cursors Integration recipes
Automatic PK/endpoint/identity indexes; custom hash/ordered indexes; foreground rebuild/rehash Indexes and vectors
Exact and approximate vector search with declared space, metric and precision Indexes and vectors
Native full-text indexes, versioned analyzers, weighted BM25 and bounded snapshot search (0.0.5 development) Full-text search
Snapshot-consistent weighted RRF text/vector fusion with bounded graph evidence (0.0.5 development) Hybrid search
Indexed hybrid BFS, aggregate search-memory diagnostics and cooperative vector controls; opt-in durable FTS totals (0.0.5 development) Hybrid contracts, FTS modes
Per-picture HNSW memory admission/diagnostics and bounded durable historical FTS totals (0.0.5 development) Vector memory, historical totals
Explicit hash directories up to 65,536 buckets and bounded, key-private skew diagnostics (0.0.5 development) Index sizing
Versioned additive application migrations, checksum ledger and read-only dry-run (0.0.5 development) Schema migrations
Opt-in durable commit provenance, qualified lookup and snapshot-paged history (0.0.5 development) Commit history
Query/transaction budgets, optional spill, acceleration and metrics All configuration fields
Verification, evidence ledger/quarantine, recovery/checkpoint, manual vacuum and WAL compression Operations
Bounded physical backup and verified offline replacement restore (0.0.5 development) Backup and restore
Streaming logical export/import, opt-in crash resumption, fresh identities and verified promotion (0.0.5 development) Logical transfer
Cooperative read cancellation/deadlines and quiescent orphan-index inventory/removal (0.0.5 development) Read control and cleanup
Embedded Python, machine-readable CLI, configurable ports/adapters API, CLI, ports

Concurrent transactions do not imply lock-free commits: publication has an exclusive section, different rows can conflict on physical pages, and operations may wait or time out. Recovery repairs only states that the WAL and durable identity prove safe; it does not silently rebuild or discard damaged authoritative data.

There is no native async/HTTP/MCP server, SQLAlchemy backend, public time-travel API or no-pause streaming hot-backup API in this release surface. Proposed capabilities are explicitly separated in the roadmap.

Current measured performance

Latest recorded real-consumer sample: September 8, 2026, Grafx 0.0.4@fa8f188 with [accel], Pulse 0.3.3, Windows/Python 3.13. This is not a benchmark of the later GX-CAP-1 recovery checkpoint or a universal latency promise.

Operation / workload Observed time Boundary
Consolidation commit, 11 new nodes / 22 edges 10.726 s Full Pulse MCP call, not native commit only
Global delivery of that commit 54.952 s Outbox creation to processed ACK; includes scheduling/verification
Exact readback of the 11 nodes 0.376 s MCP call; executor 91.1 ms
Readback of 11 judgement links / 11 source links 0.408 / 0.182 s Separate MCP calls
Exact-title natural retrieval 2.709 s One query; not broad-query recall/latency

These are one-sample observations, not p50/p99 statistics or an identical-input comparison with Ladybug. Latest full KG UI cold/warm latency at the current source checkpoint is not measured. Native component measurements and their limitations are in performance; no marginal timing gate blocks delivery.

Documentation

Start with the documentation index. It separates tutorials, consumer references, operational procedures, implementation specifications and historical evidence; integrating the library does not require reading the latter.

Deployment and license

The host application owns authorization, input policy and filesystem permissions. Do not place live database files on cloud-sync/network filesystems or replace them while participants are using them. OpenMetrics has no authentication/TLS; remote binding requires explicit consent. See operational safety.

Licensed under Elastic License 2.0 with the SaaS/Branding Addendum. Check those terms before offering a hosted service.

Metadata

Release files for okto-grafx 0.0.5

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

Built distribution (wheel)

Table of built distributions (wheels) for okto-grafx 0.0.5
File Interpreter ABI Platform
okto_grafx-0.0.5-py3-none-any.whl Python 3 none any Details

Release files / okto_grafx-0.0.5-py3-none-any.whl

Download URL okto_grafx-0.0.5-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4f09d7e3ba1b8c7b716aa0b278bea2f39428db68fea71b27f56521f3b4bffcc5
BLAKE2b-256 checksum
How to use checksums
b7bc2ea06ab9ff1be54c60e93359a57f3a5ed97deee525073d352b8cd156b5f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

0.0.7

2 release files

0.0.6

2 release files

This release

0.0.5 This release

1 release file

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

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