메뉴
HN
Hacker News • 2일 전

AgentRun: 에이전트를 워크플로로 바꾸는 DSL 공개

IMP
5/10
핵심 요약

Parcha AI가 해커뉴스에 'AgentRun'이라는 오픈소스 워크플로 DSL을 공개했습니다. 이미 운영 중인 AI 에이전트에 반복 가능한 단계를 정의하고, Jev로 판단을 내리며, 조사가 필요할 때만 에이전트를 호출하는 구조입니다. 앱의 도구·모델 접근·권한·예산은 그대로 유지되며, API 키 없이 데모를 실행해볼 수 있습니다.

번역된 본문

agent.run() — 에이전트에 Jev 기반 워크플로를 추가하세요.

AgentRun은 이미 운영 중인 에이전트를 위한 워크플로 언어입니다. 반복 가능한 단계를 정의하고, 집중된 의사결정에는 Jev를 사용하며, 조사가 필요한 작업일 때만 에이전트를 호출합니다. 애플리케이션은 기존의 도구, 모델 접근 권한, 권한 설정, 예산을 그대로 유지합니다.

빠른 시작 · 문서 · 예제 · Pi 확장 · 에이전트 지침 · 정적 다이어그램 보기 · 예제 실행

아래의 고객 지원 예제는 스크립트된 도구와 모델 응답으로 이 워크플로를 따릅니다.

빠른 시작

Node 22.19+와 npm이 필요합니다. 프로젝트에서 다음을 실행하세요:

npm install @parcha/agentrun-dsl@beta npx agentrun demo

이 티켓 라우팅 데모는 스크립트된 결정을 사용하므로 API 키가 필요 없습니다. 다음으로 자신의 앱에서 워크플로를 실행하고 수정해 보세요. 위 애니메이션의 지원 워크플로를 실행하려면 아래 체크아웃을 사용하세요. 에이전트와 함께 워크플로를 만들려면 Pi 확장을 설치하세요.

지원 예제 실행

애니메이션의 워크플로를 실행하려면 예제를 클론하고 빌드하세요:

git clone --branch main --single-Branch https://github.com/Parcha-ai/agentrun.git cd agentrun

nvm 사용 시:

nvm install && nvm use npm ci --ignore-scripts npm run build npm run demo:support

이 명령은 스크립트된 도구, Jev 응답, 에이전트 응답으로 인터프리터를 실행합니다. API 키가 필요 없으며 실제 고객에게 답장을 보내지 않습니다. 각 케이스별 보고서를 출력합니다:

요청 에이전트 호출 결정 호출 결과
비밀번호 재설정 0 1 도움말 답변 반환
청구서 조회 0 1 도움말 답변 반환
결제 실패 조사 1 2 조사 답변 반환
결제 미해결 지속 1 2 검토를 위해 에스컬레이션

npm run demo:support -- payment npm run test:support

에스컬레이션을 확인하려면 'npm run demo:support -- unresolved'를 실행해 보세요. 종료 코드 2로 종료됩니다. 응답은 스크립트된 것이므로 프롬프트를 바꿔도 결과가 변하지 않습니다. 실제 Jev와 에이전트를 연결하거나, 이 지침을 코딩 에이전트에게 전달하세요.

워크플로의 생김새

지원 워크플로는 답변 텍스트와 출처 참조를 요구합니다. Jev는 신뢰도 0.8 이상으로 '예'라고 답해야 합니다. 그렇지 않으면 워크플로는 에이전트 시도를 한 번 허용하고 다시 확인합니다. 그래도 검사를 통과하지 못하면 검토를 위해 에스컬레이션합니다. 기준과 임계값은 작업에 맞게 직접 선택할 수 있습니다.

해당 워크플로의 검색 및 결정 노드 예시:

{ "node": "call", "label": "find-answer", "via": "tool", "tool": "help.search", "args": { "request": "{request}" }, "out": "Candidate", "as": "answer", "deadline_s": 10 }, { "node": "judge", "label": "check-existing-answer", "state": { "request": "{request}", "answer": "{answer}" }, "out": "Fit", "as": "fit" }

