Blinkin 2.0 — Vollständige Architektur

Alle existierenden Features + neue Module · Stand: 2026-03-15 · 28.448 Zeilen · 154 Dateien · 21 Tests

Existiert in Repos
Muss erweitert werden
Neu zu bauen

1. Zielarchitektur — 7 Schichten

block-beta
  columns 3
  block:interfaces["INTERFACES"]:3
    columns 3
    platform["Blinkin Platform\n(Studio / Picasso)"]
    companions["Blinkin Companions\n(Houston / Mini-Apps)"]
    bizapps["Business Applications\n(Custom / Partner)"]
  end
  block:agents["AGENTS"]:3
    columns 3
    youragents["Your Agents\n(Custom, per Org)"]
    blinkagents["Blinkin Agents\n(Platform-provided)"]
    partneragents["Partner Agents\n(A2A / Marketplace)"]
  end
  block:orchestration["ORCHESTRATION, GOVERNANCE, EVAL & OPTIMIZATION"]:3
    columns 1
    orch["A2A Protocol · Multi-Model Routing · 7 Orchestration Patterns\nKanban Board · Human Review Gates · Peer Review · Audit Log · Eval Loop\nScheduler Daemon · Work Item DAG · Policy Profiles · Tool Audit Log"]
  end
  block:computer["BLINKIN COMPUTER"]:3
    columns 1
    exec["Isolated Sandbox per Org · Agent Loop: Plan-Act-Observe-Emit-Verify\nModel Router · Tool Router: CLI/API first · SSE Streaming · Heartbeat 24/7\nMemory Layer: model-agnostic read/write · Context Compaction"]
  end
  block:context["BUSINESS CONTEXT"]:3
    columns 1
    bctx["SOPs · Brand Guidelines · Writing Rules · Personas · Templates\nSkill Playbooks · Domain Knowledge · Agent Skills: agentskills.io"]
  end
  block:sor["CUSTOMER SYSTEMS OF RECORD"]:3
    columns 1
    data["Knowledge Base · Document Store · Asset Storage · Org Database\nExternal APIs · CRM · Vector Search · Content Management"]
  end
  block:platform_services["PLATFORM SERVICES"]:3
    columns 1
    platsvc["Auth0 · Multi-Tenancy · Stripe/Paddle Billing · PostHog Analytics\nToken Tracking · Rate Limiting · Email · Notifications · Whitelabel"]
  end

2. INTERFACES — Vollständige Komponentensicht

graph TB
  subgraph Platform["BLINKIN PLATFORM — Picasso / Zweistein Admin"]
    direction LR
    subgraph PlatBuilder["Builder Tools"]
      AgentBuilder["Agent Builder\n+ Persona Config"]
      FlowBuilder["Flow Builder\nReact Flow"]
      WidgetBuilder["Widget Builder\nControls + AI Gen"]
      ContextEditor["Context Editor\nWriting Rules\nBrand Guidelines"]
    end
    subgraph PlatOps["Operations"]
      KanbanBoard["Kanban Board\n8-Spalten Pipeline"]
      ControlPlane["Control Plane Board\nScheduler Daemon\nLease Drain Reconcile"]
      GovernanceDash["Governance\nDashboard"]
      TokenTracker["Token Tracker\nUsage Analytics"]
    end
    subgraph PlatCollab["Collaboration"]
      ChatAdmin["Chat System\nSocket.IO"]
      MemoryPanel["Memory Panel\nAgent Memory Files"]
      ActorIdentity["Actor Identity Bar\nOperator Reviewer\nSupervisor"]
      ActivityFeed["Activity Feed\nReal-time SSE"]
    end
  end
  subgraph Companions["BLINKIN COMPANIONS — Houston"]
    direction LR
    subgraph CompCore["Core"]
      CompChat["Chat\nSprache"]
      CompForms["Formulare\n12+ Feldtypen"]
      CompMedia["Foto Video\nAudio Upload"]
      CompA2UI["A2UI Widgets"]
    end
    subgraph CompInteractive["Interactive"]
      MultiChoice["Multiple\nChoice"]
      BarcodeScanner["Barcode\nQR Scanner"]
      ImageRecog["Image\nRecognition"]
      OCRScan["OCR\nScan"]
    end
    subgraph CompDesign["Design"]
      Branding["Logo\nBranding"]
      Animations["50+\nAnimations"]
      Carousel["Carousel\n7 Effekte"]
      Themes["Whitelabel\nTheming"]
    end
    subgraph CompActions["Actions"]
      BtnActions["7 Button\nActions"]
      AgentTrigger["Agent Trigger"]
      Webhooks["Webhooks\nPOST/GET"]
      WalletPass["Google\nWallet"]
    end
  end
  subgraph BizApps["BUSINESS APPLICATIONS"]
    direction LR
    RegWatch["RegWatch\nMonitor"]
    ExecEditor["Executive\nEditor"]
    PodcastStudio["Podcast\nStudio"]
    ResearchStudio["Research\nStudio"]
    CustomApps["Custom\nApps"]
  end

