← Docs hub

DeviceAgent Agentic Function And Data Catalog

이 문서는 A1 기기의 기능을 새로운 Agentic 시나리오로 조합하기 위한 기능·데이터 카탈로그다. MR6 DeviceAgent, IotAgent, on-device Agent, Cloud A2A Planner, TaskManager의 실제 경계를 기준으로 작성했다.

핵심은 함수를 호출할 수 있다장기 workflow의 한 단계로 안전하게 연결할 수 있다를 구분하는 것이다.

DeviceAgent Agentic Function Map

0. 분석 기준

영역 기준
MR6 SoC a1-packages-mr6, branch task_manager, base SHA be187133ac5b + 2026-07-30 working tree
on-device Agent skmagic_ondeviceai_agent, branch feature_a2a_task_orchestration_bridge, SHA b857a620 + untracked WIP helpers
Cloud A2A backend-cloud-llm-lambda, branch feature_task_orchestration_on_new_logic, base SHA 7c8a5d40429d + working tree
evidence date 2026-08-09

이 문서의 현재는 위 working tree를 포함한다. base SHA만 checkout하면 일부 TaskManager, on-device bridge, Cloud orchestration 파일이 없을 수 있다.

1. 기능 성숙도

등급 의미 Planner 사용 원칙
M3 Managed TaskManager 등록, 완료·취소·timeout 계약 존재 복합 workflow에 직접 사용
M2 Observable 실행 함수와 상태/event는 있으나 TaskManager 계약 일부 누락 adapter 또는 domain lifecycle 보강 후 사용
M1 Callable 단발 호출은 가능하지만 완료를 신뢰할 terminal event가 없음 마지막 단계 또는 사용자 확인형으로 제한
M0 Internal 내부 상태·정책·진단용 Planner에 직접 노출하지 않고 context evidence로만 사용

MR6의 TaskExecutorBootstrap에는 60개 등록 task method가 있고, 이 method들은 11개 executor 객체에 나뉘어 매핑된다. 등록 method 수와 executor 구현체 수는 같은 지표가 아니다. 또한 DeviceAgent 전체 기능은 이보다 훨씬 넓다. MainApi, AMR/Vision/IoT/Streaming/WSS AIDL, domain manager가 가진 기능 중 일부만 TaskManager에 편입된 상태다.

현재 자동 감사 범위에는 AMR·Vision·IoT·Streaming AIDL의 68개 저수준 AIDL method도 포함한다. 이 중 47개가 AMR, 3개가 Vision, 4개가 IoT, 14개가 Streaming surface다. 이 목록은 Planner에 직접 노출되는 목록이 아니다. 저수준 함수, lifecycle 관리 함수, 의미 capability를 같은 평면으로 취급하면 LLM이 안전 정책과 완료 조건을 우회하게 된다.

1.1 네 개의 실행 평면

요약하면 68개 저수준 AIDL method, 60개 TaskManager 등록 method, 24개 Capability Card 연결 task method를 서로 다른 실행 평면으로 관리한다.

평면 현재 수량 사용 원칙
저수준 domain AIDL 68 opSetTargetPosition, startStreamingMode Planner 직접 선택 금지
TaskManager 등록 method 60 setMoveTo, returnToStation, observeVisionSemantics DeviceAgent lifecycle 권위
Capability Card 연결 task method 24 Card가 실제 관리 실행에 사용하는 부분집합 시나리오 구성 근거
Cloud runtime binding 14 connected, 3 partial, 1 blocked start_room_cleaning -> stationary_purify catalog·route·primitive를 명시적으로 연결

Capability Card ID와 Cloud runtime capability ID는 항상 같지 않다. 예를 들어 설계 Card start_room_cleaning은 현재 Cloud catalog의 stationary_purify에 연결된다. 반복·일회성 예약은 SCHscheduleTask/scheduleWorkflow, 단계 상대 지연은 after_step workflow primitive를 사용한다. 이 연결은 deviceagent-cloud-runtime-binding.v1 manifest로 관리한다.

Capability Card의 runtime.task_methods에는 MR6 TaskExecutorBootstrap에 실제 등록된 method만 둔다. Binder·TaskManager framework API인 submitWorkflow, scheduleWorkflow, getDevicePlanningContextframework_methods로 분리한다. 이는 발화 규칙이 아니라 실행 평면 정합을 위한 경계다. 즉 발화 규칙이 아니라 실행 평면 정합을 관리한다.

60개 method의 Cloud 계획, On-device 전달, DeviceAgent 완료 증거를 분리한 상세 표는 DeviceAgent Executor Closure Matrix를 기준으로 한다.

