2605.28617v1 May 27, 2026 cs.AI

LACUNA: 안전한 에이전트를 위한 재귀적 프로그램 구멍

LACUNA: Safe Agents as Recursive Program Holes

Martin Odersky
Martin Odersky
Citations: 487
h-index: 3
Yaoyu Zhao
Yaoyu Zhao
Citations: 14
h-index: 2
Yichen Xu
Yichen Xu
Citations: 10
h-index: 2
C. Pham
C. Pham
Citations: 14
h-index: 2
Oliver Bračevac
Oliver Bračevac
Citations: 188
h-index: 8
F. Wu
F. Wu
Citations: 20
h-index: 2

LLM(대규모 언어 모델) 기반 에이전트들이 코드를 작성하여 작동하는 경우가 점점 늘어나고 있지만, 여전히 에이전트 실행 환경과 모델이 생성하는 코드 사이에는 간극이 존재합니다. 실행 환경은 루프, 컨텍스트 및 제어 흐름을 담당하며, 모델은 이러한 요소들에 큰 영향을 미치지 못합니다. 모델이 작성한 코드가 자체적으로 실행 환경에 영향을 미치도록 허용하면 에이전트의 표현력이 향상될 수 있지만, 동시에 안전 문제도 심화될 수 있습니다. 프롬프트 주입 공격으로 인해 모델이 오작동하거나, 잘못된 도구를 호출하거나, 부분적으로 실패하여 일관되지 않은 상태를 만들 수 있으며, 이러한 오류는 코드가 실행 환경을 제어할 때 단순한 액션 표현보다 더 큰 영향을 미칩니다. 본 논문에서는 이 간극을 해소하면서도 안전성을 유지하는 에이전트 프로그래밍 모델인 LACUNA를 제시합니다. 각 에이전트 액션은 $ exttt{agent[T](task)}$라는 타입이 지정된 호출이며, LLM은 실행 시점에 코드로 채우고, 이 코드는 실행 전에 주변 프로그램과 함께 타입 검사를 거칩니다. 각 액션은 전체적으로 허용되거나 거부되며, 거부된 경우 환경은 변경되지 않고, 컴파일러 진단 정보를 통해 재시도를 유도합니다. 동일한 검사는 액션이 사용할 수 있는 도구 및 데이터의 범위와 흐름을 제한하는 역할을 합니다. LACUNA는 ReAct 루프, 하위 에이전트, 기술, 병렬 분해 및 다중 모델 계획 등을 일반적인 제어 흐름으로 표현할 수 있도록 설계되었습니다. 우리는 다양한 테스트 케이스(BrowseComp-Plus) 및 $τ^2$-bench를 사용하여 LACUNA를 평가했습니다. BrowseComp-Plus에서는 생성된 결과의 8.6%가 실행 전에 거부되었으며, 평균적으로 쿼리당 0.7회의 재시도가 필요했으며, 에이전트의 정확도는 27.1%에 달했습니다. $τ^2$-bench에서는 LACUNA가 능숙한 모델을 사용하여 네 가지 영역에서 총 392개의 작업 중 76.0%를 해결했으며, 이는 기준 에이전트와 유사한 성능입니다.

Original Abstract

LLM agents increasingly act by writing code, yet a split persists between the runtime that drives the agent and the code the model writes. The runtime owns the loop, context, and control flow, and the model has little say over any of them. Letting model-written code shape the runtime itself would make agents more expressive, but it would also sharpen safety problems. A model can be diverted by a prompt injection, call the wrong tool, or fail partway and leave an inconsistent state, and each such failure reaches further when the code shapes the runtime than when it expresses a single action. We present LACUNA, a programming model for agents that closes this split while preserving safety. Each agent action is a typed call $\texttt{agent[T](task)}$ that the LLM fills with code when execution reaches it, and the code is type-checked against the surrounding program before it runs. Because each action is accepted or rejected as a whole, a rejected one leaves the environment untouched, and its compiler diagnostics drive a retry. The same check also bounds which tools and data an action may use and how they flow. Our primitive expresses ReAct loops, sub-agents, skills, parallel decomposition, and multi-model planning as ordinary control flow. We evaluate LACUNA on a collection of test cases, BrowseComp-Plus, and $τ^2$-bench. On BrowseComp-Plus, $8.6\%$ of generations are rejected before execution, with 0.7 retries per query on average, and the agent reaches $27.1\%$ accuracy. On $τ^2$-bench, LACUNA solves $76.0\%$ of $392$ tasks across four domains with a capable model, on par with the baseline agent.

0 Citations
0 Influential
4 Altmetric
20.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!