Self-hosted agent playground featuring a CUDA-enabled vLLM model server, a FastAPI agent gateway wired to a constitutional governance pack, and a React builder UI.
- Docker with the NVIDIA Container Toolkit (
nvidia-smishould succeed) - CUDA-capable GPU with driver version compatible with CUDA 12.x
- Optional developer tooling: Node.js 20, Python 3.11, pipx, poetry, uv (also provided inside the devcontainer)
Run the built-in environment validation before starting the stack:
./scripts/ark checkThe command verifies Docker connectivity, GPU visibility, and that all runtime ports are free.
./scripts/ark upark ensures a .env file exists, builds the Docker images, and starts the
compose stack in the background. Bring everything down with:
./scripts/ark downTail runtime logs with:
./scripts/ark logsYou can perform the same actions with vanilla Docker Compose:
docker compose --env-file .env up --build- Gateway (FastAPI) — http://localhost:8000/healthz
- vLLM OpenAI-compatible API — http://localhost:8001/v1/models
- Builder UI — http://localhost:3000
- MinIO console — http://localhost:9001
Once the stack is running, verify the key endpoints:
curl http://localhost:8000/healthz
curl http://localhost:8001/v1/modelsThe governance pack mounted into the gateway powers a stubbed /court/trifecta
endpoint. Submit a plan using the helper CLI:
./scripts/ark court examples/trifecta_example.jsonThe command pretty-prints the verdict and returns a success exit code when the
response is PASS or PASS_WITH_CONDITIONS.
Open the builder UI at http://localhost:3000. The demo screen loads the FastAPI health endpoint to confirm connectivity, exposes the constitutional pack sections, and lets you tweak the JSON plan before invoking the court trifecta endpoint. Verdict, summary, and pack contents render directly in the browser.
The .devcontainer/ folder ships a CUDA-ready development environment powered by
nvidia/cuda:12.1.1-runtime-ubuntu22.04. It includes Python 3.11, Node.js 20,
pipx, poetry, uv, make, git, git-lfs, and build essentials. Open the repository
in VS Code (or use devcontainer open) to get a fully provisioned workspace
with GPU access via the NVIDIA Container Toolkit.
constitutional_pack/ is mounted read-only into the gateway container. Each
section (Scripture, Geometry, Law) can be updated locally and the builder
UI will surface the new contents on the next request.
The ark CLI also includes a placeholder code generation helper:
./scripts/ark dev codegen "Refactor the gateway tools API"The prompt is echoed into .ark/changeset-<timestamp>.md, simulating future
automation workflows.
DeflexNet is an experimentation environment for exploring dynamic load flexibility in modern energy systems. This repository contains the web application that visualizes simulated demand response scenarios, provides tools for analyzing flexibility potential, and demonstrates integration patterns for distributed energy resources. The goal is to offer researchers and engineers an accessible starting point for adapting DeflexNet concepts to their own grid innovation projects.
- Node.js 18 or later
- npm 9 or later
- Git for cloning the repository
- Optional: Docker (for containerized deployments) and a modern web browser for interacting with the UI
- Clone the repository:
git clone https://github.com/FlexNetOS/deflexnet-app.git cd deflexnet-app - Install dependencies:
npm install
- Copy environment defaults if needed and adjust values for your data sources:
cp .env.example .env.local
- Start the development server:
npm run dev
- Open the app in your browser at http://localhost:3000.
- Explore the dashboard to review aggregated load flexibility indicators.
- Use scenario controls to toggle between forecast and real-time datasets.
- Inspect charts to understand ramping capabilities, curtailment windows, and cost impacts.
- Export datasets via the provided download actions to integrate DeflexNet outputs into downstream analytics tools.
- Create an issue describing planned changes before starting significant work.
- Follow conventional commit messages and ensure linting/tests pass before opening a pull request.
- Submit pull requests with contextual descriptions, screenshots for UI updates, and references to related research or datasets when applicable.
- Reviewers focus on energy domain accuracy, accessibility of visualizations, and maintainability. Please incorporate review feedback promptly.