1.2 기능군을 Agent 관점으로 다시 묶기

기능군 Agent 역할 대표 입력 대표 출력·증거 현재 판단
자율주행·Map Act + Observe + Verify room/Area, 복귀 목표, 회전 관찰 현재 위치, 스테이션 증거, movement.arrived, 도킹 복합 workflow 사용 가능, 탐색 E2E 필요
청정·공기질 Observe + Act + Verify 공기질 snapshot, 청정 mode/Area 청정 상태, report, cleaning.stopped 기본 Agentic 조합 가능
Vision Observe 로컬 detection stream, 정지 단발 관찰 사람 지속 감지, 저조도, semantic-only 최신 결과 raw frame 비노출, 단발 관찰 E2E 필요
Security/WSS Act + Observe + Verify 순찰 Area, mode, 정책 session/stage, 인증 outcome, patrol terminal 코드 연결, 실제 WSS E2E 대기
AWS·IoT Connect + Relay + Observe MQTT command, correlation cached 연결, response, upload lifecycle live probe와 물리 완료는 아님
LLM·음성·콘텐츠 Decide + Interact 사용자 목표, semantic context pipeline 상태, 응답, TTS 요청 TTS playback terminal 공백
Schedule·Interaction Orchestrate 절대시각, 상대지연, lifecycle admission, interaction terminal 장기 workflow 기반으로 사용 가능
앱·VitalSign Human checkpoint 앱 진입, 사용자 측정 session start/end 성공·취소 typed 결과 필요
건강·정비·정책 Observe + Admit 배터리, 오류, 필터, thermal, privacy 실행 budget, blocker, 예방 정비 신호 일부 context 미노출
LiveView·Streaming Remote observe consent, stream session stream/upload/manual motion state 보안·terminal 보강 전 NO_GO

이 표에서 Decide는 임의 DeviceAgent method 선택을 뜻하지 않는다. Cloud Planner/Supervisor가 목표와 의미 capability를 선택하고, DeviceAgent가 현재 상태·정책·resource·물리 완료를 다시 판정한다.

2. 시스템 책임과 데이터 흐름

아래는 목표 폐루프다. 현재 MR6 DeviceAgent, Cloud A2A, on-device Agent feature_a2a_task_orchestration_bridge에는 planning context, orchestration response, workflow 제출, task-event relay 골격이 연결돼 있다. task event와 semantic observation은 DurableOrderedDeviceEventOutbox를 통해 app-private queue에 먼저 저장되고 순서대로 전송된다. 다만 이 파일을 포함한 일부 bridge는 현재 working tree의 untracked WIP이므로, branch 추적과 실기기 kill/restart replay 증거는 아직 남아 있다.

사용자 목표
  -> Cloud A2A Router / Planner
     - 의미 capability 선택
     - 단계, 의존관계, 조건, 시간 구조화
  -> on-device Agent Bridge
     - Cloud plan을 DeviceAgent Bundle 계약으로 변환
     - task event와 context를 Cloud로 relay
  -> DeviceAgent TaskManager
     - queue, timeout, cancel, completion, retry, schedule 소유
  -> domain manager
     - AMR / Cleaning / Vision / WSS / Streaming / LLM / Schedule
  -> 물리 상태와 callback
     - task event + device context
  -> Cloud A2A bounded replan
계층 소유하는 판단 소유하지 않는 판단
Cloud A2A 사용자 목표, capability 조합, 재계획, 사용자 확인 모터·카메라 안전 우회
on-device Agent 음성/텍스트 세션, 계약 변환, event relay task 성공 임의 판정
TaskManager 실행 순서, queue, timeout, cancel, terminal event 사용자 의도 해석
DeviceAgent domain 물리 실행, safety gate, raw 상태 장기 사용자 목표
IotAgent AWS IoT MQTT 연결, topic 변환, response publish Cloud A2A plan 의미

2.1 현재 on-device 경로

현재 feature_a2a_task_orchestration_bridge@b857a620의 실제 경로:

STT
  -> ForegroundService.buildVoiceContext
     -> DeviceCommunicator.getDevicePlanningContext
     -> voice_context.device_context
  -> Cloud chat request
  -> orchestration.device_workflow_requests / device_task_requests
  -> DeviceCommunicator submitWorkflow / submitTask
  -> DeviceAgent TaskManager
  -> onTaskEvent callback
  -> Cloud /task_event
  -> workflow delta / 후속 device request / bounded replan

현재 branch의 VoiceContext, ChatRequest, OrchestrationResponse, TaskEventRequest에는 필요한 payload가 있고, DeviceCommunicatorgetDevicePlanningContext, workflow/task 제출, callback relay를 구현한다. 다만 다음 문제가 남는다.