3. AGENTS — Alle Agent-Typen

graph TB
  subgraph AgentTypes["AGENT LAYER"]
    direction TB
    subgraph Custom["YOUR AGENTS — Custom per Org"]
      direction LR
      CustomAgents["Per Agent Builder\nkonfiguriert"]
      CustomPersona["Custom Persona\nSOUL.md Pattern"]
      CustomTools["Custom Tool\nAllowlist"]
    end
    subgraph Blinkin["BLINKIN AGENTS — Platform-provided"]
      direction LR
      ExecSummary["Executive\nSummary"]
      ResearchAgent["Research\nAgent"]
      WriterAgent["Writer\nAgent"]
      QAReview["Quality\nReview"]
      TTSAgent["TTS Agent\nElevenLabs"]
      FeedCurator["Feed\nCurator"]
      TranslationAgent["Translation\nAgent"]
      BrandWriter["Brand\nWriter"]
      DataExtractor["Data\nExtractor"]
      PDFFiller["PDF\nFiller"]
      ImageGen["Image\nGenerator"]
      VideoAnalyst["Video\nAnalyst"]
      DeepResearch["Deep Research\nAgent"]
      WebCrawler["Web\nCrawler"]
    end
    subgraph Partner["PARTNER AGENTS — A2A"]
      direction LR
      ExtA2A["External Agents\nvia A2A Protocol"]
      DomainAgents["Domain-specific\nAgents"]
    end
  end

4. ORCHESTRATION + BLINKIN COMPUTER + MEMORY

graph TB
  subgraph Orchestration["ORCHESTRATION LAYER"]
    direction LR
    subgraph Protocols["Protocols"]
      A2A["A2A Protocol\nAgent-to-Agent"]
      A2UI["A2UI Protocol\nAgent-to-UI"]
      AgentSkills["Agent Skills\nagentskills.io"]
    end
    subgraph Patterns["Orchestration Patterns"]
      Sequential["Sequential\nPipeline"]
      Parallel["Parallel\nFan-out/Fan-in"]
      MakerChecker["Maker-Checker\nVerify Loop"]
      Supervisor["Supervisor\nBoss/Worker"]
      Handoff["Handoff\nRouting"]
      GroupChat["Group Chat\nRoundtable"]
      Magentic["Magentic\nAdaptive Plan"]
    end
    subgraph ControlPlaneLayer["Control Plane"]
      WorkItems["Work Items\nDAG Dependencies"]
      SchedulerDaemon["Scheduler Daemon\nLease Drain Reconcile"]
      ArtifactGraph["Artifact Graph\nProvenance Edges"]
    end
    subgraph Governance["Governance - 3 Ebenen"]
      subgraph WorkflowGov["Workflow"]
        HumanReview["Human Review\nGate"]
        PeerReview["Peer Review\nAuto-Approve"]
        ReviewPackages["Review Packages\nWidget Bundles"]
        KillSwitch["Kill Switch"]
      end
      subgraph ActionGov["Action"]
        PolicyEngine["Policy Engine\nTool Allowlists"]
        PolicyProfiles["Policy Profiles\nPer Agent"]
        ToolAuditLog["Tool Audit Log\nHash-Chain"]
        OWASP["OWASP 10/10"]
      end
      subgraph ReliabilityGov["Reliability"]
        CircuitBreaker["Circuit\nBreaker"]
        SLO["SLO\nEnforcement"]
        ErrorBudget["Error\nBudget"]
      end
    end
    subgraph Eval["Evaluation"]
      QualityEval["Quality"]
      AccuracyEval["Accuracy"]
      StyleEval["Style"]
      CostEval["Cost"]
      UserFeedback["Feedback"]
    end
  end

  subgraph Computer["BLINKIN COMPUTER — per Org"]
    direction LR
    subgraph Runtime["Runtime"]
      Sandbox["Isolated Sandbox\nFull OS Shell Files"]
      AgentLoop["Agent Loop\nPlan Act Observe\nEmit Verify"]
    end
    subgraph Routing["Routing"]
      ModelRouter["Model Router\nGemini Opus Haiku\nGPT DeepSeek"]
      ToolRouter["Tool Router\nCLI API Shell\nBrowser MCP opt."]
    end
    subgraph Memory["Memory Layer"]
      MemoryTools["Memory Tools\nmemory_list read\nwrite update delete"]
      ClaudeNative["Claude Native\nmemory_20250818\nContext Editing"]
      ManualCompact["Manual Compaction\nFor non-Claude\nModels"]
      MemoryStore["Memory Store\nSQLite D1 PG R2\nPer Work Item\nPer Chat Room"]
    end
    subgraph Communication["Communication"]
      A2AClient["A2A Client\nAgent Delegation"]
      StreamEmitter["Stream Emitter\nSSE text widget\nstate memory done"]
      ContextEngine["Context Engine\nBusiness Context\nAgent Memory\nRun Context"]
    end
  end

  Orchestration --> Computer
  StreamEmitter -.->|SSE| A2UI
  MemoryTools -.->|read/write| MemoryStore
  ClaudeNative -.->|enhanced| MemoryStore

