Skip to main content

Auditable AI model language, runtime and deployment framework

Project description

MatrixAI

MatrixAI is a language for AI, not for humans. Describe a model in a prompt, train it, audit every decision it makes, and deploy it where trust is not optional.

Models are not black boxes — they are auditable programs: explicit inputs, explicit transformations, explicit outputs, explicit audit trail. Every decision is traceable to a named node in the computation graph. That is the core value for critical environments: healthcare, finance, legal, industrial.

Website & Studio: matrixaistudio.org — browser-based model development environment, downloads, documentation and member resources.


Get started

pip install matrixai-core
matrixai --help

Quickstart (5 min) 🇬🇧 · Quickstart (5 min) 🇪🇸


What MatrixAI does

  1. Describe — write a model in a natural-language prompt or in .mxai directly.
  2. Generate — the system builds a verifiable computation graph and training contract.
  3. Train — supervised training with versioned parameters, reproducible metrics and full trace.
  4. Audit — every prediction is traceable; every action is signed and logged.
  5. Deploy — serve over HTTP, export to ONNX/WASM, package as Docker, or register in the model registry.
  6. Monitor — detect drift, trigger retraining, rollback automatically or manually.

Key features

  • Prompt → model: matrixai prompt "..." generates a runnable .mxai program
  • Auditable graph: computation graph with named nodes, explicit types and audit trail
  • Supervised training: classification, risk scoring and regression with .mxtrain specs
  • Model registry: versioned, signed, verifiable — matrixai registry push/pull/verify
  • Real actions: .mxact contracts with HMAC-signed traces, dry-run and rollback
  • Continual learning: .mxcontinual policies with drift detection and automatic versioning
  • HTTP server: /predict, /metrics (Prometheus), /execute-action, /feedback with API key auth
  • ONNX / WASM export: edge deployment bundles and browser-ready WASM packages — for dense and composite networks (residual blocks, LayerNorm, embeddings, concat), with output equivalence validated against the reference forward pass
  • Studio: browser-based model development environment — a separate product at matrixaistudio.org, built on this core

Quick example

# Create a project from a template
python -m matrixai init my-model --template classification

# Train
python -m matrixai train my-model/my-model.mxai \
  --training my-model/my-model.mxtrain \
  --output my-model/runs/v1

# Predict
python -m matrixai run my-model/my-model.mxai \
  --params my-model/runs/v1/params.best.json \
  --input my-model/input/sample.json

# Serve over HTTP
python -m matrixai serve my-model/my-model.mxai \
  --params my-model/runs/v1/params.best.json \
  --api-key my-secret
# → http://127.0.0.1:8000/docs

Examples

Example Domain Mode
examples/credit-scoring/ Credit approval Risk scoring
examples/clinical-risk/ Fall risk assessment Risk scoring
examples/agent-alert/ Alert monitoring with real action Classification + action
examples/text-routing/ Support ticket routing Multi-class classification
examples/email-agent.typed.mxai Email classification Classification
examples/celsius_to_kelvin.mxai Temperature conversion Regression
examples/transformer-classifier.mxai Transformer encoder Classification

Documentation

Topic English Español
Quickstart QUICKSTART.md QUICKSTART.md
Tutorial TUTORIAL.md TUTORIAL.md
Language spec LANGUAGE_SPEC.md LANGUAGE_SPEC.md
CLI reference CLI_REFERENCE.md CLI_REFERENCE.md
REST API REST_API.md REST_API.md
Use cases USE_CASES.md CASOS_DE_USO.md
Benchmarks INDEX.md INDEX.md
Deployment DEPLOYMENT.md DEPLOYMENT.md
Observability OBSERVABILITY.md OBSERVABILITY.md
Runbook RUNBOOK.md RUNBOOK.md
Key rotation KEY_ROTATION.md KEY_ROTATION.md
Server hardening SERVER_HARDENING.md SERVER_HARDENING.md
Versioning policy VERSIONING.md VERSIONING.md
Changelog CHANGELOG.md CHANGELOG.md
Business model BUSINESS_MODEL.md MODELO_NEGOCIO.md

Install

pip install matrixai-core

With optional export dependencies (ONNX / WASM):

pip install "matrixai-core[export]"

With GPU training support (PyTorch):

pip install "matrixai-core[torch]"

All extras:

pip install "matrixai-core[export,torch,dev]"

From source:

