AGILAB portable web component contract with static Canvas2D/WebGL adapters for Streamlit and HTML
Project description
AGI Web
agi-web defines a portable component contract for AGILAB app-owned UI islands.
It lets an app describe a rich browser component once, attach deterministic
evidence hashes, and render it in Streamlit or static HTML today while keeping a
stable payload for richer adapters.
The bundled static adapter can render a WebGL decision-surface heatmap with a
Canvas2D overlay/fallback for local replay/scrub controls, clickable timelines,
keyboard scrubbing, confidence badges, uncertainty-contour glow, and hover
readouts when the payload includes boundary snapshots.
Quick Install
pip install agi-web
Most users get it through the AGILAB UI profile:
pip install "agilab[ui]"
Component Contract
from agi_web import AgiWebComponent, AgiWebRendererSpec, render_streamlit
component = AgiWebComponent(
component_id="playground-boundary",
title="Decision boundary",
renderer=AgiWebRendererSpec(
renderer_id="pytorch-boundary-webgl",
technology="webgl",
capabilities=("decision-boundary", "learning-replay", "gpu-heatmap"),
),
payload={
"samples": [{"x1": -0.4, "x2": 0.2, "target": 1}],
"grid": [{"x1": -0.5, "x2": 0.0, "probability": 0.72}],
"snapshots": [
{"epoch": 0, "x1": -0.5, "x2": 0.0, "probability": 0.51},
{"epoch": 8, "x1": -0.5, "x2": 0.0, "probability": 0.72},
],
},
)
render_streamlit(component)
The contract is intentionally framework-neutral:
- The payload is normalized JSON, so Canvas2D, WebGL, Streamlit, notebook, static-report, and future React renderers can consume the same data.
- The evidence block records the renderer, payload hash, action hash, and asset hash, so visual proof artifacts can be compared deterministically.
- The package has no JavaScript build dependency. The current static renderer ships Canvas2D/WebGL paths; framework-specific adapters can be added beside the contract without forcing Node tooling into every AGILAB install.
Visual Guard
The repository ships a deterministic browser fixture for this adapter:
uv --preview-features extra-build-dependencies run --with playwright --with pillow \
python tools/agi_web_visual_regression.py --browser chromium --max-render-ms 2500 --json
The agi-web-visual workflow parity profile compares Chromium output against
the committed docs/source/_static/agi-web-visual-baseline screenshot baseline
and records per-browser render timing. Pass repeated --browser options for
manual Firefox/WebKit smoke checks.
Repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agi_web-2026.6.1.tar.gz.
File metadata
- Download URL: agi_web-2026.6.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bec5f3a471e5f2bab4b5d4d47cd45e72a9d2ce7cf105130ba33fe44e3c16262a
|
|
| MD5 |
4c42934e3341c32e81865b34f23e2ce6
|
|
| BLAKE2b-256 |
fcbcbf9a80b8bcbf902664925bac044ade787fbbde58e3ec78b9065f9ddac2f6
|
Provenance
The following attestation bundles were made for agi_web-2026.6.1.tar.gz:
Publisher:
pypi-publish.yaml on ThalesGroup/agilab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agi_web-2026.6.1.tar.gz -
Subject digest:
bec5f3a471e5f2bab4b5d4d47cd45e72a9d2ce7cf105130ba33fe44e3c16262a - Sigstore transparency entry: 1696587229
- Sigstore integration time:
-
Permalink:
ThalesGroup/agilab@1f20e1dd97bbd4cf7044ee3c95e9ed462fc9d971 -
Branch / Tag:
refs/tags/v2026.06.01 - Owner: https://github.com/ThalesGroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@1f20e1dd97bbd4cf7044ee3c95e9ed462fc9d971 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agi_web-2026.6.1-py3-none-any.whl.
File metadata
- Download URL: agi_web-2026.6.1-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
610c7b0486c56dddf399586fc96f569a1d4a844691eefdcf20433f3ac781128e
|
|
| MD5 |
bbfaa33b79d61d16c74edd2a33f8c242
|
|
| BLAKE2b-256 |
e060f4033c8f83c451ec66661ea651413fd43e1643ea6663537dcd21cfb7a51c
|
Provenance
The following attestation bundles were made for agi_web-2026.6.1-py3-none-any.whl:
Publisher:
pypi-publish.yaml on ThalesGroup/agilab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agi_web-2026.6.1-py3-none-any.whl -
Subject digest:
610c7b0486c56dddf399586fc96f569a1d4a844691eefdcf20433f3ac781128e - Sigstore transparency entry: 1696587333
- Sigstore integration time:
-
Permalink:
ThalesGroup/agilab@1f20e1dd97bbd4cf7044ee3c95e9ed462fc9d971 -
Branch / Tag:
refs/tags/v2026.06.01 - Owner: https://github.com/ThalesGroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@1f20e1dd97bbd4cf7044ee3c95e9ed462fc9d971 -
Trigger Event:
push
-
Statement type: