← Lesson
Why Multi-Agent?
Joeven
Run
Reset
Python loads on first run
def single_agent(goal): log = "job 17 timeout talking to vendor" patch = "increase timeout from 5s to 30s" return {"trace": ["read_logs", "edit", "finish"], "log": log, "patch": patch} def multi_agent(goal): researcher = {"role": "research", "tools": ["read_logs", "summarize"]} coder = {"role": "code", "tools": ["edit", "run_tests"]} brief = "timeout talking to vendor; recommend timeout bump" patch = "increase timeout from 5s to 30s" return { "agents": [researcher["role"], coder["role"]], "brief": brief, "patch": patch, "coder_saw_raw_logs": False, } print("SINGLE", single_agent("fix job 17")) print("MULTI", multi_agent("fix job 17")) print("split value: smaller tools + smaller context")
Run to execute this in your browser. Nothing is sent to a server.