import asyncio
import os
from upstash_box import AsyncBox, Agent
async def main():
pr = "https://github.com/acme/app/pull/42"
security, quality, architecture = await asyncio.gather(
AsyncBox.create(runtime="node", agent={"harness": Agent.CLAUDE_CODE, "model": "anthropic/claude-sonnet-4-6"}),
AsyncBox.create(runtime="node", agent={"harness": Agent.CLAUDE_CODE, "model": "anthropic/claude-sonnet-4-6"}),
AsyncBox.create(runtime="node", agent={"harness": Agent.CLAUDE_CODE, "model": "anthropic/claude-sonnet-4-6"}),
)
reviews = await asyncio.gather(
security.agent.run(prompt=f"Security review for {pr}"),
quality.agent.run(prompt=f"Code quality review for {pr}"),
architecture.agent.run(prompt=f"Architecture review for {pr}"),
)
jury = await AsyncBox.create(
runtime="node",
agent={"harness": Agent.CLAUDE_CODE, "model": "anthropic/claude-sonnet-4-6"},
git={"token": os.environ["GITHUB_TOKEN"]},
)
summary = "\n\n".join(r.result for r in reviews)
await jury.agent.run(
prompt=f"Summarize these reviews and post a comment on {pr}:\n{summary}",
)
asyncio.run(main())