따라서 이 문서의 Agentic 시나리오를 실사용하기 전에 on-device bridge를 현재 branch 안에서 추적 가능한 단위로 정리하고, ordered durable callback, workflow persistence, Binder reconnect 시 명령 보존, orchestration-only 응답 처리를 먼저 해결해야 한다.

3. 자율주행과 Map

3.1 실제 함수

AMR AIDL은 다음 저수준 기능을 제공한다.

Planner가 직접 저수준 AIDL method를 고르지는 않는다. 의미 capability가 아래 TaskManager method로 변환된다.

의미 capability 실제 method 입력 완료 evidence 성숙도
지정 공간 이동 setMoveTo targetRoom, areaId, positionId, 필요 시 좌표 movement.arrived, controller idle M3
스테이션 복귀 returnToStation timeout movement.stationCharging M3
수동 이동 setMoving action 또는 이동 값 명령 결과·이동 상태 M2
이동 정지 stopMovement 없음 이동 idle M3
Follow-me setFollowMe, getFollowMeStatus enable AMR 상태 M2
Map 요청 reqmap 없음 mapping.dataReceived M3
Map 존재 확인 isMapFilePresent 없음 즉시 조회 M3
AMR 관찰 설정 setAMRMonitoring 설정 값 명령 결과 M2

3.2 관찰 데이터

현재 device_context.v1에 포함되는 Map/위치 데이터:

map:
  available: true
  editable: false
  room_count: 4
  rooms:
    - id: "2"
      name: "거실"
      x: "..."
      y: "..."
      theta: "..."
      station: false
location:
  current_room_id: "2"
  current_room_name: "거실"
  x: "..."
  y: "..."
  theta: "..."
  is_on_station: false
movement:
  moving_status: 0
  is_moving: false
  is_paused: false

3.3 조합 제약

현재 구현상 추가 위험:

따라서 외부 Planner 입력에는 strict numeric/range/map validation과 모호한 POI 거부가 필요하다.

4. 청정과 환경

4.1 실제 실행 기능

의미 capability 실제 method/별칭 주요 입력 완료 evidence 성숙도
고정 청정 setAirCleanerOperation, startBasicAirClear action, mode, speed, ai cleaning.started/stopped M3
전체 청정 startAllAirClear mode, 시간·속도 cleaning.reportDone M3
선택 공간 청정 startSelectiveAirClear Area 목록 cleaning.stepComplete/reportDone M3
공기질 기반 청정 startAirSensorAirClear sensor/시간 정책 cleaning.reportDone M3
일시정지·재개 pauseAirClear, resumeAirClear 없음 청정 상태 전이 M2
정지 stopCleaning, stopAirClear, ampStop 없음 cleaning.stopped M3
동작 조회 getAirCleanerOperation 없음 즉시 조회 M3

4.2 환경 데이터

현재 Planner context가 받는 실내 데이터:

DeviceAgent에는 실외 공기질·날씨, AQM 목록, outdoor 연동 청정, 청정 리포트도 존재하지만 모두 device_context.v1에 포함되지는 않는다.

현재 MR6 공기질 snapshot은 센서 원천의 source_valid, observed_at_ms, freshness_ms, ttl_ms, stale, usable을 포함한다. 웜업 중 sample은 source_state=warming_up, usable=false로 표시하며, Cloud는 해당 수치를 조건과 답변에서 제외한다. 다만 방별 과거 추세와 실기기 sample cadence에 근거한 TTL 검증은 남아 있으므로, 단일 현재값만으로 장기 자율 청정 정책을 확정하지 않는다.

4.3 Agent 활용

상태 조회 -> 수치 해석 -> 사용자 상황/시간대 확인
-> 청정 제안 또는 자동 실행 -> 개선 추세 관찰 -> 종료/연장 결정

공기질 수치 자체는 task가 아니라 observation이다. Planner는 수치 이름을 그대로 TTS로 나열하지 않고, freshness와 등급을 확인한 뒤 사용자 언어로 요약한다.

배터리와 공기질은 주기 sample TTL을 사용하고 AWS·음성 LLM 상태는 현재 부팅에서 producer가 보고한 event-driven 상태로 관리한다. 자세한 필드와 호환 정책은 Device Source Freshness Contract를 참조한다.

4.4 실행 계약 점검

5. Vision AI와 사람 인식

5.1 현재 로컬 Vision 기능

VisionAIManager는 VisionAgent의 object detection report를 받아 class, confidence, bbox, light_level을 처리한다.

