Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scripts/multi_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def main():
help="Resume a SUSPENDED run: skip config_builder, poll "
"this experiment_id, then run the analyzer. The "
"goal is still required (the analyzer needs it).")
parser.add_argument("--output", metavar="FILE.md",
help="Write the final analysis/answer to this markdown file "
"(in addition to printing it).")
parser.add_argument("--poll-budget-seconds", type=float, default=180.0,
help="How long the poll stage waits before suspending.")
args = parser.parse_args()
Expand All @@ -75,6 +78,15 @@ def main():
for stage, sub_id in result.sub_run_ids.items():
console.print(f"[dim] {stage}: {sub_id}[/dim]")

if args.output and result.analysis:
with open(args.output, "w", encoding="utf-8") as f:
f.write(result.analysis + "\n\n---\n"
f"*Generated by {args.model} | orchestrator run "
f"{result.orchestrator_run_id} | outcome: {result.outcome}. "
"Agent-drafted from sealed capsules — verify numbers with "
"scripts/tools/grade_analyses.py before publication.*\n")
console.print(f"[dim]Analysis written to {args.output}[/dim]")

if result.outcome in ("complete", "answered", "needs_experiment") and result.analysis:
console.print(Panel(Markdown(result.analysis), title="📊 Analysis",
border_style="green"))
Expand Down
Loading