5. BUSINESS CONTEXT + SYSTEMS OF RECORD

graph TB
  subgraph Context["BUSINESS CONTEXT"]
    direction LR
    WritingRules["Writing Rules\nTonalitaet Stil"]
    BrandGuidelines["Brand Guidelines\nFarben Logo Fonts"]
    Personas["Personas\nZielgruppen"]
    Templates["Templates\nDokumentvorlagen"]
    SOPs["SOPs\nProzesse Freigaben"]
    DomainKnowledge["Domain Knowledge\nBranche Glossar"]
    SkillPlaybooks["Skill Playbooks\nWorkflow Rezepte"]
    AgentSkillsDef["Agent Skills\nagentskills.io\nFormat"]
  end
  subgraph SOR["SYSTEMS OF RECORD"]
    direction LR
    subgraph Internal["Blinkin-managed"]
      KnowledgeBase["Knowledge Base\nArticles Embeddings"]
      DocStore["Document Store\nTipTap JSON Versions"]
      AssetStore["Asset Store\nPDFs Audio Images"]
      OrgDB["Org Database\nAgents Tasks Runs"]
      PlatformDB["Platform Database\nTenants Users Flows"]
      MemoryFileStore["Memory File Store\nAgent Memory Files\nPer Work Item\nPer Chat Room"]
    end
    subgraph External["Customer-connected"]
      CRM["CRM\nSalesforce HubSpot"]
      CMS["CMS\nWordPress Contentful"]
      DataWarehouse["Data Warehouse\nSnowflake BigQuery"]
      Collaboration["Collaboration\nSlack Teams Email"]
      Ticketing["Ticketing\nZammad Intercom"]
    end
  end
  Context --> SOR

6. PLATFORM SERVICES — Querschnittsfunktionen

