尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A support agent you can measure: guardrails, tool-path evals, and a single-agent versus multi-agent comparison, with every published number coming from a real eval file.
Deployed app: https://agent-reliability-lab-eosin.vercel.app/ Demo video: TODO(me)
Guardrails. A tool-using support agent can repeat the same search forever when a name is slightly wrong. This project adds a step limit, a cost budget, a loop detector, and a human ticket, then compares a 50-task run with those guards off and on.
Trajectory eval and idempotent refunds. A refund call can time out after the database write. The retry looks new, so the customer is refunded twice. This project scores the path of tool calls separately from the final database, then stores one idempotency key per user request so the retry returns the original refund.
Single versus multi-agent. The same harder tasks are solved by one agent and by a lead that delegates to lookup, refund, address, and summary workers. The comparison is success, cost, and latency, split by whether the subtasks are independent or dependent.
flowchart LR
UI[Playground and results] --> API["POST /api/run SSE"]
API --> Loop[Hand-written agent loop]
Loop --> Guards[Step, budget, loop, escalation]
Loop --> Groq[Groq via core/llm.ts]
Loop --> Tools[get_order, search_orders, refund, update_address]
Tools --> DB[Fresh in-memory SQLite]
Eval[pnpm eval scripts] --> Loop
Eval --> Results[results JSON]
Results --> UI
Numbers below are filled only from results/*.json. P2 and P3 stay as placeholders until those evals finish.
From results/p1.json, 50 tasks, openai/gpt-oss-120b. No guards-off run looped, so no loop trace was written.
| Stuck rate | Avg steps | Avg cost | |
|---|---|---|---|
| Guards off | 0% | 2.8 | $0.000305 |
| Guards on | 0% | 2.8 | $0.000307 |
| Duplicate refunds | Strict tool accuracy | Outcome accuracy | |
|---|---|---|---|
| Idempotency off | TODO(me) | TODO(me) | TODO(me) |
| Idempotency on | TODO(me) | TODO(me) | TODO(me) |
The interesting gap is when the outcome looks right and the tool path does not. That gap is computed on the results page from the same file.
| Success | Cost | Latency | |
|---|---|---|---|
| Single | TODO(me) | TODO(me) | TODO(me) |
| Multi | TODO(me) | TODO(me) | TODO(me) |
Decision rule: TODO(me). After pnpm eval:p3, this sentence is written into results/p3.json from the measured independent-task delta. Do not replace it with a guessed percentage.
TODO(me): screenshot of a looping run from results/traces/p1-loop-1.json.
TODO(me): screenshot of a double refund from results/traces/p2-double-refund.json.
Those files are written by the eval scripts only when a run actually loops or double-refunds. They are not checked in as samples.
pnpm i
cp .env.example .env
Fill GROQ_API_KEY and the prices in config/pricing.ts (see https://console.groq.com/docs/models). Then:
pnpm dev
pnpm eval:baseline
pnpm eval:p1
pnpm eval:p2
pnpm eval:p3
Each eval prints a ceiling estimate and waits for you to type yes, or pass --yes. --limit N runs a cheaper slice. --model overrides AGENT_MODEL. Do not run the full evals on Vercel.
The eval sets are 50 and 30 hand-written tasks against 20 fixed orders. That is small enough for one person to audit and small enough that a few odd replies move the rate. Temperature is 0, and P3 still repeats trials because the model is not deterministic. The shop, the timeout, and the flaky search are simulated. Prices are whatever you enter for the selected Groq model, and the default model (openai/gpt-oss-120b) does not support parallel tool calls, so a turn usually contains one tool call.
config/pricing.ts with the current price per million tokens.pnpm eval:baseline and pnpm eval:p1 are done and committed. Run pnpm eval:p2 and pnpm eval:p3 next, then commit results/.GROQ_API_KEY and AGENT_MODEL. Optionally set DEMO_PASSCODE. Add Upstash Redis from the Vercel Marketplace if you want the rate limit to survive across instances./playground, run a preset, confirm the rate limit, then record the demo and replace the TODO(me) links and screenshots in this file.Live runs are capped at 12 steps and $0.05 even if the toggles are off. Hobby Vercel plans may cut a function off at 10 seconds; maxDuration is set to 60 for Pro. Groq is fast, so a short preset usually finishes inside the hobby window.