ClawTrace: LLM 에이전트 기술 증류를 위한 비용 인지 추적 시스템
ClawTrace: Cost-Aware Tracing for LLM Agent Skill Distillation
기술 증류 파이프라인은 LLM 에이전트의 실행 경로로부터 재사용 가능한 규칙을 학습하지만, 중요한 정보가 부족합니다. 바로 각 단계별 비용 정보입니다. 단계별 비용 정보가 없으면, 파이프라인은 버그를 수정하기 위해 누락된 단계를 추가하는 것과 결과에 영향을 미치지 않는 비싼 단계를 제거하는 것을 구별할 수 없습니다. 본 논문에서는 ClawTrace라는 에이전트 추적 플랫폼을 소개합니다. ClawTrace는 에이전트 세션 동안의 모든 LLM 호출, 도구 사용, 하위 에이전트 실행 과정을 기록하고, 각 세션을 TraceCard라는 컴팩트한 YAML 형식의 요약 정보로 변환합니다. TraceCard에는 단계별 USD 비용, 토큰 수, 중복 여부 플래그 등이 포함됩니다. ClawTrace를 기반으로 구축된 CostCraft는 TraceCard를 읽어 세 가지 유형의 기술 패치를 생성하는 증류 파이프라인입니다. Preserve 패치는 성공적인 결과를 가져온 행동을 유지합니다. Prune 패치는 중요하지 않은 비싼 단계를 제거하며, 각 제거된 단계에는 특정 고비용 단계에 대한 반증 주장이 뒷받침됩니다. Repair 패치는 오라클 증거를 기반으로 오류를 수정합니다. 30개의 SpreadsheetBench 작업에 대한 실험 결과, 비용 할당 및 Prune 패치는 독립적으로 품질 저하를 줄이는 효과가 있음을 확인했습니다. 동일한 기술을 30개의 관련 없는 SkillsBench 작업에 적용했을 때, 예상치 못한 비대칭성이 나타났습니다. Prune 규칙은 벤치마크 간에 전송되어 중앙값 비용을 32% 절감했지만, 특정 벤치마크에 맞춰 학습된 Preserve 규칙은 새로운 작업 유형에서 품질 저하를 유발했습니다. ClawTrace 및 TraceCard는 비용 인지 에이전트 연구를 위한 오픈 소스 인프라로 공개됩니다.
Skill-distillation pipelines learn reusable rules from LLM agent trajectories, but they lack a key signal: how much each step costs. Without per-step cost, a pipeline cannot distinguish adding a missing step to fix a bug from removing an expensive step that never affected the outcome. We introduce ClawTrace, an agent tracing platform that records every LLM call, tool use, and sub-agent spawn during an agent session and compiles each session into a TraceCard: a compact YAML summary with per-step USD cost, token counts, and redundancy flags. Built on ClawTrace, CostCraft is a distillation pipeline that reads TraceCards and produces three types of skill patches. Preserve patches keep behaviors that led to success. Prune patches remove expensive steps that did not matter, each backed by a counterfactual argument against a named high-cost step. Repair patches fix failures grounded in oracle evidence. Ablations on 30 held-out SpreadsheetBench tasks show that both cost attribution and prune patches independently reduce quality regressions. When the same skill is applied to 30 unrelated SkillsBench tasks, an unexpected asymmetry emerges: prune rules transferred across benchmarks and cut median cost by 32%, while preserve rules, trained on benchmark-specific conventions, caused regressions on new task types. We release ClawTrace and TraceCards as open infrastructure for cost-aware agent research.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.