Skip to main content

Atlas AI data services

This change delivers all nine proposed AI data workflows together as the atlas_data Python companion service, CLI and SDK. It uses real files, SHA-256 content chunks, a durable SQLite catalog (or Postgres, below), application verification processes, and optional Apache Iceberg/Parquet. It does not change Atlas Native's format or the Rust gateway.

Status: experimental, local verification only; one service process by default, several replicas with a Postgres catalog. This is a working first implementation, not production parity with ONTAP or a performance claim.

Capability and boundary​

WorkflowImplementedBoundary
Shared model cacheImmutable model revisions, deduplicated 4 MiB chunks per tenant, resumable chunk uploads, verified exports, shared worker chunk cache, pinned placementsNo Hugging Face proxy or peer-to-peer transport; re-running ingest resumes by deduplicating chunks already uploaded
Data-ready schedulingLabel/health/capacity filtering, transfer-time ranking, transactional reservations, readiness gate, stage worker, lease renew/releaseExternal scheduler must use DataReadyGate; JobController/NodeAgent (unit tested with a fake Gryvia adapter); HttpGryvia speaks Gryvia's REST gateway (contract-tested against a local fake, not run against a live Gryvia); no Kubernetes scheduler plugin
Agent workspacesCopy-on-write manifests, path overlays/tombstones, optimistic generations, byte/time budgets, review, selective publication, discardBranch is a virtual file manifest, not an OS sandbox or writable FUSE mount; export published artifacts into FluxVM separately
Permission-aware data accessTenant and subject identity from credentials, artifact ownership, live ACL revocation across revisions, filename/name search, authorized chunk retrieval, audit trailSource POSIX ACLs are imported on request with acl-sync (below), not continuously; no AD/SMB/NFSv4 ACL synchronization, semantic embeddings, OCR or vector database
Inference context cacheExact compatibility keys, subject isolation, TTL, 64 MiB subject budget with LRU eviction, byte-block SDKBlocks <=4 MiB, no tensor conversion, NIXL transport, GPU residency; KVConnector is untested against vLLM/MLX; adapter required in serving runtime
Dataset releasesImmutable file manifests and checksums, provenance, metadata-only branches, revision diff, verified exportsA release captures uploaded files, not an automatically quiesced database; use existing atlas_recovery for coordinated live capture
Application-verified recoveryIsolated temporary restore, all-file checksum validation, allowlisted verification process, deadline, durable pass/fail evidence, latest verified releaseHook must actually start/check/stop its application; no isolation from a malicious trusted hook, no malware-clean certification; snapshot age is not measured RPO
Per-job storage costsTrusted collectors, integer micro-USD estimates, idempotent measurements, per-meter/job totals, placement transfer estimatesUser-configured rates and measurements, not a cloud invoice or automatic eBPF attribution; compute cost is excluded
Iceberg managementReal SQL catalog and Parquet, typed schemas, optimistic snapshot checks, append/read, bounded compaction, retained snapshot history, metadata expirationOptional dependency; admin-only local warehouse. No standard Iceberg REST catalog, S3 warehouse configuration, distributed compaction, automatic scheduling or online orphan-file deletion

Importing a source ACL​

acl-sync sets an artifact's readers from the POSIX ACL of the directory it came from, so access in Atlas follows the file server instead of being typed in twice. It is a command you run, on a schedule if you want (a Kubernetes CronJob), not a background sync.

getfacl models/llama > llama.acl
echo '{"user:bob": "bob-agent", "group:ml": ["carol", "dan"]}' > map.json
python3 -m atlas_data acl-sync ARTIFACT_ID --getfacl llama.acl --map map.json # shows the change
python3 -m atlas_data acl-sync ARTIFACT_ID --getfacl llama.acl --map map.json --apply # sets the readers