로컬 시나리오 대상 진입/해제 판단 활용
인터랙션 준비 person tilt 상태별 confidence, 미감지 1분 사용자 접근 준비
인터랙션 스케줄 person tilt-up에서 0.8 예약 interaction 시작 조건
GPS 인터랙션 person tilt-up에서 0.8 귀가·접근 interaction
디스플레이 틸팅 person 감지, 미감지 3분 화면 방향 조절
매너 모드 person 감지, 미감지 15초 주변 사용자 고려
셀프테스트 person 0.9 카메라/Vision 진단
WSS 사람 감지 person 0.6 이상 1초 지속 보안 검증 시작
저조도 감지 light_level=dark 3초 지속 보안 이벤트/촬영 품질 판단

Vision은 setVisionEnable로 활성화/비활성화되며, 카메라 연결을 3초 주기로 점검해 camera error를 보고한다.

5.2 현재 한계

따라서 현재처럼 지속 감지된 사람, 저조도, 인증 outcome만 노출하고 raw bbox/frame과 이름, member ID, 얼굴 유사도, PIN은 Cloud prompt에 넣지 않는 것이 맞다. Cloud Planner는 이 중 non-stale allowlist event를 최대 6건만 다음 turn context로 사용하며, event type만으로 재계획하지 않는다.

5.3 현재 의미 관찰 경계

VisionAIManager raw report
  -> WssVisionObserver debounce/confidence 판정
  -> WssManager domain 의미 확정
  -> WssSemanticObservationAdapter
  -> identity-free semantic observation
event 의미 포함 가능 금지
vision.low_light_changed 지속 저조도 상태 변화 low-light boolean frame, bbox
security.person_detected WSS 기준을 통과한 지속 사람 감지 area ID, domain request ID 이름, face payload
security.verification_result PIN/face 인증의 의미 결과 outcome, method, attempt, terminal PIN, member ID, similarity

세 이벤트는 현재 requires_cloud_decision=false인 telemetry다. TaskManager 시작 Security session은 workflow/step correlation을 포함할 수 있지만, correlation 존재나 event type만으로 실시간 Supervisor 재계획을 주장하지 않는다.

6. WSS 보안 순찰

6.1 실행과 상태

WSS는 단순 카메라 on/off가 아니라 이동·사람 탐지·PIN/얼굴 인증· event asset 업로드를 포함한 자체 state machine이다.

기능 함수 상태/event 성숙도
가용성 확인 checkSecurityBasicAvailability available + reason bitmask M3
시작 startSecurityMode / requestStartWssMode security.started M3
일시정지 pauseSecurityMode / requestPauseWssMode security.paused M3
재개 resumeSecurityMode / requestResumeWssMode security.resumed M3
종료 stopSecurityMode / requestStopWssMode security.stopped M3
순찰 완료 내부 patrol lifecycle security.patrolCompleted M3 evidence
PIN 인증 verifyPinCode verify result M2
얼굴 인증 verifyFace face result M2
event asset clip 요청·암호화·업로드 복구 request/correlation/upload event M2

현재 TaskManager registry와 Cloud security_patrol capability에는 start/pause/resume/stop이 연결돼 있다. 이미 같은 상태인 요청은 idempotent 성공으로, 불가능한 전이는 abort로 기록한다. 이 성숙도는 코드·JVM 회귀 기준이다.

2026-07-30에는 platform-signed MR6 DeviceAgent를 실기기에 배포하고 TaskManager security queue의 startSecurityMode dry-run이 PENDING -> STARTED -> COMPLETED와 terminal callback으로 끝나는 것을 확인했다. 실제 checkSecurityBasicAvailability도 MainApi 경로에서 완료됐지만 현재 보드 상태는 available=false, reasonCodes=5였다. 이 bitmask는 WSS 미구독과 PIN 미등록을 뜻하며 privacy, home lock, network, tilting, camera 오류는 아니다. 따라서 실제 WSS session의 시작·pause·resume·stop과 Vision 연계 E2E는 아직 검증 전이다.

6.2 WSS 상태 모델

wss:
  running_state: stopped | started | paused
  stage: idle | person_detecting | verify_pin | verify_face
  moving_state: stopped | moving | paused
  current_index: 0
  current_room: "거실"
  paused_by_low_battery: false
  mode: basic | all | selected
  repeat_patrol: true
  patrol_interval: 300
  end_time: "23:00"

가용성 차단 사유:

6.3 재계획 포인트

7. LiveView와 원격 이동

StreamingManager는 별도 IStreamingControl 계약을 사용한다.

