Natural-Language Agent Harnesses: 자연어로 에이전트 제어 로직을 명세하는 프레임워크
Natural-Language Agent Harnesses
TL;DR Highlight
에이전트의 제어 로직(harness)을 코드 대신 자연어로 작성하고 공유 런타임이 실행하게 해서, 설계 패턴을 비교·재사용·분석할 수 있게 만든 프레임워크.
Who Should Read
LangChain, AutoGen 같은 멀티에이전트 프레임워크로 복잡한 코딩/자동화 에이전트를 만드는 백엔드·AI 엔지니어. 에이전트의 단계별 제어 로직을 체계적으로 설계하고 재사용하고 싶은 개발자.
Core Mechanics
- 기존 에이전트 harness(제어 스택)는 컨트롤러 코드 안에 숨겨져 있어 이식·비교·분석이 어려운데, 이를 자연어로 외부화하는 NLAH(Natural-Language Agent Harness) 형식을 제안
- IHR(Intelligent Harness Runtime)은 LLM을 런타임 루프 안에 두어 자연어 harness를 직접 해석·실행하며, 공유 런타임 정책과 태스크별 harness 로직을 분리
- OSWorld 벤치마크에서 원본 코드 harness(30.4%) → 자연어 NLAH(47.2%)로 마이그레이션 시 성능이 오히려 향상됨. GUI 수리 루프 대신 파일/쉘 기반 검증으로 전략이 전환된 덕분
- 모듈 조합 실험(RQ2)에서 self-evolution 모듈이 SWE-bench에서 75.2% → 80.0%(+4.8%p)로 가장 효과적. '더 많은 구조가 항상 더 좋다'는 가정은 틀렸고, verifier나 multi-candidate search는 오히려 성능 저하
- file-backed state(파일로 상태를 외부화하는 모듈)는 OSWorld에서 41.7% → 47.2%(+5.5%p)로 향상. 컨텍스트가 잘려도 상태가 유지되는 durability가 핵심
- TRAE harness 실행 시 전체 토큰·툴 호출의 약 90%가 부모 스레드가 아닌 위임된 자식 에이전트에서 발생. multi-agent 위임이 실질적으로 작동하는 증거
Evidence
- OSWorld에서 코드 harness 30.4% vs. NLAH 47.2% (동일 태스크 패밀리, GPT-5.4 + IHR 기준)
- SWE-bench Verified에서 self-evolution 모듈 추가 시 75.2% → 80.0% (+4.8%p), file-backed state 추가 시 75.2% → 76.8% (+1.6%p)
- TRAE Full IHR에서 프롬프트 토큰 91.5%, 툴 호출 90.2%가 자식 에이전트에서 발생 (부모 스레드는 약 9~10%만 사용)
- SWE-bench 125개 샘플 중 Full IHR vs. ablation 비교에서 110개 이상이 동일 결과로 수렴. 성능 차이는 소수의 경계 케이스에 집중
How to Apply
- 기존에 Python 코드로 짜던 에이전트 파이프라인(plan→execute→verify→repair)을 자연어 YAML/마크다운 형태의 NLAH로 옮겨서, stages·roles·contracts·failure taxonomy를 명시적으로 작성하면 런타임이 이를 해석·실행
- 장시간 실행 에이전트에서 컨텍스트 유실 문제가 있다면, file-backed state 모듈 패턴(task_state.json, manifest.json, RESPONSE.md를 path-addressable하게 관리)을 적용해 상태를 외부 파일로 분리
- 멀티에이전트 시스템에서 verifier나 multi-candidate search 추가가 항상 좋다고 가정하지 말고, self-evolution처럼 '시도 루프를 타이트하게 유지하는 모듈'이 오히려 효율적일 수 있으니 모듈을 하나씩 추가하며 ablation 테스트
Code Example
# NLAH 형식 예시 (자연어 harness 명세)
Task: Implement a function and ensure it passes tests.
Roles:
- Planner: 태스크 분석 및 계획 수립
- Solver: 코드 구현 담당
- Debugger: 실패 시 수정 담당
Stages:
1. PLAN
Role: Planner
Output: task_plan.md
Contract: 구현 전략과 엣지케이스 목록 포함
2. EXECUTE
Role: Solver
Output: solution.py
Contract: 유효한 Python 코드, 문법 오류 없음
3. VERIFY
Action: run_tests(solution.py)
If passed → STOP
If failed → REPAIR
4. REPAIR
Role: Debugger
Input: failing_code + error_message
Action: fix and overwrite solution.py
Retry: VERIFY (max 3 attempts)
File-backed State:
- state/task_history.jsonl # append-only 실행 기록
- artifacts/manifest.json # 산출물 인덱스
- children/*/RESPONSE.md # 자식 에이전트 응답
Failure Taxonomy:
- format_error → regenerate code
- test_failure → go to REPAIR
- tool_error → retry once
- timeout → report incompleteTerminology
Related Resources
Original Abstract (Expand)
Agent performance increasingly depends on \emph{harness engineering}, yet harness design is usually buried in controller code and runtime-specific conventions, making it hard to transfer, compare, and study as a scientific object. We ask whether the high-level control logic of an agent harness can instead be externalized as a portable executable artifact. We introduce \textbf{Natural-Language Agent Harnesses} (NLAHs), which express harness behavior in editable natural language, and \textbf{Intelligent Harness Runtime} (IHR), a shared runtime that executes these harnesses through explicit contracts, durable artifacts, and lightweight adapters. Across coding and computer-use benchmarks, we conduct controlled evaluations of operational viability, module ablation, and code-to-text harness migration.