Rules, all of them fail closed:

  • Only principals you name in the map become readers; any other user or group is listed under dropped and gets no access. Atlas does not look users up or resolve group membership: a group entry maps to the subjects you list for it.
  • An entry counts only if its effective permission (after the ACL mask) includes read.
  • other::r-- is reported in notes and never expanded to subjects. default: entries are ignored.
  • The command replaces the reader list; the owner is unchanged. It needs the artifact owner's or an admin's credential.
  • Not covered: NFSv4 and SMB ACLs, automatic refresh, group membership changes (re-run the command) and S3 policies.

Unit tested (tools/atlas_data/tests/test_acl_sync.py) on getfacl text; not yet run against a live file server.

Postgres catalog (several replicas)​

The catalog is SQLite in --root unless ATLAS_DATA_DATABASE_URL=postgres://... is set (an environment variable, not a flag, so the password stays out of the process list). Then metadata, the audit trail and the cost ledger live in Postgres, and write transactions are serialised across replicas by a transaction advisory lock, so reservations, quotas and capacity checks cannot be overcommitted by two replicas racing. Needs pip install 'psycopg[binary]'.

What it does not do: chunk bytes stay files under --root, so replicas must mount the same ReadWriteMany volume (an Atlas filesystem works) or they will not see each other's chunks. Postgres availability and backups are yours. Writes are serialised on one lock, which is correct but caps write concurrency; no throughput figure is claimed.

Verified on 2026-11-01: the whole test suite passes against a throwaway Postgres 16 on the lab (scripts/atlas-data-postgres-remote.sh), including a test with two Store replicas racing ten reservations for one slot (exactly one wins). Not run: more than two replicas, a Postgres failover, a shared network volume.

Install and start​

Python 3.11+; core service and tests use only the standard library. Iceberg is optional:

python3 -m venv /tmp/atlas-data-venv
. /tmp/atlas-data-venv/bin/activate
pip install -r tools/atlas_data/requirements-iceberg.txt
export PYTHONPATH=tools
export ATLAS_DATA_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(48))')"
python3 -m atlas_data token-hash

Store the printed SHA-256 value in a private configuration file. Do not use the literal placeholder below as a real credential hash:

{
"credentials": [
{
"tenant": "acme",
"subject": "operator",
"role": "admin",
"token_sha256": "REPLACE_WITH_TOKEN_SHA256"
}
],
"recovery_profiles": {}
}
chmod 600 /etc/atlas-data/config.json
python3 -m atlas_data serve --root /var/lib/atlas-data \
--config /etc/atlas-data/config.json --capacity-bytes 107374182400

HTTP is accepted only on loopback. For remote nodes, supply --host 0.0.0.0 --cert /etc/atlas-data/tls.crt --key /etc/atlas-data/tls.key; clients use --url https://data.example:5120 --ca /etc/atlas-data/ca.crt. Redirects are refused.

Tokens stay in ATLAS_DATA_TOKEN, not CLI arguments. The server reads hashed credentials at startup. Remove a credential and restart to revoke it. Optional expires_at is a Unix timestamp checked on every request, for short-lived agent credentials. Each credential binds exactly one tenant, subject and role. Admin permissions apply only inside that tenant. Use distinct subjects for agents; never give an agent or training pod the trusted node-worker admin credential.

Model/dataset lifecycle​

python3 -m atlas_data ingest model llama model-sha ./weights
python3 -m atlas_data ingest dataset training release-001 ./dataset
python3 -m atlas_data export ARTIFACT_ID ./verified-output

Ingest returns an artifact ID. Files are chunked and verified against their full SHA-256 before publication. Repeating a revision is a 409 conflict. Upload chunks can be retried safely; a new revision references shared content instead of copying it. Deduplication is scoped per tenant to avoid cross-tenant data discovery.

An artifact ID identifies a named immutable revision; checksums inside its manifest identify file contents. ACLs are separate mutable records: granting/revoking readers applies to every revision of a named model/dataset. An operator may branch an accessible artifact under a new name, but only its owner/admin may add a revision to the original name. Published derivatives have their own ACL; revocation does not erase data a previously authorized reader already copied or published.

To search, write JSON arguments to a file and call the action:

python3 -m atlas_data call artifacts.list --json examples/data/search.json

