Files
wehub-resource-sync 91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:19 +08:00

43 lines
1.7 KiB
Markdown

# Agent Design
## The Pattern
```python
for item in items:
session_id = None
for attempt in range(3):
# Creator agent: sandbox + tools + ONE submit tool
creator_result = await run_agent(item, session_id, creator_tools)
session_id = creator_result.session_id
# Auditor agent: sandbox + tools + ONE submit_audit tool + checklist
audit = await run_agent(creator_result.submission, auditor_tools)
# Python: extract bools, calculate score, decide
score = sum(c["passed"] for c in audit.checklist) / len(audit.checklist)
if score >= threshold:
break
# else: creator retries with session continuation + auditor feedback
```
## Rules
1. **Python loops over items** — never the agent
2. **Two agents per item** — creator does work, auditor verifies independently
3. **One submit tool per agent** — no get_next, no submit_results, no update_and_submit
4. **Auditor uses a checklist** — returns `[{item, passed: bool}]`, never a score
5. **Python calculates scores** — from checklist bools, never ask agent for a number
6. **Session continuation on retry** — pass `session_id` so creator keeps context
7. **Pre-boot sandbox in Python** — agents never waste turns on setup
8. **Action-script prompts** — numbered steps with exact tool calls, not open-ended
## Anti-Patterns
- Agent loops over items → runs out of turns after 1-2
- Agent self-verifies → self-confirmation bias
- Multiple submit tools → agent gets confused
- Auditor gives scores → arbitrary, unreproducible
- Fresh agent on retry → loses context
- Agent boots sandbox → wastes turns
- Open-ended prompts → agent explores instead of executing