현재 No-Go: WssServiceStreamingService가 exported 상태지만 signature permission이 없고, Streaming Binder Stub의 start/stop/upload/ manual movement/rotate에 호출자 UID·패키지·서명 검증이 없다. 현재 상태로 외부 Agentic capability에 노출해서는 안 된다.

기능 실제 함수 주요 데이터
스트리밍 시작·종료 startStreaming, stopStreaming userId, roomId, signedUrl, correlationId
업로드 upload URL/key 요청, setUploadDataComplete 암호화 key, iv, tag, file size
수동 주행 movementControl(ms, rs), rotate 이동 결과·오류
AMR manual mode changeAmrManualMode correlationId, 30초 timeout
상태 start/stop/starting/stopping 서비스 종료 reason
원격 환경 station 여부, keep-out/obstacle/error movement state

스트리밍 시작 시 Vision AI와 자원 경합을 조정하며, VitalSign 실행 중에는 시작을 거부한다. 현재 LiveView는 TaskManager registry에 포함되지 않아 복합 workflow 중간 단계로 직접 사용하면 안 된다.

필요한 보강:

  1. Service signature permission과 Binder caller 이중 검증.
  2. startLiveView/stopLiveView semantic capability.
  3. streaming.started/stopped/failed terminal event.
  4. WSS/Vision/VitalSign/LLM과의 resource lease.
  5. 사용자 consent와 privacy policy.
  6. signed URL 만료와 업로드 failure recovery.

8. LLM, STT, TTS와 콘텐츠 Agent

8.1 DeviceAgent LLM 상태

코드 상태 Agentic 의미
0 idle 외부 TTS·기기 실행 handoff 가능
1 STT 처리 사용자 발화 수집 중
2 Cloud LLM 처리 Cloud 응답 대기
3 on-device LLM 처리 로컬 추론 중
4/5 LLM TTS 처리/재생 사용자 응답 출력 중
6 pause 음성 세션 일시정지
7 stop 세션 종료
8/12 초기화/재초기화 명령 제한
9 command requesting DeviceAgent 명령 요청 중
10/11 외부 TTS 처리/재생 interaction 등 외부 TTS

8.2 실제 기능

TaskManager에는 setChangeLlmStatus, setLlmTts, stopLlm, stopTts가 등록돼 있다. 다만 setLlmTts는 재생 요청 완료일 뿐 TTS 재생 종료가 아니다. tts.playbackCompleted가 없으므로 “안내가 끝난 뒤 이동” 같은 강한 순서 계약에는 아직 사용할 수 없다.

콘텐츠 Agent는 DEF/FRG/STM/ETR 등이 소유하고, DeviceAgent는 음성 출력과 세션 상태만 소유한다. 퀴즈·이야기·뉴스 요약을 DeviceAgent method로 하드코딩하지 않는다.

9. AWS IoT, MQTT와 Cloud

9.1 실제 경로

AWS IoT MQTT topic
  -> IotAgent CmdTopic
  -> command JSON parsing
  -> IIotControl.sendModuleCommand
  -> DeviceAgent MainApi
  -> legacy 실행 또는 TaskManager submitTask
  -> response publish

IotTaskManagerBridge는 command에 task metadata 객체가 있을 때 기존 method를 submitTask로 감싼다. task.managed=false를 명시하면 legacy 경로를 유지하고, managed가 생략된 task 객체는 현재 구현상 true가 기본값이다. task 객체 자체가 없으면 legacy 경로를 유지한다.

보존되는 metadata:

따라서 AWS 명령 전체가 자동으로 TaskManager에 들어가는 것은 아니다. 기존 topic 호환을 유지하면서 task metadata가 있는 명령을 lifecycle 관리 대상으로 승격하며, 명시적 opt-out은 managed=false다.

9.2 AWS 기능군

9.3 관찰 주의

DeviceAgent의 getAwsConnect는 live probe가 아니라 IotAgent callback이 써주는 캐시다. aws_connect_cached, Wi-Fi 상태, 최근 publish error, 마지막 성공 시각을 함께 봐야 Cloud 가용성을 판단할 수 있다.

현재 Connected callback 뒤 subscribe를 요청하면 연결 완료로 처리하며 SUBACK evidence는 없다. 앞으로는 transport_connected, subscription_ready, last_transition_at, publish ACK를 분리해야 한다.

추가 계약 위험:

10. 스케줄, Interaction, 앱 세션

10.1 세 가지 시간 계층

계층 소유자
반복 생활 스케줄 Product ScheduleManager 매일 8시 웰컴
일회성 절대 시각 TaskManager scheduled task/workflow 오늘 9시 청정
단계 상대 지연 workflow trigger 도착 30초 후 VitalSign

