Local feasibility spike for rendering AJKit-governed A2UI surfaces from local and CLI model providers.
AJKit supplies the generation profiles, validation, visual direction, style tokens, and recovery policy. A2UI stays the portable surface contract/runtime: the app asks a selected provider for compact intent JSON, validates it against AJKit authority, deterministically compiles it into A2UI v0.9 messages, and renders the result with the React A2UI renderer.
Available experiments:
- Restaurant: generates a restaurant-booking surface from a restaurant request.
- Travel: generates a weekend city itinerary surface from a travel request.
- Candidate review: generates a hiring review surface.
- Issue triage: generates an engineering triage surface.
- Event ops: generates an event operations runbook surface.
- Lesson plan: generates an adaptive lesson planning surface.
- Home project: generates a home project planning surface.
- Node.js 22+
- npm
- Codex CLI for the default
codex-cliprovider - AJKit checkout at
/Users/mike/AgenticJudgmentKit, or setAJKIT_PATH - Optional: LM Studio local server running at
http://localhost:1234/v1 - Optional: LM Studio model available as
google/gemma-4-e2b
Provider and AJKit defaults can be overridden with:
AJKIT_PATH=/Users/mike/AgenticJudgmentKit
A2UI_LLM_PROVIDER=codex-cli
A2UI_CODEX_MODEL=gpt-5.5
A2UI_CODEX_REASONING_EFFORT=medium
A2UI_LLM_PROVIDER=lmstudio
LM_STUDIO_BASE_URL=http://localhost:1234/v1
A2UI_LMSTUDIO_MODEL=google/gemma-4-e2bInstall dependencies if needed:
npm installCheck that LM Studio is reachable and the model is loaded:
npm run preflightStart the local app and API:
npm run devOpen the app:
http://127.0.0.1:5173/
The dev command starts:
- AJKit loopback MCP server:
http://127.0.0.1:8765/mcp - Vite web app:
http://127.0.0.1:5173/ - Local API proxy:
http://127.0.0.1:8787/
npm run dev runs the API with A2UI_AJKIT_REQUIRE_LOOPBACK=1, A2UI_AJKIT_CACHE=1, and A2UI_LOCAL_INTENT_CACHE=1 so the default product path exercises live AJKit governance instead of stdio fallback.
Run unit tests:
npm testBuild the app:
npm run build- Choose an experiment mode.
- Enter a prompt:
- Restaurant:
Book a table for 2 tomorrow at 7 near Hayes Valley for Italian food. - Travel:
Plan a 3-day weekend trip to Portland for two people, relaxed pace, good food and walkable neighborhoods, budget around $900. - Candidate review:
Review three senior product design candidates for a growth role. - Issue triage:
Triage frontend checkout issues for next sprint. - Event ops:
Plan staffing and runbook risks for a 300-person launch event. - Lesson plan:
Create a 45-minute middle school fractions lesson for mixed skill levels. - Home project:
Plan a weekend pantry shelving project under $400.
- Restaurant:
- Click Generate.
- The backend requests structured JSON from local Gemma through LM Studio.
- The response is validated as an experiment-specific intent object.
- The compiler emits A2UI v0.9 messages.
- The React A2UI renderer displays the generated surface.
- Clicking generated action buttons adds A2UI client events to the action log.
The API stays backward compatible. Missing experiment defaults to restaurant:
{
"prompt": "Plan a 3-day weekend trip to Portland for two people.",
"experiment": "travel"
}Supported experiment values are restaurant, travel, candidate-review, issue-triage, event-ops, lesson-plan, and home-project.
Profile and manifest checks:
npm run proof:fetch-ajkit-profile
npm run proof:extract-manifest
npm run proof:extract-storybook-manifestRuntime/value proofs:
npm run proof:visual
npm run proof:value
npm run proof:hero
npm run proof:travel
npm run benchmark:providersProof results are written under output/ and are intentionally ignored by git.
server/ Local Express API, provider clients, AJKit profile transport
shared/ Intent schemas and A2UI compilers
src/ React app and diagnostics UI
scripts/ Proof and benchmark runners
tests/ Schema, compiler, API, and visual tests