API and CLI actions​

All actions are POST /v1/rpc/ACTION with a JSON object, bearer authentication, and Content-Length. A mutation and its audit event commit together except Iceberg, whose own atomic catalog commit is separate from Atlas audit persistence. A crash between those commits may leave a completed Iceberg mutation without an Atlas audit row. Successful replies are JSON; failures have HTTP 400/401/403/404/409/413/422/507. Optional-component failure can return 503; unexpected library failures return 500.

ActionArguments
artifacts.publishkind, name, revision, files, optional readers, provenance
artifacts.listoptional query
artifacts.getkey
artifacts.diffleft, right
artifacts.readerskey, readers
nodes.heartbeatnode, capacity, bandwidth, labels (admin)
nodes.stagednode, artifact_id (trusted admin worker)
nodes.invalidatenode, artifact_id (admin; immediately clears readiness after corruption/loss)
nodes.evictnode, artifact_id (admin; refuses active reservations)
jobs.reservejob, artifacts, optional labels, reserve
jobs.statusjob
jobs.renewjob, optional ttl (1–3600 seconds)
jobs.releasejob
workspaces.createbase, ttl (1–86400 seconds), budget (changed logical bytes)
workspaces.changekey, generation, name, entry (file entry or null for delete)
workspaces.reviewkey
workspaces.publishkey, generation, name, revision, selected
workspaces.discardkey
kv.putcompatibility, data (base64), ttl
kv.getcompatibility
recovery.drillartifact, profile, optional rto_seconds (1–600; admin)
recovery.latestname (admin)
costs.ratemeter, micros per million meter units (admin)
costs.meterevent, job, meter, units (trusted admin collector)
costs.reportjob (owner/admin)
costs.estimateartifacts
iceberg.createname, fields (admin)
iceberg.describename (admin)
iceberg.appendname, rows, expected_snapshot (admin)
iceberg.rowsname, optional limit (admin)
iceberg.compactname, expected_snapshot, optional max_bytes (admin)
iceberg.expirename, older_than_seconds, optional retain_last (admin)
audit.listoptional run_id (admin; last 1000 tenant events, each with its run_id)
storage.gcnone (admin)

Run id: any call may carry an agent run id, as the X-Atlas-Run-Id header or a run_id field in the action body (1 to 64 characters of [A-Za-z0-9_.:-], starting with a letter or digit; both given must agree; an invalid one is a 400). It is stored in the run_id column of every audit event the call writes (events.run_id, added to an existing SQLite or Postgres catalog on open) and audit.list can filter on it. It is the same id the Atlas gateway stores on its audit rows (X-Atlas-Run-Id, MCP.md), so a run can be joined across both trails. The gateway's MCP data_* tools send the call's id as this header on every request they make (none when the call has no run id). It is correlation only, not authentication. Tested over SQLite (tools/atlas_data/tests/test_run_id.py); the Postgres catalog statement is not run.

Binary upload: POST /v1/chunks, optional X-Content-SHA256, <=4 MiB. Binary retrieval: GET /v1/chunks/HASH?artifact=ARTIFACT_ID. The artifact ACL and chunk membership are checked on every request. Knowing a content hash grants no access. A publisher must own its uploaded chunks or read an artifact containing them. There is no unauthenticated mode. /healthz contains only service health/version.

Data-ready job lifecycle​

  1. Register a trusted node inventory with labels, logical cache capacity and measured staging bandwidth. Heartbeats expire after 120 seconds.

  2. Reserve model/dataset IDs. Reservations hold capacity transactionally for 300 seconds. Concurrent reservations cannot oversubscribe the same node. Shared reservations for the same artifact consume logical capacity once.

  3. Run the trusted worker on the selected node:

    python3 -m atlas_data stage JOB_ID NODE_ID /private/tenant-node-cache
  4. The worker downloads missing chunks, verifies complete files, atomically renames its staging directory, then acknowledges placement. Existing files are reverified when staging is repeated. Cached chunks are shared across revisions on that worker.

  5. DataReadyGate.ready() returns a Kubernetes hostname selector only while the node, reservation and verified placement are fresh. Placement verification leases last 300 seconds. Re-stage to renew a verification lease. Renew long-running reservations and release them after the job; do not launch compute from a stale cached decision.

  6. Invalidate placement before physically evicting a cache entry. Active reservations pin it. Trusted workers must report loss/eviction; Atlas cannot remotely prove that an administrator has not removed cached files after verification.