graph TB
  subgraph PlatformSvc["PLATFORM SERVICES"]
    direction LR
    subgraph Auth["Auth und Security"]
      Auth0["Auth0\nJWT RBAC SSO"]
      CompanionProtect["Companion Protection\nPasswort IP Ablauf"]
      Encryption["Key Encryption\nAES-GCM in KV"]
      TenantIsolation["Tenant Isolation\nBaseTenantEntity"]
      ActorIdentity["Actor Identity\nOperator Reviewer\nSupervisor Agent"]
    end
    subgraph Billing["Billing und Usage"]
      Stripe["Stripe\nSubscriptions"]
      Paddle["Paddle\nPayments"]
      TokenTracking["Token Tracker\nUsage per Org"]
      Quotas["Quotas und Plans\nTier Limits"]
    end
    subgraph Observability["Observability"]
      PostHog["PostHog\nProduct Analytics"]
      Statistics["Statistics\nModule"]
      AuditTrail["Audit Trail\nActivity Log"]
      Notifications["Notifications\nInbox System"]
    end
    subgraph Messaging["Messaging"]
      EmailService["Email\nNodemailer Mailgun"]
      SocketIO["Socket.IO\nWebSocket Realtime"]
      PushNotif["Push\nNotifications"]
      TeamsLogger["Teams Logger\nError Alerts"]
    end
    subgraph Infra["Infrastructure"]
      Redis["Redis\nCache Streams"]
      BullQueue["Bull Queue\nBackground Jobs"]
      CronScheduler["Cron Scheduler\nHeartbeat"]
      Puppeteer["Puppeteer\nWeb Scraping"]
      MultiTenantStore["Multi-Tenant Store\nSQLite per Org\nPostgres Production"]
      BlobStore["Blob Store\nLocal + S3"]
      SchedulerCoord["Scheduler\nCoordinator\nMulti-Worker"]
    end
    subgraph Export["Export und Media"]
      PDFGen["PDF Generation\npdfkit jsPDF pdf-lib"]
      ExcelGen["Excel Export\nexceljs"]
      ZipArchive["ZIP Archive\narchiver"]
      MediaPipeline["Media Pipeline\nFFmpeg Sharp Mux\nHEIC Convert"]
    end
    subgraph BrandingG["Branding"]
      Whitelabel["Whitelabel\nCustom Domain Logo"]
      QRGen["QR Generation\nqrcode.react"]
      GoogleWallet["Google Wallet\nDigital Passes"]
    end
  end

7. AI und LLM Provider Stack

graph LR
  subgraph Providers["MULTI-MODEL PROVIDER STACK"]
    direction TB
    subgraph Primary["Primary"]
      Anthropic["Anthropic\nClaude Opus Sonnet Haiku\n+ Memory Tool native"]
      OpenAI["OpenAI\nGPT-4o GPT-5"]
      Google["Google\nGemini 2.5 Pro/Flash"]
    end
    subgraph Secondary["Secondary"]
      DeepSeek["DeepSeek\nDeepSeek Chat"]
      Groq["Groq\nFast Inference"]
      Mistral["Mistral\nMistral Large"]
      Kimi["Kimi/Moonshot\nLong Context"]
    end
    subgraph Specialized["Specialized"]
      ElevenLabs["ElevenLabs\nTTS + Voice AI\n+ Blinkin Inference Server"]
      Deepgram["Deepgram\nSpeech-to-Text"]
      Replicate["Replicate\nImage Gen Flux"]
    end
    subgraph Search["Search"]
      Tavily["Tavily\nWeb Search"]
      BraveSearch["Brave Search\nWeb Search"]
      GoogleSearch["Google\nSearch API"]
    end
  end

8. Companion-zu-Agent Bridge — 7 Module

Die 7 Module die gebaut werden muessen um die Luecke zwischen Companion-Design und agentischer Ausfuehrung zu schliessen.

graph TB
  subgraph Houston["COMPANION — Houston Runtime"]
    direction TB
    Design["Design Layer\nFormulare Buttons\nMedien Branding\nEXISTIERT"]
    ChatComp["Modul 5: Chat\nFree-Form Chat\nMultimodaler Input\nNEU"]
    Design --- StateStore
    ChatComp --- StateStore
    StateStore["Modul 1: State Store\nform.* + agent.* + chat.*\nData-Binding visible_when\nERWEITERN"]
    StateStore --- SSE
    SSE["Modul 2: SSE Client\ntext widget state\nmemory done\nNEU"]
    SSE --- WidgetRenderer
    WidgetRenderer["Modul 3: A2UI Renderer\nWidget-Katalog\nAction Handler\nNEU"]
    StateStore --- Trigger
    Trigger["Modul 4: Agent-Trigger\ntriggerAgent Button\nForm Events\nNEU"]
    StateStore --- MemPanel
    MemPanel["Modul 7: Memory Panel\nTab Memory in Chat\nKanban und App\nLive File Updates\nNEU"]
  end

  subgraph AgentRuntime["AGENT RUNTIME — Sandbox"]
    Orch["Modul 6: Orchestration\nAgent Loop\nModel Router Tool Router\nA2A Stream Emitter\nNEU — ersetzt LangChain"]
    MemLayer["Modul 7: Memory Layer\nmemory_list read write\nupdate delete\nClaude native enhanced\nManual compaction others\nNEU"]
  end

  Trigger -->|triggerAgent| Orch
  Orch -->|SSE Events| SSE
  WidgetRenderer -.->|widget.action| Orch
  MemLayer -.->|memory files| MemPanel
  Orch --- MemLayer

  style Design fill:#22c55e,color:#000
  style StateStore fill:#3b82f6,color:#fff
  style SSE fill:#f59e0b,color:#000
  style WidgetRenderer fill:#f59e0b,color:#000
  style ChatComp fill:#f59e0b,color:#000
  style Trigger fill:#f59e0b,color:#000
  style MemPanel fill:#f59e0b,color:#000
  style Orch fill:#f59e0b,color:#000
  style MemLayer fill:#f59e0b,color:#000

