metadata
title: MatrixLab Sandbox
emoji: 🧪
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
license: apache-2.0
short_description: MatrixLab HF backend for AI repo testing and debugging
MatrixLab HF Backend (Space)
This Hugging Face Space is a microservice frontend for MatrixLab.
It supports two modes:
- Upload ZIP for static verification (syntax/security/basic tests).
- Remote GitHub execution through MatrixLab Runner using environment bootstrap + cached task runs.
Production Goal
Use this Space as a backend entrypoint for testing and debugging AI/code repos, including:
https://github.com/ruslanmv/gitpilothttps://github.com/ruslanmv/agent-generatorhttps://github.com/ruslanmv/RepoGuardian
The Space sends workload requests to MatrixLab Runner (MATRIXLAB_RUNNER_URL), which executes in isolated containers.
Environment Variables
Set these in HF Space settings:
MATRIXLAB_RUNNER_URL(required): e.g.https://your-runner.example.comMATRIXLAB_RUNNER_TIMEOUT_S(optional, default120)
API
Health
GET /health
List repo profiles
GET /profiles
Run GitHub repo task through MatrixLab Runner
POST /repo/run
Content-Type: application/json
{
"environment_id": "gitpilot-main",
"profile": "gitpilot",
"repo_url": "https://github.com/ruslanmv/gitpilot",
"default_branch": "main",
"branch": "main",
"force_rebuild": false
}
Profiles:
gitpilotagent-generatorrepoguardiancustom(provide your ownrepo_url+ scripts)
ZIP verification mode (local in Space)
POST /runs # upload zip multipart
GET /runs
GET /runs/{id}
Local Run
cd hf
docker build -t matrixlab-hf-space .
docker run -p 7860:7860 -e MATRIXLAB_RUNNER_URL=http://host.docker.internal:8000 matrixlab-hf-space
Notes
- This Space is intentionally lightweight and acts as control-plane API/UI.
- Containerized build/test execution happens in MatrixLab Runner.
- For production, put authentication + rate-limiting in front of
/repo/run. - For organization-wide maintenance sweeps, use
tools/matrix_maintainer.pywithconfigs/agent_matrix_repos.json.