HN 표시: Dirac, Hash Anchored AST 네이티브 코딩 에이전트를 구축했습니다. 비용은 -64.8%입니다.
hackernews
|
|
📦 오픈소스
#ai 딜
#anthropic
#ast
#openai
#비용 절감
#컨텍스트 최적화
#코딩 에이전트
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
오픈소스 코딩 에이전트인 'Dirac'은 문맥 길이가 길어질 때 발생하는 AI 모델의 추론 능력 저하 문제를 해결하기 위해 개발되었습니다. 해시 기반 편집과 AST(추상 구문 트리) 조작 등의 고도화된 기술을 적용하여 복잡한 실제 리팩토링 작업에서 100%의 정확도를 달성했습니다. 특히 다른 경쟁 오픈소스 에이전트들과 비교한 벤치마크 결과, 평균 64.8% 더 저렴한 비용으로 API 사용량을 약 2.8배 절감하는 동시에 더 빠르고 우수한 결과를 제공합니다. 사용자는 이 도구를 활용해 터미널 명령 실행이나 다중 파일 수정 등을 자율적으로 수행할 수 있으며, VS Code 마켓플레이스나 CLI를 통해 손쉽게 설치할 수 있습니다.
본문
It is a well studied phenomenon that any given model's reasoning ability degrades with the context length. If we can keep context tightly curated, we improve both accuracy and cost while making larger changes tractable in a single task. Dirac is an open-source coding agent built with this in mind. It reduces API costs by 64.8% on average while producing better and faster work. Using hash-anchored parallel edits, AST manipulation, and a suite of advanced optimizations. Dirac is benchmarked against other leading open-source agents on complex, real-world refactoring tasks. Dirac consistently achieves 100% accuracy at a fraction of the cost. These evals are run on public github repos and should be reproducible by anyone. | Task (Repo) | Files* | Cline | Kilo | Ohmypi | Opencode | Pimono | Roo | Dirac | |---|---|---|---|---|---|---|---|---| | Task1 (transformers) | 8 | 🟢 (diff) [$0.37] | 🔴 (diff) [N/A] | 🟡 (diff) [$0.24] | 🟢 (diff) [$0.20] | 🟢 (diff) [$0.34] | 🟢 (diff) [$0.49] | 🟢 (diff) [$0.13] | | Task2 (vscode) | 21 | 🟢 (diff) [$0.67] | 🟡 (diff) [$0.78] | 🟢 (diff) [$0.63] | 🟢 (diff) [$0.40] | 🟢 (diff) [$0.48] | 🟡 (diff) [$0.58] | 🟢 (diff) [$0.23] | | Task3 (vscode) | 12 | 🟡 (diff) [$0.42] | 🟢 (diff) [$0.70] | 🟢 (diff) [$0.64] | 🟢 (diff) [$0.32] | 🟢 (diff) [$0.25] | 🟡 (diff) [$0.45] | 🟢 (diff) [$0.16] | | Task4 (django) | 14 | 🟢 (diff) [$0.36] | 🟢 (diff) [$0.42] | 🟡 (diff) [$0.32] | 🟢 (diff) [$0.24] | 🟡 (diff) [$0.24] | 🟢 (diff) [$0.17] | 🟢 (diff) [$0.08] | | Task5 (vscode) | 3 | 🔴 (diff) [N/A] | 🟢 (diff) [$0.71] | 🟢 (diff) [$0.43] | 🟢 (diff) [$0.53] | 🟢 (diff) [$0.50] | 🟢 (diff) [$0.36] | 🟢 (diff) [$0.17] | | Task6 (transformers) | 25 | 🟢 (diff) [$0.87] | 🟡 (diff) [$1.51] | 🟢 (diff) [$0.94] | 🟢 (diff) [$0.90] | 🟢 (diff) [$0.52] | 🟢 (diff) [$1.44] | 🟢 (diff) [$0.34] | | Task7 (vscode) | 13 | 🟡 (diff) [$0.51] | 🟢 (diff) [$0.77] | 🟢 (diff) [$0.74] | 🟢 (diff) [$0.67] | 🟡 (diff) [$0.45] | 🟢 (diff) [$1.05] | 🟢 (diff) [$0.25] | | Task8 (transformers) | 3 | 🟢 (diff) [$0.25] | 🟢 (diff) [$0.19] | 🟢 (diff) [$0.17] | 🟢 (diff) [$0.26] | 🟢 (diff) [$0.23] | 🟢 (diff) [$0.29] | 🟢 (diff) [$0.12] | | Total Correct | 5/8 | 5/8 | 6/8 | 8/8 | 6/8 | 6/8 | 8/8 | | | Avg Cost | $0.49 | $0.73 | $0.51 | $0.44 | $0.38 | $0.60 | $0.18 | 🟢 Success | 🟡 Incomplete | 🔴 Failure Cost Comparison: Dirac is 64.8% cheaper than the competition (a 2.8x cost reduction). * Expected number of files to be modified/created to complete the task. See evals/README.md for detailed task descriptions and methodology. - Hash-Anchored Edits: Dirac uses stable line hashes to target edits with extreme precision, avoiding the "lost in translation" issues of traditional line-number based editing. - AST-Native Precision: Built-in understanding of language syntax (TypeScript, Python, C++, etc.) allows Dirac to perform structural manipulations like function extraction or class refactoring with 100% accuracy. - Multi-File Batching: Dirac can process and edit multiple files in a single LLM roundtrip, significantly reducing latency and API costs. - High-Bandwidth Context: Optimized context curation keeps the agent lean and fast, ensuring the LLM always has the most relevant information without wasting tokens. - Autonomous Tool Use: Dirac can read/write files, execute terminal commands, use a headless browser, and more - all while keeping you in control with an approval-based workflow. Install Dirac from the VS Code Marketplace. Install the Dirac CLI on macOS or Linux using our official installation script: curl -fsSL https://raw.githubusercontent.com/dirac-run/dirac/master/scripts/install.sh | bash This is still being fixed. Meanwhile you can download the source and build manually. git clone https://github.com/dirac-run/dirac.git cd dirac npm install npm run cli:build npm run cli:link - Install: curl -fsSL https://raw.githubusercontent.com/dirac-run/dirac/master/scripts/install.sh | bash - Authenticate: dirac auth - Run your first task: dirac "Analyze the architecture of this project" dirac "prompt" : Start an interactive task.dirac -p "prompt" : Run in Plan Mode to see the strategy before executing.dirac -y "prompt" : Yolo Mode (auto-approve all actions, great for simple fixes).git diff | dirac "Review these changes" : Pipe context directly into Dirac.dirac history : View and resume previous tasks. - Open the Dirac sidebar in VS Code. - Configure your preferred AI provider (Anthropic, OpenAI, OpenRouter, etc.). - Start a new task by describing what you want to build or fix. - Watch Dirac go! Dirac is open source and licensed under the Apache License 2.0. Dirac is a fork of the excellent Cline project. We are grateful to the Cline team and contributors for their foundational work. Built with ❤️ by Max Trivedi at Dirac Delta Labs
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유