DataReadyGate.wait_ready() (and python3 -m atlas_data gate-wait JOB --timeout 600 --out /gate/selection.json) blocks until ready() succeeds. Only "data not ready" is retried; a refused credential or an unknown job fails at once, and a timeout exits non-zero, so a pod fails visibly instead of starting compute without its data. Used as an init container, it holds the workload back until a trusted worker has staged and verified the job's artifacts:

The image is Dockerfile.data (non-root UID 10001, standard library plus psycopg; arguments choose serve, gate-wait, call, ingest, export). deploy/k8s/atlas-data.yaml runs the service (TLS and the credential config come from Secrets you create; none is in the file), and deploy/k8s/atlas-data-gate-example.yaml is a pod whose init container is gate-wait, holding the workload until the data is staged:

initContainers:
- name: wait-for-data
image: ghcr.io/zyvorai/atlas-data:0.13.0
args: ["--url=https://atlas-data.zyvor-system.svc:5120", "--ca=/etc/atlas-data-ca/ca.crt", "gate-wait", "job-123", "--out=/gate/selection.json"]
env: [{name: ATLAS_DATA_TOKEN, valueFrom: {secretKeyRef: {name: atlas-data-client, key: token}}}]

It waits, it does not place: the pod must already be scheduled onto the node in selection.json (set the nodeSelector, or read the file in a submission hook). For placement of the bytes themselves, atlas-native can pin a dataset's extents to the GPU node with POST /v1/fs/{fs}/locality/pin (NATIVE_FS.md); this service does not call it.

Verified on the lab (2026-11-01, scripts/atlas-data-image-remote.sh, deploy/data/gate-smoke.sh): the image builds; a service container publishes a dataset, registers a node and reserves a job; gate-wait exits non-zero ("timed out after 3s waiting for job job-1 data") while nothing is staged, then succeeds and writes selection.json naming the node once it is staged. Both manifests pass a server-side kubectl apply --dry-run=server on the lab k3s. Not done: the image is not published (the ghcr.io/zyvorai/atlas-data tag in the manifests is the intended name, not an existing image), no pod has actually run on a cluster, and no Kubernetes admission or scheduler integration exists.

tools/atlas_data/integrations.py provides DataReadyGate and CostCollector. The caller is responsible for matching node IDs to Kubernetes hostnames, checking compute capacity in Gryvia, and mounting the cache into its workload. Cache capacity uses conservative logical artifact sizes; shared physical chunks can consume less.

Controller and node agent (controller.py)​

JobController runs reserve -> trigger staging on the chosen node -> wait_ready -> hand the node selector to a scheduler -> renew the lease while the job is live -> release on success, failure, lost lease or any admit error. NodeAgent heartbeats and runs Client.stage for reserved jobs, then meters transfer_bytes (bytes fetched) and cache_miss_bytes (logical size of artifacts not in the cache) through CostCollector; a missing rate is recorded in meter_errors and never fails staging. GryviaAdapter (apply_node_selector, job_state, report) is our own minimal interface; FakeGryvia is the in-memory double and HttpGryvia (gryvia_adapter.py) is the HTTP implementation. Unit tested over a real local HTTP service with the fake adapter.

HttpGryvia and Gryvia's API​

Mapped from the Gryvia sources (repo zyvorai/zyvor-gryvia, services/api-gateway/), not from a running instance. Auth is Authorization: Bearer <token> (API key or OIDC JWT, main.py:393-430).