9. Zwei-Interface-Prinzip

graph TB
  subgraph Creator["CREATOR — Platform / Picasso"]
    KB["Kanban Board + Control Plane\nAlle Agents und Tasks\nFull Config Audit Trail\nToken Tracking\nMemory Files sichtbar"]
  end
  subgraph EndUser["ENDNUTZER — Companion / Houston"]
    CU["Chat + Widgets\nKein Kanban sichtbar\nNur Ergebnisse\nBranded Whitelabel\nMemory als optionaler Tab"]
  end
  subgraph Backend["GLEICHES BACKEND"]
    Agents["Agents"]
    Kanban["Kanban + Scheduler\nbacklog todo in_progress\npeer_review review\napproved done"]
    SandboxB["Blinkin Computer\nSandbox pro Org"]
    MemoryB["Shared Memory\nFiles pro Task\nund Chat Room"]
  end
  Creator --> Backend
  EndUser --> Backend
  Agents --> Kanban
  Kanban --> SandboxB
  SandboxB --> MemoryB

  style Creator fill:#7c3aed,color:#fff
  style EndUser fill:#6d28d9,color:#fff
  style Backend fill:#1e1e2e,color:#fff

10. Protokoll-Architektur

graph LR
  subgraph Protocols["BLINKIN 2.0 PROTOKOLLE"]
    direction TB
    AA["Agent zu Agent\nA2A Protocol\nLinux Foundation"]
    AU["Agent zu UI\nA2UI deklarativ\nGenerative preview"]
    AT["Agent zu Tool\nCLI/API first\nMCP optional"]
    AS["Agent Skills\nagentskills.io\nAnthropic Standard"]
    AM["Agent Memory\nModel-agnostic Tools\nClaude native enhanced\nContext Compaction"]
    UA["UI zu Agent\nwidget.action\ntriggerAgent"]
    AL["Agent zu LLM\nDirect SDKs\nKein LangChain"]
  end

11. Memory Layer — Model-Agnostic Context Sharing

graph TB
  subgraph MemoryArch["MEMORY LAYER"]
    direction TB
    subgraph Tools["Model-Agnostic Memory Tools"]
      MemList["memory_list\nAll models"]
      MemRead["memory_read\nAll models"]
      MemWrite["memory_write\nAll models"]
      MemUpdate["memory_update\nAll models"]
      MemDelete["memory_delete\nAll models"]
    end
    subgraph ClaudeEnhanced["Claude Enhancement"]
      NativeMem["memory_20250818\nClaude-native tool"]
      CtxEdit["Context Editing\nAuto-clear old results\nKeep memory calls"]
    end
    subgraph OtherModels["Non-Claude Models"]
      ManualComp["Manual Compaction\nAfter N tool calls\nSummarize context"]
      MemRecovery["Memory Recovery\nRead files to restore\nstate after compaction"]
    end
    subgraph Scoping["Memory Scoping"]
      PerTask["Per Work Item\nmemories/work-item-42/"]
      PerChat["Per Chat Room\nmemories/chatroom-abc/"]
      PerOrg["Per Org\nTenant isolated"]
    end
    subgraph Visibility["User Visibility"]
      ChatTab["Chat Tab\nMemory neben Chat"]
      KanbanCard["Kanban Card\nMemory auf Task"]
      AppTab["App Tab\nShared Agent Memory"]
    end
  end
  Tools -->|read/write| Scoping
  ClaudeEnhanced -->|enhanced| Scoping
  OtherModels -->|same files| Scoping
  Scoping --> Visibility