Candidate와 Fit은 워크플로의 스키마를 참조합니다. Fit은 질문과 '예', '아니오', '불확실' 판정 기준을 정의합니다. 코드가 결정과 신뢰도를 읽어 다음 단계를 선택합니다. 에이전트와 검토 경로를 포함한 전체 정의를 확인해 보세요.

워크플로는 JSON으로 작성하거나 TypeScript 빌더와 Zod 계약(contract)을 사용할 수 있습니다. 빌더는 입력·출력 타입을 추론하고, 인터프리터는 런타임에 중간 상태 경로를 검사합니다. 워크플로는 다른 워크플로를 호출하고, 작업을 병렬로 매핑하며, 제한된 반복(bounded loop)을 실행할 수 있습니다.

애플리케이션 연결

핵심 패키지와 Jev 어댑터를 설치하세요: npm install @parcha/agentrun-dsl@beta @parcha/agentrun-jev@beta

그 다음:

  1. 어댑터를 제공하세요. runEffect로 도구를, runNode로 기존 에이전트를, createJevRunner()를 runJudge로 연결해 Jev 결정을 사용합니다.
  2. 워크플로를 정의하고 테스트하세요. 스키마, 단계, 임계값, 검토 경로를 작성합니다. 픽스처로 시작한 뒤 실제 작업의 라벨링된 케이스에서 실제 결정을 평가하세요.
  3. 에이전트에게 워크플로 도구를 제공하세요. runWorkflow를 호출하는 함수를 에이전트의 도구 중 하나로 등록하고, 워크플로의 출력, 에스컬레이션, 오류를 처리하세요.

지원 통합 가이드에 설정 템플릿과 실제 실행 명령이 있습니다. 실제 Jev 호출에는 TypeSafe 대시보드의 TYPESAFE_API_KEY가 필요하며, 이는 코딩 에이전트 로그인과 별개입니다. Jev 결정이 없는 워크플로에는 이 키가 필요 없습니다. 권한, 취소 등에 대한 호스트 통합 문서를 참고하세요.

