텍스트 박스의 끝: AI를 위한 Universal Signal Bus 설계
Source: Dev.to
우리는 현재 AI 산업에 문제를 안고 있습니다: 우리는 UI, 특히 채팅 창에 집착하고 있습니다. 대부분의 AI 에이전트는 깜박이는 커서 뒤에 수동적으로 앉아 인간이 “Help me.”라고 입력하기를 기다립니다. 엔터프라이즈 소프트웨어와 복잡한 시스템 아키텍처에서는 문제가 텍스트 박스에 스스로 나타나지 않습니다—로그 스트림(500 오류), 파일 변경(개발자가 나쁜 코드를 푸시), 혹은 오디오 스트림(급박한 Zoom 회의)에서 나타납니다. AI 에이전트가 누군가 타이핑할 때만 깨어난다면 이미 너무 늦은 것입니다.
범용 신호 버스 아키텍처
논리 흐름도
graph LR
subgraph "Wild Inputs (The Messy World)"
A[User Text]:::input
B[IDE File Change]:::input
C[Server Log 500]:::input
D[Meeting Audio]:::input
end
subgraph "Universal Signal Bus"
direction TB
E(Auto-Detector):::core
subgraph "Normalization Layer"
F[Text Normalizer]:::norm
G[File Normalizer]:::norm
H[Log Normalizer]:::norm
I[Audio Normalizer]:::norm
end
end
subgraph "Clean Interface"
J{Context Object}:::obj
end
subgraph "The Brain"
K[AI Agent]:::agent
end
%% Flow Connections
A --> E
B --> E
C --> E
D --> E
E -- "Type: Text" --> F
E -- "Type: File" --> G
E -- "Type: Log" --> H
E -- "Type: Audio" --> I
F --> J
G --> J
H --> J
I --> J
J -- "Standardized Intent" --> K
%% Styling
classDef input fill:#f9f9f9,stroke:#333,stroke-dasharray: 5 5;
classDef core fill:#e1f5fe,stroke:#01579b,stroke-width:2px;
classDef norm fill:#fff9c4,stroke:#fbc02d;
classDef obj fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px;
classDef agent fill:#d1c4e9,stroke:#512da8,stroke-width:2px;
공통 언어: ContextObject 데이터클래스
from dataclasses import dataclass
from typing import Dict, Any
@dataclass
class ContextObject:
signal_type: SignalType # TEXT, FILE_CHANGE, LOG_STREAM, AUDIO
timestamp: str
intent: str # High‑level extracted intent
query: str # Normalized query for the LLM
priority: str # critical, high, normal, low
urgency_score: float # 0.0 to 1.0
context: Dict[str, Any] # Payload‑specific data
입력 유형 및 정규화
수동 입력 (File Watchers)
개발자가 IDE에서 보안 구성을 삭제하면 AI에게 조언을 구하지 않습니다. 버스는 파일 변경 이벤트를 감지하고 이를 정규화한 뒤 높은 긴급성을 할당합니다:
- Signal: File Change
- Derived Intent:
security_risk_detected - Urgency: 0.9 (Critical)
시스템 입력 (Log Streams)
서버가 500 오류 로그를 발생시킵니다. 버스는 관련 정보를 추출하고 LLM을 위한 쿼리를 생성합니다:
- Signal: Log Stream
- Derived Intent:
server_error_500 - Query: “Analyze stack trace for DatabasePool exhaustion.”
오디오 입력
실시간 회의 중에 참가자의 긴급 요청이 오디오 스트림에서 포착됩니다:
- Signal: Audio Stream
- Derived Intent:
urgent_request
코드 구현
class UniversalSignalBus:
def ingest(self, raw_signal: Dict[str, Any]) -> ContextObject:
# Auto‑detect signal type from raw structure
signal_type = self._detect_signal_type(raw_signal)
# Get appropriate normalizer (Strategy Pattern)
normalizer = self.normalizers.get(signal_type)
# Normalize the wild signal into a standard ContextObject
context_obj = normalizer.normalize(raw_signal)
return context_obj
Interaction Paradigms
- Active Interaction – 사용자가 질문을 합니다 (표준 챗봇).
- Passive Interaction – AI가 개발자의 IDE를 감시하고 고우선순위 변경에만 개입합니다 (Copilot‑style).
- System Interaction – 인프라가 상태 지표를 보고합니다; AI는 타이핑된 프롬프트 없이 스스로 복구하거나 인간에게 알릴 수 있습니다.
빌더를 위한 기회
대부분의 팀은 “뇌”(LLM) 구축에 집중합니다. “귀”에 투자하는 팀은 매우 적습니다. any 스트림—WebSocket 로그, gRPC 오디오, DOM 클릭스트림—을 받아들이고 깨끗하고 정규화된 JSON “Intent Objects”를 출력하는 관리형 서비스는 복잡한 현실 세계와 정돈된 LLM 인터페이스를 연결하는 필수 인프라 계층 역할을 할 것입니다. 우리는 AI를 텍스트‑처리 유틸리티로만 다루는 것을 멈추고, 전체 시스템을 관찰하는 존재로 다루어야 합니다. 진입점은 더 이상 UI 컴포넌트가 아니라 Signal Normalizer입니다.