PHP graphs of _AugmentedIntelligence
What graphs can be built in PHP, what is implemented now, data sources, and how to extend.
Related: ProgramStatePortal.md · IisPhpIntegration.md · MinecraftWebDashboard.md · BrainstormIntegrations.md · PhpPluginPanelsBrainstorm.md (plugin panels, more graphs, local/remote control)
Plugin panels brainstorm (summary)
See PhpPluginPanelsBrainstorm.md for a full catalog of:
- PHP plugin panel host (registry, lazy load, packs)
- Graph panels (gov pipeline, market, DQN, MathNN access, ethics, weather, …)
- Local / remote control panels (same command strings, dry-run, tokens, multi-host)
Design principle
PHP is a read-only visualization layer. The C++ host exports JSON; PHP serves and charts it (Chart.js, canvas, optional vis-network later).
_AugmentedIntelligence
portal export / graphs export / minecraft state.json
│
▼
program_web_portal/api.php (or minecraft_web_dashboard/api.php)
│
▼
Browser charts (Chart.js)
Implemented now
Export (C++)
graphs architecture # node–edge architecture DAG JSON
graphs discovery # categories, posted/pending, entries
graphs rl # portal RL/overview slice + cutlass status
graphs all # combined payload
graphs export # write files to portal dir + php site data/
integrate all # includes graphs export path
Files written by graphs export
| Location | Contents |
|---|---|
{portal_dir}/graphs/graphs_all.json |
Combined |
{portal_dir}/graphs/architecture.json |
DAG |
{portal_dir}/graphs/discovery.json |
Discovery stats |
{portal_dir}/graphs/rl.json |
RL summary |
{php_root}/data/graphs_all.json |
Copy for PHP site |
{php_root}/data/graph_*.json |
Split files |
Default portal dir is typically C:/_AugmentedIntelligence/web_portal (see portal settings).
PHP API
GET api.php?q=graphs
GET api.php?q=graphs&which=all
GET api.php?q=graphs&which=architecture
GET api.php?q=graphs&which=discovery
GET api.php?q=graphs&which=rl
Searches portal graphs/ next to state.json, then program_web_portal/data/.
PHP UI (program_web_portal)
Graphs nav section:
| Chart | Type | Data |
|---|---|---|
| Discovery categories | Bar | discovery.by_category |
| Posted vs pending | Doughnut | discovery.posted / pending |
| Architecture nodes | Status list | architecture.nodes |
Minecraft dashboard (separate)
Already charts:
- Players / avg health / avg food
- Hostiles / world time
- Bridge connected
Architecture graph schema
{
"type": "architecture",
"nodes": [
{ "id": "camera", "label": "Camera", "category": "sensor", "status": "live" }
],
"edges": [
{ "from": "camera", "to": "vision", "label": "frames" }
]
}
Categories used: sensor, perception, memory, model, action, ui, control, extensibility.
Nodes include camera, audio, commands, vision, memory, llm, cutlass, discovery, wordpress, portal, iis, web, plugins, etc.
Discovery graph schema
{
"type": "discovery",
"auto_post": false,
"dry_run": true,
"total": 24,
"pending": 20,
"posted": 4,
"by_category": { "perception": 3, "cognitive": 2 },
"entries": [
{
"id": "disc-1-…",
"title": "…",
"category": "session",
"posted": false,
"created_utc": "…",
"epistemic": "method"
}
]
}
Full catalog of graphs you can build in PHP
Already easy with current exports
| Graph | Source |
|---|---|
| Architecture DAG | graphs architecture |
| Discovery category bars | graphs discovery |
| Posted/pending pie | graphs discovery |
| RL enablement trends | portal history / overview (existing chart) |
| Checkpoint table counts | api.php?q=checkpoints |
| Minecraft vitals | minecraft dashboard |
Ready with small JSON additions
| Graph | Suggested source |
|---|---|
| Thought session DAG | Thought graph export |
| GEMM / TF32 bench history | append cutlass bench results to history |
| Weather risk line | WeatherHazards status series |
| Body profile state machine | BodyEquilibrium status |
| Command catalog treemap | /api/ui/commands or catalog dump |
| Semantic clusters | offline embed 2D coords |
Chart types that fit PHP front ends
| Type | Use |
|---|---|
| Line / area | History, reward, risk |
| Bar / stacked | Categories, checkpoints |
| Pie / doughnut | Posted vs pending |
| Force / hierarchical graph | Architecture, thought (vis-network) |
| Heatmap | Depth grid, attention |
| Map | USGS / NWS (Leaflet) |
| Gauge / KPI | Health, freeze flags |
Libraries: Chart.js (in use), ApexCharts, ECharts, Plotly.js, vis-network, Leaflet, Mermaid.
How to run the Graphs UI
# In the app
portal enable
portal export
graphs export
# or: integrate all
# Terminal
cd program_web_portal
# edit config.php: $state_file path if needed
php -S 0.0.0.0:8090
Open http://localhost:8090/ → Graphs.
Lua
print(graphs_architecture())
print(graphs_discovery())
print(graphs_export())
Security
- Graphs and portal are read-only.
- Do not put MySQL passwords in public repos; use env /
config.phplocally. - Bind PHP server to trusted LAN when exporting operational state.
Files
BrainstormIntegrations.cpp— graph builders + exportprogram_web_portal/api.php—q=graphsprogram_web_portal/index.php— Graphs sectionProgramStatePortal—state.json/ history for RL trends