git clone https://github.com/robertollweb/matrixAI.git
cd matrixAI
pip install -e .

Requirements: Python 3.10+ must be installed on your system (python.org/downloads).

Windows note: use python instead of python3 in all commands below.
If matrixai is not found after install, use python -m matrixai (or python3 -m matrixai on Linux/macOS).


Running MatrixAI

After installing, you can call MatrixAI in two equivalent ways:

# Option A — direct command (works when pip scripts directory is in PATH)
matrixai --help

# Option B — via Python module (always works, recommended on Windows)
python -m matrixai --help       # Windows
python3 -m matrixai --help      # Linux / macOS

LLM configuration (optional)

MatrixAI works without any LLM — it uses a built-in deterministic engine by default. To enable LLM-powered model generation, copy the example config and fill in your API key:

cp .env.example .env

Then edit .env and set your provider and key. Minimal example for OpenAI:

MATRIXAI_LLM_PROVIDER_NAME=openai
MATRIXAI_LLM_MODEL=gpt-4o-mini
MATRIXAI_LLM_API_KEY=sk-...your-key...

For Anthropic (Claude):

MATRIXAI_LLM_PROVIDER_NAME=anthropic
MATRIXAI_LLM_MODEL=claude-opus-4-8
MATRIXAI_LLM_API_KEY=sk-ant-...your-key...
MATRIXAI_LLM_MAX_TOKENS=4096

For Google Gemini or DeepSeek — see the full list of providers and example configs in .env.example.

Without a .env file (or with MATRIXAI_LLM_API_KEY empty), MatrixAI runs in deterministic mode: all features work except LLM-generated model suggestions.


Studio

MatrixAI Studio is a browser-based model development environment — generate models from prompts, train, evaluate and explore without writing code. It is distributed as a separate product built on this core.

matrixaistudio.org — downloads, documentation and member resources.

The core itself ships a local technical playground (prompt → runtime):

python -m matrixai playground --open
# → http://127.0.0.1:8765

Run the tests

python -m pytest tests/
# 3606 passed, 16 skipped

LLM integration (optional)

MatrixAI can use an external LLM to generate model proposals from prompts. Without configuration it falls back to the deterministic local mode.

# .env (ignored by git)
MATRIXAI_LLM_API_KEY=your-key
MATRIXAI_LLM_MODEL=external-model-id
MATRIXAI_LLM_ENDPOINT=https://provider.example/v1/chat/completions
Variable Default Description
MATRIXAI_LLM_API_KEY External provider key
MATRIXAI_LLM_MODEL configured by you Model identifier sent to the external provider
MATRIXAI_LLM_ENDPOINT chat-completions-compatible endpoint Provider endpoint
MATRIXAI_LLM_CANDIDATES 1 Number of candidates to generate
MATRIXAI_LLM_TEMPERATURE 0 Generation temperature
MATRIXAI_LLM_TOKEN_BUDGET 0 (unlimited) Max tokens per call

Any chat-completions-compatible API can be used, including local model servers.


License

See LICENSE — AGPL v3. License verification: English · Español.
© Roberto Llamosas Conde — robertollweb/matrixAI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matrixai_core-1.1.1.tar.gz (719.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matrixai_core-1.1.1-py3-none-any.whl (480.4 kB view details)

Uploaded Python 3

File details

Details for the file matrixai_core-1.1.1.tar.gz.

File metadata

  • Download URL: matrixai_core-1.1.1.tar.gz
  • Upload date:
  • Size: 719.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matrixai_core-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8e9315be40618848364b38074c6b1d03dc850e09820afcedd428df306cba61f9
MD5 62a9312e221c4aab1864eba0bfccfebb
BLAKE2b-256 05e9875399d69cebe685d2afdaf50dcb8aed13764bf78c627d17938ea3f98731

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrixai_core-1.1.1.tar.gz:

Publisher: publish.yml on robertollweb/matrixAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matrixai_core-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: matrixai_core-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 480.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matrixai_core-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45e14ba2a5e27c42e8afd7895f3758c217db4c731a2e9ce0a8bb7d3cdb26bc26
MD5 489aa5e7c67445d58c2b19938613b499
BLAKE2b-256 61a5ea35e53a6ca5cf1fbbbd8d1c384017b65fd48f4f0cbdc302f61d0fa3fb81

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrixai_core-1.1.1-py3-none-any.whl:

Publisher: publish.yml on robertollweb/matrixAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page