Adapter callGryvia routeNotes
job_stateGET /api/jobs/{name} (main.py:967)status.phase: Pending/Queued/Scheduling or no status -> pending, Running -> running, Succeeded, Failed/Rejected -> failed, Cancelled/Preempted -> cancelled; any other phase is an error
apply_node_selectorPOST /api/jobs (main.py:1017)sets spec.nodeSelector on the new job; see the limit below
reportnonekept in HttpGryvia.reports and logged

Gryvia has no route that modifies a submitted job and none that attaches a message to one, so:

  • Placement can only be applied when the job is created. Call HttpGryvia.register_job(job, manifest) with the GryviaAIJob manifest (job id must be a DNS label equal to metadata.name); Gryvia first sees the job when apply_node_selector runs, after the data is ready. A job that was not registered gets GryviaUnsupported, never a silent no-op. A create answered 409 is accepted only if the existing job has the identical nodeSelector.
  • report cannot reach Gryvia. Dataset registration/readiness (/api/datasets creates a GryviaDataset that Gryvia itself fetches from http/s3/nfs) and GPU reservations (/api/reservations, GPU capacity, unrelated to Atlas cache leases) are different concepts and are deliberately not mapped.

Behaviour: per-request timeout (default 10 s); up to 3 retries with exponential backoff (cap 8 s, Retry-After honoured) on connection errors, timeouts, 429/502/503/504, and also 500 for reads; 401/403 raise GryviaAuthError and are never retried; other 4xx and malformed responses raise GryviaError (a DataError, with the HTTP status). The token never appears in errors. Contract tests (tests/test_gryvia_adapter.py) run against a local fake gateway whose routes, auth and payloads are copied from those sources, with file:line citations. Nothing was run against a live Gryvia; the Gryvia SDK's job phase names (Completed) differ from the CRD's (Succeeded), and this adapter follows the CRD. No DaemonSet manifest for the agent or cluster run exists.

Agent branches and KV cache​

A workspace starts with a base manifest and empty overlay. Edits add references to uploaded chunks; unchanged files are shared. Generation checks reject concurrent lost updates. Time/byte limits apply to the workspace API; they do not bound agent CPU/RAM or prevent an agent from making unrelated uploads under its own credential. Selective publication creates a new dataset revision with workspace/base provenance. Use its ID for export into a VM/container. Discard closes the overlay.

KVAdapter(client, model, tokenizer, adapter, layout) takes immutable compatibility identifiers and an exact prefix digest. A miss/expired block returns None. Cache keys additionally include the authenticated subject. Different models, tokenizers, adapters, tensor layouts or subjects do not share blocks. The caller must hash the actual token prefix; text similarity is not a valid compatibility test. Hot-cache budget is 64 MiB per subject, capped by service capacity; disk reclamation is explicit GC after its upload grace period, so eviction is not immediate disk reclamation.

Prefix blocks​

prefix_digests(token_ids, block_size) returns the chained SHA-256 digest of each full token block, the keying prefix caches use: digest i covers all tokens up to block i, so prompts share it only when they share that whole prefix. KVAdapter.put_blocks(digests, blocks) stores one serialized block per digest and KVAdapter.longest_prefix(digests) returns the cached blocks of the longest unbroken leading run, stopping at the first miss. It is engine-neutral and stdlib-only: the serving runtime still produces and consumes the block bytes, and nothing here says a hit makes inference faster. Unit tested with a fake client; not run against vLLM or any engine.

KVConnector(adapter, block_size) (kv_connector.py) has the shape of a vLLM-style connector without importing vLLM: save(token_ids, blocks) stores one opaque block per full token block under its prefix digest, splitting a block over the 4 MiB service limit into parts behind a manifest (validated before any write), and load(token_ids) returns (matched_tokens, blocks) for the longest unbroken prefix, treating a lost part as a miss. Unit tested over the local HTTP service only; it is not registered with, or tested against, vLLM, and no GPU or speedup claim is made.

This service-backed store is separate from pointing an inference engine's own cold tier at Atlas. For LMCache's filesystem and S3 backends on an Atlas mount or the native S3 gateway, and for snapshot recipes for pgvector, Qdrant, Lance and Milvus, see AI_STORAGE_RECIPES.md (documentation and a CPU-only probe; none of those products has been run against Atlas).