Cloud가 시간을 직접 세지 않는다. Planner는 시간과 의존관계를 구조화하고 DeviceAgent가 Alarm/queue/condition을 관리한다.

10.2 제품 Interaction

Interaction 내부 구성 완료 event
Welcome weather 이동 + 날씨 안내 interaction.completed
Welcome cleaning 이동 + 안내 + 청정 interaction.completed
Wake-up basic 이동 + 모닝콜 interaction.completed
Wake-up weather 이동 + 날씨 모닝콜 interaction.completed
Relax 이동 + 콘텐츠/휴식 동작 interaction.completed

세부 단계:

started -> arrived -> actionStarted -> actionEnded -> returning -> completed

기존 interaction은 pause/resume/return 정책이 있으므로 Planner가 내부 동작을 작은 raw command로 다시 만들기보다 interSchedule domain capability를 호출하는 것이 안전하다.

10.3 VitalSign과 Launcher 앱

VitalSign은 setLauncherScreen으로 앱을 열고 setAppStatus를 통해 app.sessionStarted/Ended를 관찰할 수 있다.

현재 한계:

따라서 현재는 app.sessionEnded 뒤 사용자 확인 또는 typed result event가 필요하다. 단순 timeout을 성공으로 처리해서는 안 된다.

11. 기기 건강, 정비와 정책

DeviceAgent 내부에는 다음 데이터가 있다.

영역 데이터/함수 Agent 활용
배터리 잔량, 충전, 저전력, 효율 장기 workflow admission, 복귀
필터 상태, 용량, 교체일, reset 교체 제안, 청정 성능 설명
부품 사용량 fan, motor, lidar, camera, mic, speaker, LCD 등 예방 정비
열/리소스 SoC fan, RPM, temperature, CPU/RAM pressure 고부하 작업 지연
firmware 버전, update 상태, ARM/MCU result OTA 계획·복구
오류 error status, alert, resolved state 실행 차단·원인 설명
정책 privacy, home lock, night/manner/ghost mode 실행 허용·사용자 확인
네트워크 Wi-Fi, AWS cache, provisioning Cloud/local fallback

배터리·공기질·Map·이동·청정 외에 AWS cache, LLM pipeline, WSS Security, 최근 의미 관찰까지 현재 planning context에 들어왔다. 다음 확장 우선순위는 policy_blockers -> streaming -> maintenance -> resource다.

12. 현재 Planning Context와 Blind Spot

12.1 현재 제공

device_context.v1:
  main_state: "..."
  battery: {}
  map: {}
  location: {}
  air_quality: {}
  cleaning: {}
  movement: {}
  network:
    aws_iot_connected: false
    source: "iot_agent_status_cache"
  voice_llm:
    pipeline_state: "idle"
    voice_session_active: false
    model_readiness: "unknown"
  security:
    session_state: "stopped"
    stage: "idle"
    current_area_id: ""
    low_light: false
  interactions:
    registered_count: 0
    exposed_count: 0
    registered_schedules: []
  semantic_observations:
    contract_version: "device-semantic-observation.v1"
    event_count: 0
    recent: []
  task_manager:
    busy: false
    running_tasks: []
    queue_summary: []
  capabilities:
    movement: true
    room_cleaning: true
    return_to_station: true
    tts: true
    schedule: true

network, voice_llm, security, interactions, semantic_observations는 현재 DevicePlanningContextProvider가 생성한다. 다만 AWS 값은 live probe가 아니며, LLM model readiness는 native 생존 증거가 없어 unknown이다.

policy blocker·Streaming·maintenance·resource는 아직 미노출 상태다.

semantic observation과 task-event 응답이 같은 OrchestrationResponse 실행 관문을 사용한다. 이 관문은 workflow state와 agent activity를 반영한 뒤 device_workflow_requests, device_task_requests, device_control_requests를 기존 TaskManager bridge에 전달한다. 서비스 handler가 없는 경우에는 DeviceCommunicator의 범용 fallback을 사용하고, 기존 task-event handler도 호환 경로로 유지한다.

따라서 Cloud가 만든 의미 판단을 On-device 실행 요청으로 연결하는 코드 공백은 닫혔다. 다만 platform-signed 실기기에서 observation → Supervisor → replan → TaskManager → physical terminal까지 확인한 E2E 증거는 아직 없다.

12.2 추가해야 할 관찰 계약

