ViableOS — "The operating system for viable AI agent organizations." Design-Tool das Organisationen auf Basis des Viable System Model (VSM) strukturiert und Agent-Konfigurationen generiert.
- Backend: Python 3.10+, FastAPI, LiteLLM, PyMuPDF
- Frontend: React 19, TypeScript, Vite, Tailwind CSS 4, Zustand
- Kein DB — alles in-memory (Sessions, FileStore). Ephemeral by design.
src/viableos/
├── api/
│ ├── chat_routes.py # Chat SSE streaming + file upload
│ └── routes.py # Wizard/config API endpoints
├── chat/
│ ├── engine.py # LiteLLM streaming, multimodal messages
│ ├── session.py # In-memory session + message store
│ ├── files.py # FileStore: PDF/image/text upload processing
│ └── system_prompt.py # 650-line VSM expert prompt (NEVER expose theory to user)
├── checker.py # Viability checks (S1-S5) + community warnings
├── assessment_transformer.py # Assessment JSON → viable_system config
├── budget.py # Token budget calculation
├── coordination.py # Auto-generated coordination rules
├── generator.py # OpenClaw package generator
└── langgraph_generator.py
frontend/src/
├── components/chat/ # ChatWindow, MessageBubble, ProviderSelector, AssessmentPreview
├── components/wizard/ # 6-step wizard (Template→Units→Budget→Identity→HITL→Review)
├── store/ # Zustand stores (useChatStore, useConfigStore)
├── api/client.ts # Typed API client
└── types/index.ts # All TypeScript interfaces
- User chattet mit VSM-Experte (LiteLLM streaming via SSE)
- Kann PDFs, Screenshots, Dateien hochladen (drag&drop, paste, paperclip)
- LLM führt 4-Phasen Assessment-Interview
- "Finalize Assessment" extrahiert JSON aus letzter Assistant-Message
- "Use in Wizard" transformiert → öffnet Config-Wizard
- Wizard Step 6 (ReviewStep) ruft
/api/checkfür Viability-Report
Wichtig: Chunks werden JSON-encoded gesendet (json.dumps(chunk)), damit Newlines in LLM-Output das SSE-Format nicht brechen. Frontend parst mit JSON.parse().
- API Keys nur in-memory (nie persistiert, kein localStorage)
- CSS Variables statt hardcoded colors (
var(--color-primary)etc.) - Provider-Abstraktion über LiteLLM (Anthropic, OpenAI, Google, DeepSeek, xAI, Ollama)
system_prompt.pyenthält tiefes VSM-Wissen, aber der LLM darf NIEMALS akademische Begriffe verwenden
# TypeScript prüfen
cd frontend && npx tsc --noEmit
# Linting
cd frontend && npm run lint
# Unit Tests (Vitest)
cd frontend && vitest run
# E2E Tests (Playwright – startet Dev-Server automatisch)
cd frontend && npx playwright test
# Backend Tests
pytest tests/ -v- TypeScript Check:
npx tsc --noEmit→ Muss ohne Fehler durchlaufen - Unit Tests:
vitest run→ Alle grün? - E2E Tests:
npx playwright test→ Alle grün? - Backend Tests:
pytest tests/ -v→ Alle grün? - Erst wenn alles grün ist: committen
- Playwright Screenshots:
frontend/tests/e2e/screenshots/ - Playwright HTML-Report:
cd frontend && npx playwright show-report - Console-Errors werden direkt im Test-Output angezeigt
- Fix den Fehler und lauf die Tests erneut bevor du weiter machst
checker.py: success_criteria priorities könnenintoderstringsein — immer mitstr()castenassessment_transformer.py: Gibt{"viable_system": {...}}zurück, nicht nur das viable_system- FileStore ist global singleton (
file_store) — kein Cleanup implementiert max_tokens=4096in engine.py — bei langen Assessment-JSONs ggf. zu wenig