Recovery and cost evidence​

A recovery profile is a server-side allowlisted argv array, for example:

{
"recovery_profiles": {
"orders": {
"verify": ["/opt/atlas/verify-orders", "{workspace}"]
}
}
}

The trusted executable must start/check/stop its own application inside the supplied restored directory, and exit zero only on success. No commands or paths are accepted from the remote request. Processes get a minimal environment without API tokens, no shell, a deadline and process-group cleanup. Hooks are trusted code running as the service account; use external VM/container isolation if the application is untrusted. The result separates checksum verification from application verification. It does not assert that an artifact is malware-free. For live Native/Ceph volume capture and restore, retain the existing application recovery tool.

Supported cost meters are stored_byte_hours, transfer_bytes, cache_miss_bytes and checkpoint_bytes. Rates are micro-USD per million units, rounded upward per event. Event IDs are immutable/idempotent; retrying after a rate change preserves the original amount. Only trusted collectors create entries. Set rates explicitly; unknown rates fail rather than pretending storage is free. Placement estimates include data transfer only, excluding compute time, taxes and cloud request charges.

Iceberg​

Install the optional requirements before creating tables. Types: long, double, string, boolean. Appends require the expected current snapshot ID (null for an empty table). Compaction uses an atomic Iceberg overwrite, preserving old snapshots for time travel; stale snapshot IDs fail with 409. It is bounded to 128 MiB compressed input and one million rows, then checks decoded Arrow size. Decoding can transiently exceed that target for highly compressed data: enforce a process/container memory limit. Use an external engine for large tables.

Snapshot expiration retains at least two newest snapshots and all named references. It removes metadata references only; physical orphan deletion is excluded to avoid removing data needed by in-flight readers. The warehouse is private and its storage is not included in the CAS byte cap: enforce a filesystem/PVC quota. Catalog paths are tenant-derived, never request-supplied. No arbitrary SQL or warehouse URL is accepted.

Operations and verification​

make data-test
# Optional dependency required for the Iceberg test and all-nine demo:
pip install -r tools/atlas_data/requirements-iceberg.txt
make data-demo

The all-nine demo uses real HTTP, local model/dataset bytes, node staging, a workspace, KV serialization, a restored SQLite application check, cost measurements, and actual Iceberg compaction. It does not call a GPU or a remote cluster.

Run exactly one service process per root; SQLite metadata is not an HA/multi-process service. HTTP requests are bounded to 32 concurrent threads, 8 MiB JSON and 4 MiB chunks. Readers, file manifests and compaction also need deployment resource limits. The SQLite root, worker cache and trusted profiles must not be writable by agents. Back up metadata, chunks and Iceberg catalog/warehouse together while the service is stopped. Restore into a new private root and verify artifact checksums before use. The root should be a persistent volume supplied by Atlas/Ceph/ZFS/NFS; see deployment example.

GC reclaims unreferenced tenant chunks after a one-hour grace period. Published artifacts remain retained; no online artifact deletion is supplied. Expired workspace and KV metadata is retained for inspection. Orphan files from a crash between disk write and catalog commit may need offline cleanup; GC must not be used as a retention compliance mechanism. Audit metadata is operational evidence, not a tamper-proof log.

Agents through the gateway's MCP server​

With ATLAS_DATA_URL (and a per-tenant credential map) set on the gateway, agents can read artifacts and revisions, a job's data-ready state, a workspace review and the cost report, and, with ATLAS_MCP_WRITE_ENABLE=1, change/publish/discard a workspace or release a job through the two-phase confirm. The service sees each call as the atlas_data identity of the credential the gateway chose for the caller's tenant (this API cannot take a subject in the request), so its tenant and ACL checks apply unchanged. The tool list, the identity mapping and what could not be exposed (workspace listing, per-node status, KV statistics) are in MCP.md. Verified only against a fake service and the Python contract test; not against a deployed atlas_data, and no agent was tried.