Context 필요한 필드 이유
policy_blockers privacy, home lock, night, map edit, upgrade, VitalSign plan admission
network_health Wi-Fi, subscription/publish health, field freshness, last error cached AWS boolean 보강
vision_summary WSS 밖 person presence, camera health, freshness proactive interaction
streaming state, owner, correlation resource conflict
maintenance filter/part state 예방 정비
resource thermal/CPU/RAM pressure 장기 실행 안정성
recent_task_events 최근 terminal/reason 반복 실패 회피

raw frame, bbox, 전체 로그를 prompt에 넣지 않는다. 각 domain이 freshness가 있는 semantic summary를 제공해야 한다.

12.3 Autonomy의 현재 의미

현재 MR6에서 AUTONOMOUS는 독립적인 자율 Planner가 아니라 TaskSource와 caller policy의 출처 분류 수준이다. 별도 autonomy producer, plan provenance, 취소·보상·physical terminal 계약은 아직 없다. 따라서 “DeviceAgent가 자체 목표를 세우고 재계획한다”고 표현하면 안 된다.

13. 실제 TaskManager lifecycle

현재 MR6에서 실제 사용하는 task event:

TIMEOUT, NEEDS_USER_INPUT을 모든 task의 독립 event name으로 가정하면 안 된다. 일반 task의 timeout과 정책 차단은 주로 FAILEDreason_code=TIMEOUT|STATE_CONDITION_FAILED|CAPABILITY_UNAVAILABLE처럼 reason으로 구분한다. 다만 예약 task는 admission 시점의 busy 또는 missed-run 만료를 BLOCKED + reason_code=TASK_MANAGER_BUSY| MISSED_RUN_EXPIRED로 내보낸다. Cloud A2A는 경로별 event 이름과 reason을 함께 해석해야 한다.

movement.arrived, cleaning.stopped, security.started 등은 task event 이름이 아니라 executor가 기다리는 completion target이다.

14. 기능 조합 레시피

사용자 목표 기능 조합 핵심 관찰·분기
안방 청정 후 복귀 이동 -> 청정 -> 복귀 도착, 청정 종료, 도킹
가장 공기 나쁜 방 청정 room AQ 조회 -> target 선택 -> 이동 -> 청정 AQ freshness, room mapping
도착 후 VitalSign 이동 -> 앱 세션 시작 도착 event, app result
청정 중 뉴스 요약 청정 시작 -> FRG -> DEF/TTS 청정과 콘텐츠 lifecycle 분리
귀가 웰컴 GPS/schedule -> person 감지 -> Welcome privacy, home lock, 사용자 존재
야간 보안 순찰 WSS availability -> patrol -> verify/upload 저조도, 사람, 네트워크, 배터리
원격 집 확인 LiveView start -> remote move -> stop consent, resource lease
필터 관리 filter trend -> 청정 성능 비교 -> 교체 제안 사용량, 개선 속도
네트워크 장애 대응 AWS/Wi-Fi 변화 -> local capability 유지 캐시 freshness, 재연결
배터리 적응 workflow 작업 전 battery 확인 -> 실행/축소/복귀 예상 소요시간, 충전 상태
웰컴 후 복귀 product interaction -> completed -> return interaction terminal
보안 중 사용자 호출 WSS pause -> 음성 세션 -> resume/replan LLM status, security stage

현재 E2E에 가까운 이동·환경·Interaction 조합은 Adaptive Welcome & Care Supervisor에서 본다. 자율주행·Vision·WSS·AWS·LLM까지 DeviceAgent 전체 기능을 하나의 목표로 묶은 장기 대표 설계는 Adaptive Home Guardian Supervisor에서 본다.

15. 대표 Agentic 시나리오: Adaptive Home Guardian

전체 Goal/Observe/Decide/Act/Evidence 흐름, 현재 연결 상태, 검증 시나리오는 전용 Supervisor 문서에 정리했다.

15.1 목표

사용자 부재 중 집을 순찰하고, 환경과 보안 상태를 관찰하며, 배터리· 네트워크·프라이버시 제약에 맞춰 계획을 바꾸는 장기 Agent다.

goal:
  protect_home: true
  preserve_privacy: true
  return_to_station: true
success_criteria:
  - requested_patrol_areas_observed
  - meaningful_events_handled
  - device_safely_docked
constraints:
  - never_bypass_device_policy
  - no_raw_video_to_llm
  - user_can_cancel
  - bounded_cloud_replan

15.2 초기 계획

1. WSS 가용성, Map, 배터리, 네트워크, privacy 확인
2. 순찰 Area와 종료 조건 확정
3. WSS 시작
4. 각 Area 이동
5. Vision person/low-light event 관찰
6. 의미 event가 있으면 이동 pause + PIN/face 검증
7. 필요할 때만 암호화 clip 업로드와 사용자 알림
8. 순찰 완료 또는 배터리 조건에서 스테이션 복귀
9. 결과 요약