원문 보기
원문 보기 (영어)
agent.run() Add Jev-powered workflows to your agents. AgentRun is a workflow language for the agents you already run. Define repeatable steps, use Jev for focused decisions, and call an agent when the work needs investigation. Your application keeps its tools, model access, permissions, and budgets. Quickstart · Documentation · Examples · Pi extension · Agent instructions View the static diagram · Run this example The support example below follows this workflow with scripted tools and model responses. Quickstart Requires Node 22.19+ and npm. In your project: npm install @parcha/agentrun-dsl@beta npx agentrun demo This ticket-routing demo uses scripted decisions and needs no API key. Next, run and change a workflow in your own app . To run the support workflow shown above, use the checkout below. To build workflows with your agent, install the Pi extension . Run the support example To run the workflow in the animation, clone the examples and build: git clone --branch main --single-branch https://github.com/Parcha-ai/agentrun.git cd agentrun # With nvm: nvm install && nvm use npm ci --ignore-scripts npm run build npm run demo:support This runs the interpreter with scripted tools, Jev answers, and agent responses. It needs no API key and sends no customer replies. The command prints a report for each case: Request Agent calls Decision calls Result Reset a password 0 1 Return the help answer Find an invoice 0 1 Return the help answer Investigate a failed payment 1 2 Return the investigation answer Payment still unresolved 1 2 Escalate for review npm run demo:support -- payment npm run test:support Try npm run demo:support -- unresolved to see an escalation. It exits with code 2 . The responses are scripted; changing a prompt does not change them. Connect live Jev and your agent , or give these instructions to your coding agent . What a workflow looks like The support workflow requires answer text and a source reference. Jev must also answer yes with confidence of at least 0.8 . Otherwise, the workflow allows one agent attempt and checks again. If the answer still fails those checks, it escalates for review. You choose the criteria and thresholds for your task. These are the search and decision nodes from that workflow: { node : 'call' , label : 'find-answer' , via : 'tool' , tool : 'help.search' , args : { request : '{request}' } , out : 'Candidate' , as : 'answer' , deadline_s : 10 , } , { node : 'judge' , label : 'check-existing-answer' , state : { request : '{request}' , answer : '{answer}' } , out : 'Fit' , as : 'fit' , } Candidate and Fit refer to schemas in the workflow. Fit defines the question and its yes , no , and uncertain criteria. Code reads the decision and its confidence to choose the next step. Read the complete definition, including the agent and review path . Write workflows as JSON or use the TypeScript builder and Zod contracts . The builder infers input and output types. The interpreter checks intermediate state paths at runtime. Workflows can call other workflows, map work in parallel, and run bounded loops. Connect your application Install the core and Jev adapter in your application with npm install @parcha/agentrun-dsl@beta @parcha/agentrun-jev@beta . Then: Supply adapters. Connect tools through runEffect , your existing agent through runNode , and Jev decisions through createJevRunner() as runJudge . Define and test the workflow. Write its schemas, steps, thresholds, and review path. Start with fixtures, then evaluate real decisions on labeled cases from your task. Give your agent a workflow tool. Register a function that calls runWorkflow as one of your agent's tools. Handle the workflow's output, escalation, and errors. The support integration guide has a config template and live command. Live Jev calls need TYPESAFE_API_KEY from the TypeSafe dashboard , separate from your coding-agent login. Workflows without Jev decisions do not need that key. See host integration for permissions, cancellation, and recovery. Use it in Pi With Pi 0.87.0 installed , run these commands in your project: pi install npm:@parcha/agentrun-pi@0.1.0-beta.4 -l pi --offline -l installs in this project; --offline skips startup downloads. Pi asks whether you trust the project before loading its extension. No AgentRun checkout is needed. /agentrun demo loads the scripted research example; /agentrun run repeats it without model calls. /agentrun demo live uses your configured Pi model and Jev. /agentrun status checks setup; /agentrun shows the graph; /agentrun stop requests cancellation. Once Pi has model access, ask it to build a workflow: /agentrun Research how this repository handles cancellation. Investigate the runtime and tests separately, then report gaps with file references. Pi uses the packaged skill to build, inspect, and run the workflow. Run /reload if you install into an open Pi session. Use /agentrun save <name> and /agentrun load <name> for project-local definition revisions. Saves contain neither run input nor execution permission. Pi setup and limits . More examples Example What it demonstrates Support answers Search, Jev checks, optional investigation, review fallback Research a decision Nested workflows, parallel research, evidence selection, report writing Standalone TypeScript starter Install the packages in your own app; search and screen evidence Research demo From the built checkout, run a scripted research workflow: "Should our team move its docs from a wiki into the code repository?" npm run demo npm run eval:research It plans subquestions, researches them in parallel, screens evidence, and writes a report. The evaluation checks six labeled cases with scripted responses. Connect real Jev and Pi models . Packages, status, and contributing Package Responsibility @parcha/agentrun-dsl Define, validate, inspect, and execute workflows @parcha/agentrun-jev Connect Jev typed decisions @parcha/agentrun-pi Pi extension and agent runner This release is 0.1.0-beta.4 . See the changelog and contracts and limits . Ordinary functions may be enough for a fixed sequence. AgentRun stores the steps in a workflow document that you can inspect, rerun, or call from an agent. Code nodes execute JavaScript with process privileges; untrusted workflow authors require a host-controlled sandbox. Typed decisions and validated output shapes do not prove that an answer is factually correct. For development setup and checks, see Contributing . Open an issue for bugs or proposals. Code and documentation use Apache-2.0 . Copyright 2026 Parcha Labs, Inc. Dependencies retain their own licenses. Built by Grep.ai .