15.3 관찰과 재계획

관찰 local action Cloud decision
정상 Area 도착 다음 순찰 step 호출 안 함
사람 감지 이동 pause, 검증 시작 검증 실패·불확실 때만 알림 판단
얼굴/PIN 성공 순찰 resume 호출 안 함
저조도 evidence quality 표시 대체 확인/사용자 알림
배터리 부족 pause, 복귀·충전 충전 후 재개 여부
AWS 단절 로컬 감지 유지, upload recovery 사용자 알림 시점
주행 실패 local bounded retry 다른 Area/복귀/취소
사용자가 말함 LLM 세션 lease WSS pause/resume/replan
종료 시각 WSS stop, 복귀 결과 요약

15.4 Experience state

experience:
  contract_version: experience.v1
  kind: adaptive_home_guardian
  status: active
  phase: patrolling
  current_area_id: "2"
  remaining_area_ids: ["3", "6"]
  device_workflow_id: "wf_guardian_001"
  security:
    state: started
    stage: person_detecting
    paused_by_low_battery: false
  observation_subscriptions:
    - movement.arrived
    - security.person_detected
    - security.verification_result
    - vision.low_light_changed
    - security.patrolCompleted
    - network.awsChanged
    - battery.low
    - voice.sessionChanged
  replan_budget:
    local_retries: 1
    cloud_replans: 2
    user_questions: 1

15.5 이 시나리오가 Agentic인 이유

16. 구현 단계

Security Gate: 외부 노출 전 필수

  1. WSS/Streaming exported service를 signature permission으로 보호한다.
  2. Binder Stub에서 UID, 허용 패키지, platform certificate를 재검증한다.
  3. 외부 task metadata는 device-side policy allowlist로 제한한다.
  4. 이동 좌표와 Area resolve를 strict validation으로 바꾼다.
  5. accepted response와 physical terminal event를 분리한다.

Phase 0: on-device bridge 정합

  1. Cloud orchestration request/response와 DeviceAgent TaskManager Binder API를 하나의 coherent branch에 통합한다.
  2. reconnect 전후 명령 큐와 초기 상태를 보존한다.
  3. task event에 event ID와 idempotency key를 부여하고 durable outbox로 순서 있게 전송한다.
  4. workflow 상태를 영속화하고 동시 workflow, PAUSED, terminal dedup을 정의한다.
  5. orchestration-only 응답을 choices 없이 처리한다.

Phase 1: 관찰 계약

  1. 현재 voice_llm, network, WSS snapshot과 최근 allowlisted semantic event projection을 유지하고 policy 상태를 추가한다.
  2. person/low-light/verification event의 workflow/step correlation을 platform-signed 실기기에서 검증하고 asset lifecycle을 연결한다.
  3. WSS pause/resume/stop TaskManager capability의 실기기 E2E를 검증한다.
  4. task event에 domain stage와 reason freshness를 보존한다.

Phase 2: Resource lease

  1. Security·Streaming·VitalSign의 확정 충돌은 typed task와 현재 상태를 사용하는 TaskDomainResourcePolicy로 1차 코드화했다.
  2. Planner는 capability를 선택하고 DeviceAgent가 각 workflow step 실행 직전에 admission을 다시 판정한다.
  3. recovery를 위해 Security pause/resume/stop은 충돌 상태에서도 허용한다.
  4. Vision, motion, mic, display와 parallel child 선점까지 포괄하는 공통 owner/lease registry는 후속 과제다.

Phase 3: Adaptive Home Guardian MVP

  1. 보안 순찰 시작·완료·복귀 workflow.
  2. 사람/저조도/저전력/AWS 단절 event.
  3. local retry와 bounded Cloud replan.
  4. A2A console에서 phase, current area, domain state, decision reason 표시.

Phase 4: 기능 확장

17. 검증 기준

검증 통과 기준
capability mapping 의미 capability가 허용된 실제 method로만 변환
terminal event 명령 수락과 물리 완료를 구분
context freshness 모든 관찰값에 source와 updated time 존재
policy privacy/home lock/저전력/상호배타 기능 우회 없음
replan 정상 progress에는 LLM 재호출 없음
failure recovery retry, ask, cancel, compensate, return 중 하나로 수렴
trace workflow/step/task/correlation ID가 end-to-end 보존
privacy raw Vision data를 일반 prompt에 넣지 않음

18. 관련 문서

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date