[{"data":1,"prerenderedAt":1198},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fen\u002Fai\u002Fmulti-agent-orchestration-from-single-llm-call-to-systems":13},{"i18nKey":4,"paths":5},"ai-008-2026-06",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Fai\u002Fmulti-agent-orchestrierung-llm-anwendungen","\u002Fen\u002Fai\u002Fmulti-agent-orchestration-from-single-llm-call-to-systems","\u002Fes\u002Fai\u002Forquestacion-de-multiples-agentes","\u002Ffr\u002Fai\u002Forchestration-multi-agent-llm","\u002Fit\u002Fai\u002Forchestrazione-multi-agent-dalle-chiamate-llm-ai-sistemi","\u002Fru\u002Fai\u002Forkestratsiya-multi-agent-ot-odnogo-vyzova-llm-k-sistemam","\u002Ftr\u002Fai\u002Fmulti-agent-orchestration-tek-llm-cagrisindan-sistemlere",{"_path":7,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1192,"_id":1193,"_source":1194,"_file":1195,"_stem":1196,"_extension":1197},"ai",false,"","Multi-Agent Orchestration: From Single LLM Call to Production Systems","Scale LLM applications with agent SDKs, tool use, and parallel\u002Fserial topologies. Navigate token costs, latency, and error isolation tradeoffs.","2026-06-13",[21,22,23,24,25],"multi-agent","llm-orchestration","tool-use","agent-sdk","production-ai",8,"Roibase",{"type":29,"children":30,"toc":1182},"root",[31,39,46,68,89,110,116,150,185,198,205,310,316,328,355,375,388,394,420,425,456,462,467,493,498,504,509,896,901,1157,1162,1176],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","A single LLM prompt was sufficient a few months ago. Today, production systems require parallel agent topologies, structured output, and fallback chains. Anthropic's Computer Use, OpenAI's function calling, and LangGraph's state machine support have moved agent orchestration to the framework level. Multi-agent architecture is no longer just research—it's the daily tooling of growth teams. Reducing token costs, controlling latency, and isolating failures demand a shift from single-agent calls to orchestrated systems.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"agent-sdks-and-tool-use-protocol",[44],{"type":37,"value":45},"Agent SDKs and Tool Use Protocol",{"type":32,"tag":33,"props":47,"children":48},{},[49,51,58,60,66],{"type":37,"value":50},"OpenAI's function calling JSON schema became standard in 2023. Anthropic expanded tool use with Claude 3.5: the API response now returns a ",{"type":32,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":37,"value":57},"tool_use",{"type":37,"value":59}," block; you execute and send back ",{"type":32,"tag":52,"props":61,"children":63},{"className":62},[],[64],{"type":37,"value":65},"tool_result",{"type":37,"value":67},". This loop can run for 20+ iterations, but token limits cut you off. Gemini's function declarations syntax is similar—the difference lies in grounding and retrieval extensions. All three providers share the same pattern: the model receives function descriptors, returns function name + arguments, and you handle execution.",{"type":32,"tag":33,"props":69,"children":70},{},[71,73,79,81,87],{"type":37,"value":72},"Agent SDKs abstract this loop away. LangChain's ",{"type":32,"tag":52,"props":74,"children":76},{"className":75},[],[77],{"type":37,"value":78},"AgentExecutor",{"type":37,"value":80},", LlamaIndex's ",{"type":32,"tag":52,"props":82,"children":84},{"className":83},[],[85],{"type":37,"value":86},"ReActAgent",{"type":37,"value":88},", AutoGPT's core engine—all solve the same problem: managing tool call sequences. But abstractions introduce token overhead. For instance, LangChain sends conversation history as a prefix in each iteration. 10 tool calls = 10× context window. Reducing this requires a summarization agent or selective context pruning. Without observability layers like LangSmith, production debugging is impossible.",{"type":32,"tag":33,"props":90,"children":91},{},[92,94,100,102,108],{"type":37,"value":93},"Tool use protocol isn't deterministic—models hallucinate and provide incorrect function arguments. This makes a validation layer mandatory: validate inputs with Pydantic schemas, catch runtime exceptions, return error messages to the model. LangChain's ",{"type":32,"tag":52,"props":95,"children":97},{"className":96},[],[98],{"type":37,"value":99},"PydanticOutputParser",{"type":37,"value":101}," and Anthropic's ",{"type":32,"tag":52,"props":103,"children":105},{"className":104},[],[106],{"type":37,"value":107},"tool_choice=\"required\"",{"type":37,"value":109}," parameter reduce this risk. But the core issue remains: models don't always pick the right tool. With 3–4 similar tools, selection errors occur 8–12% of the time. In such cases, you add retry logic or a routing agent.",{"type":32,"tag":40,"props":111,"children":113},{"id":112},"parallel-vs-serial-agent-topology",[114],{"type":37,"value":115},"Parallel vs. Serial Agent Topology",{"type":32,"tag":33,"props":117,"children":118},{},[119,121,127,129,134,136,141,143,148],{"type":37,"value":120},"Why would two agents accomplish what one cannot? Because ",{"type":32,"tag":122,"props":123,"children":124},"strong",{},[125],{"type":37,"value":126},"specialization",{"type":37,"value":128}," improves token efficiency. Example scenario: incoming email → categorize → draft response → get approval. A monolithic prompt uses 8K tokens, repeating the same instructions for every email. Split it into three agents: ",{"type":32,"tag":122,"props":130,"children":131},{},[132],{"type":37,"value":133},"classifier",{"type":37,"value":135}," (categorize), ",{"type":32,"tag":122,"props":137,"children":138},{},[139],{"type":37,"value":140},"drafter",{"type":37,"value":142}," (compose), ",{"type":32,"tag":122,"props":144,"children":145},{},[146],{"type":37,"value":147},"validator",{"type":37,"value":149}," (approval logic). Each has its own compact prompt. Total tokens: 8K → 2K+2K+1.5K = 5.5K. A 31% reduction.",{"type":32,"tag":33,"props":151,"children":152},{},[153,155,160,162,168,170,176,178,183],{"type":37,"value":154},"Parallel topology offers another advantage: ",{"type":32,"tag":122,"props":156,"children":157},{},[158],{"type":37,"value":159},"latency reduction",{"type":37,"value":161},". Example: content generation pipeline—one agent analyzes SEO keywords, another parses tone and style guide, a third scrapes competitor content. Running serially multiplies latency by 3. Running parallel with LangGraph's ",{"type":32,"tag":52,"props":163,"children":165},{"className":164},[],[166],{"type":37,"value":167},"StateGraph",{"type":37,"value":169}," + ",{"type":32,"tag":52,"props":171,"children":173},{"className":172},[],[174],{"type":37,"value":175},"map",{"type":37,"value":177}," node reduces max latency to the slowest agent's duration. But parallelism complicates coordination. Whose output takes priority? If there's conflict, who decides? This is why you need an ",{"type":32,"tag":122,"props":179,"children":180},{},[181],{"type":37,"value":182},"arbiter agent",{"type":37,"value":184},"—a meta-layer that takes parallel results and makes the final decision.",{"type":32,"tag":33,"props":186,"children":187},{},[188,190,196],{"type":37,"value":189},"Serial topology provides error isolation. If agent A fails, B and C don't run. You can build fallback chains: if A fails, try A2. In parallel, partial failure emerges: 2 of 3 agents succeed, one times out. How does the system proceed? This requires state machine logic. In LangGraph, you route with ",{"type":32,"tag":52,"props":191,"children":193},{"className":192},[],[194],{"type":37,"value":195},"conditional_edges",{"type":37,"value":197},": if the agent succeeds, go \"next\"; if it fails, go \"retry\" or \"fallback\".",{"type":32,"tag":199,"props":200,"children":202},"h3",{"id":201},"topology-selection-guide",[203],{"type":37,"value":204},"Topology Selection Guide",{"type":32,"tag":206,"props":207,"children":208},"table",{},[209,233],{"type":32,"tag":210,"props":211,"children":212},"thead",{},[213],{"type":32,"tag":214,"props":215,"children":216},"tr",{},[217,223,228],{"type":32,"tag":218,"props":219,"children":220},"th",{},[221],{"type":37,"value":222},"Scenario",{"type":32,"tag":218,"props":224,"children":225},{},[226],{"type":37,"value":227},"Topology",{"type":32,"tag":218,"props":229,"children":230},{},[231],{"type":37,"value":232},"Why",{"type":32,"tag":234,"props":235,"children":236},"tbody",{},[237,256,274,292],{"type":32,"tag":214,"props":238,"children":239},{},[240,246,251],{"type":32,"tag":241,"props":242,"children":243},"td",{},[244],{"type":37,"value":245},"Sequential dependency (A's output → B's input)",{"type":32,"tag":241,"props":247,"children":248},{},[249],{"type":37,"value":250},"Serial",{"type":32,"tag":241,"props":252,"children":253},{},[254],{"type":37,"value":255},"Parallel coordination overhead",{"type":32,"tag":214,"props":257,"children":258},{},[259,264,269],{"type":32,"tag":241,"props":260,"children":261},{},[262],{"type":37,"value":263},"Independent subtasks",{"type":32,"tag":241,"props":265,"children":266},{},[267],{"type":37,"value":268},"Parallel",{"type":32,"tag":241,"props":270,"children":271},{},[272],{"type":37,"value":273},"Latency reduction",{"type":32,"tag":214,"props":275,"children":276},{},[277,282,287],{"type":32,"tag":241,"props":278,"children":279},{},[280],{"type":37,"value":281},"High failure risk",{"type":32,"tag":241,"props":283,"children":284},{},[285],{"type":37,"value":286},"Serial + fallback",{"type":32,"tag":241,"props":288,"children":289},{},[290],{"type":37,"value":291},"Error isolation",{"type":32,"tag":214,"props":293,"children":294},{},[295,300,305],{"type":32,"tag":241,"props":296,"children":297},{},[298],{"type":37,"value":299},"Token cost critical",{"type":32,"tag":241,"props":301,"children":302},{},[303],{"type":37,"value":304},"Hybrid (parallel fetch, serial process)",{"type":32,"tag":241,"props":306,"children":307},{},[308],{"type":37,"value":309},"Gather data without sharing context",{"type":32,"tag":40,"props":311,"children":313},{"id":312},"state-management-and-context-pruning",[314],{"type":37,"value":315},"State Management and Context Pruning",{"type":32,"tag":33,"props":317,"children":318},{},[319,321,326],{"type":37,"value":320},"The most critical challenge in multi-agent systems: ",{"type":32,"tag":122,"props":322,"children":323},{},[324],{"type":37,"value":325},"state bloat",{"type":37,"value":327},". Each agent maintains conversation history; context window grows with every iteration. 10 agents × 5 iterations = 50 messages. Even Claude's 200K context window can fill up. Result: latency increases (token computation cost is O(n²)), costs rise, some models time out.",{"type":32,"tag":33,"props":329,"children":330},{},[331,333,338,340,345,347,353],{"type":37,"value":332},"Solution: ",{"type":32,"tag":122,"props":334,"children":335},{},[336],{"type":37,"value":337},"stateful orchestration",{"type":37,"value":339}," and ",{"type":32,"tag":122,"props":341,"children":342},{},[343],{"type":37,"value":344},"selective memory",{"type":37,"value":346},". LangGraph's ",{"type":32,"tag":52,"props":348,"children":350},{"className":349},[],[351],{"type":37,"value":352},"checkpointing",{"type":37,"value":354}," writes state to an external store (Redis, PostgreSQL). Each agent reads only its relevant context. Example: the drafter agent sees the classifier's output but not the validator's prior approval history—unless needed.",{"type":32,"tag":33,"props":356,"children":357},{},[358,360,365,367,373],{"type":37,"value":359},"Another pattern: ",{"type":32,"tag":122,"props":361,"children":362},{},[363],{"type":37,"value":364},"summarization agent",{"type":37,"value":366},". It runs every N iterations and compresses conversation into 3–4 sentences. LangChain's ",{"type":32,"tag":52,"props":368,"children":370},{"className":369},[],[371],{"type":37,"value":372},"ConversationSummaryMemory",{"type":37,"value":374}," does this, but note: summarization itself costs LLM calls—extra expense. Tune the trigger threshold carefully. In our production pipeline, we run summarization every 12 iterations—200 tokens of context becomes 50, a 75% saving.",{"type":32,"tag":33,"props":376,"children":377},{},[378,380,386],{"type":37,"value":379},"Context pruning is another option: delete irrelevant messages. Example: the classifier agent's output is just a category label, but the model also returns reasoning chain. Before sending to the drafter, you strip the reasoning and keep only the label. In LangChain, use ",{"type":32,"tag":52,"props":381,"children":383},{"className":382},[],[384],{"type":37,"value":385},"MessagesPlaceholder",{"type":37,"value":387}," + custom filter functions. It's manual, but cuts tokens 40–50%.",{"type":32,"tag":40,"props":389,"children":391},{"id":390},"reliability-and-observability-in-production",[392],{"type":37,"value":393},"Reliability and Observability in Production",{"type":32,"tag":33,"props":395,"children":396},{},[397,399,404,405,410,412,418],{"type":37,"value":398},"Multi-agent systems mean N× failure surface. One agent times out, another hits rate limits, a third hallucinates. Managing this chaos requires ",{"type":32,"tag":122,"props":400,"children":401},{},[402],{"type":37,"value":403},"circuit breakers",{"type":37,"value":339},{"type":32,"tag":122,"props":406,"children":407},{},[408],{"type":37,"value":409},"retry logic",{"type":37,"value":411},". LangChain offers ",{"type":32,"tag":52,"props":413,"children":415},{"className":414},[],[416],{"type":37,"value":417},"RunnableRetry",{"type":37,"value":419},", but for finer control, the Tenacity library is more flexible: exponential backoff, jitter, max attempts.",{"type":32,"tag":33,"props":421,"children":422},{},[423],{"type":37,"value":424},"Without observability, debugging is impossible. Tools like LangSmith, LangGraph Studio, and Weights & Biases visualize agent traces: when each agent was called, what it returned, how many tokens it used. Our stack uses LangSmith + custom Prometheus exporters: agent latency, token count, error rate feed into Grafana dashboards. Alert thresholds: P95 latency >3s or error rate >5%.",{"type":32,"tag":33,"props":426,"children":427},{},[428,430,435,437,446,448,454],{"type":37,"value":429},"Another production challenge: ",{"type":32,"tag":122,"props":431,"children":432},{},[433],{"type":37,"value":434},"non-determinism",{"type":37,"value":436},". Same input, different outputs—because models are stochastic. Even at temperature=0, infrastructure variation introduces noise. This is why reliable input pipelines like ",{"type":32,"tag":438,"props":439,"children":443},"a",{"href":440,"rel":441},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Ffirstparty",[442],"nofollow",[444],{"type":37,"value":445},"first-party data architecture",{"type":37,"value":447}," are essential: structured data input yields more consistent output. You also need an eval framework: run regression tests before each deploy, measure output quality. Use LangChain's ",{"type":32,"tag":52,"props":449,"children":451},{"className":450},[],[452],{"type":37,"value":453},"EvaluatorChain",{"type":37,"value":455}," or Anthropic's model-based eval.",{"type":32,"tag":40,"props":457,"children":459},{"id":458},"cost-optimization-and-tradeoffs",[460],{"type":37,"value":461},"Cost Optimization and Tradeoffs",{"type":32,"tag":33,"props":463,"children":464},{},[465],{"type":37,"value":466},"Multi-agent systems are expensive. A single agent call of 2K tokens = $0.006 (Claude 3.5 Sonnet pricing). The same task with 3 agents: 3× API calls, 6K tokens total, $0.018. 3× cost. Scenarios that justify this: compressing long context (large doc → chunked → parallel process), specialization (each agent runs a smaller model, cheaper total), failure isolation (monolith has high failure risk).",{"type":32,"tag":33,"props":468,"children":469},{},[470,472,477,479,484,486,491],{"type":37,"value":471},"Ways to reduce token costs: ",{"type":32,"tag":122,"props":473,"children":474},{},[475],{"type":37,"value":476},"model distillation",{"type":37,"value":478}," (large model fine-tunes small model, small model runs in production), ",{"type":32,"tag":122,"props":480,"children":481},{},[482],{"type":37,"value":483},"caching",{"type":37,"value":485}," (same context repeats? return cached response—Anthropic's prompt caching offers 90% savings), ",{"type":32,"tag":122,"props":487,"children":488},{},[489],{"type":37,"value":490},"batch processing",{"type":37,"value":492}," (async instead of real-time, prefer cheaper models).",{"type":32,"tag":33,"props":494,"children":495},{},[496],{"type":37,"value":497},"Latency vs. cost tradeoff: parallel topology cuts latency but raises cost. Parallelize the critical path, serialize the non-critical. Example: user query → classifier parallel (fast response), reporting agent serial (background job). This hybrid keeps P95 latency \u003C2s while cutting costs 35%.",{"type":32,"tag":40,"props":499,"children":501},{"id":500},"orchestration-examples-and-code",[502],{"type":37,"value":503},"Orchestration Examples and Code",{"type":32,"tag":33,"props":505,"children":506},{},[507],{"type":37,"value":508},"Simple serial chain (LangChain):",{"type":32,"tag":510,"props":511,"children":515},"pre",{"className":512,"code":513,"language":514,"meta":16,"style":16},"language-python shiki shiki-themes github-dark","from langchain.chains import LLMChain\nfrom langchain.prompts import PromptTemplate\nfrom langchain_anthropic import ChatAnthropic\n\nclassifier = LLMChain(\n    llm=ChatAnthropic(model=\"claude-3-5-sonnet\"),\n    prompt=PromptTemplate.from_template(\"Categorize this: {text}\")\n)\n\ndrafter = LLMChain(\n    llm=ChatAnthropic(model=\"claude-3-5-sonnet\"),\n    prompt=PromptTemplate.from_template(\"Draft a response: {category}, {text}\")\n)\n\ncategory = classifier.run(text=user_input)\nresponse = drafter.run(category=category, text=user_input)\n","python",[516],{"type":32,"tag":52,"props":517,"children":518},{"__ignoreMap":16},[519,547,569,591,601,620,659,698,705,713,730,762,805,813,821,852],{"type":32,"tag":520,"props":521,"children":524},"span",{"class":522,"line":523},"line",1,[525,531,537,542],{"type":32,"tag":520,"props":526,"children":528},{"style":527},"--shiki-default:#F97583",[529],{"type":37,"value":530},"from",{"type":32,"tag":520,"props":532,"children":534},{"style":533},"--shiki-default:#E1E4E8",[535],{"type":37,"value":536}," langchain.chains ",{"type":32,"tag":520,"props":538,"children":539},{"style":527},[540],{"type":37,"value":541},"import",{"type":32,"tag":520,"props":543,"children":544},{"style":533},[545],{"type":37,"value":546}," LLMChain\n",{"type":32,"tag":520,"props":548,"children":550},{"class":522,"line":549},2,[551,555,560,564],{"type":32,"tag":520,"props":552,"children":553},{"style":527},[554],{"type":37,"value":530},{"type":32,"tag":520,"props":556,"children":557},{"style":533},[558],{"type":37,"value":559}," langchain.prompts ",{"type":32,"tag":520,"props":561,"children":562},{"style":527},[563],{"type":37,"value":541},{"type":32,"tag":520,"props":565,"children":566},{"style":533},[567],{"type":37,"value":568}," PromptTemplate\n",{"type":32,"tag":520,"props":570,"children":572},{"class":522,"line":571},3,[573,577,582,586],{"type":32,"tag":520,"props":574,"children":575},{"style":527},[576],{"type":37,"value":530},{"type":32,"tag":520,"props":578,"children":579},{"style":533},[580],{"type":37,"value":581}," langchain_anthropic ",{"type":32,"tag":520,"props":583,"children":584},{"style":527},[585],{"type":37,"value":541},{"type":32,"tag":520,"props":587,"children":588},{"style":533},[589],{"type":37,"value":590}," ChatAnthropic\n",{"type":32,"tag":520,"props":592,"children":594},{"class":522,"line":593},4,[595],{"type":32,"tag":520,"props":596,"children":598},{"emptyLinePlaceholder":597},true,[599],{"type":37,"value":600},"\n",{"type":32,"tag":520,"props":602,"children":604},{"class":522,"line":603},5,[605,610,615],{"type":32,"tag":520,"props":606,"children":607},{"style":533},[608],{"type":37,"value":609},"classifier ",{"type":32,"tag":520,"props":611,"children":612},{"style":527},[613],{"type":37,"value":614},"=",{"type":32,"tag":520,"props":616,"children":617},{"style":533},[618],{"type":37,"value":619}," LLMChain(\n",{"type":32,"tag":520,"props":621,"children":623},{"class":522,"line":622},6,[624,630,634,639,644,648,654],{"type":32,"tag":520,"props":625,"children":627},{"style":626},"--shiki-default:#FFAB70",[628],{"type":37,"value":629},"    llm",{"type":32,"tag":520,"props":631,"children":632},{"style":527},[633],{"type":37,"value":614},{"type":32,"tag":520,"props":635,"children":636},{"style":533},[637],{"type":37,"value":638},"ChatAnthropic(",{"type":32,"tag":520,"props":640,"children":641},{"style":626},[642],{"type":37,"value":643},"model",{"type":32,"tag":520,"props":645,"children":646},{"style":527},[647],{"type":37,"value":614},{"type":32,"tag":520,"props":649,"children":651},{"style":650},"--shiki-default:#9ECBFF",[652],{"type":37,"value":653},"\"claude-3-5-sonnet\"",{"type":32,"tag":520,"props":655,"children":656},{"style":533},[657],{"type":37,"value":658},"),\n",{"type":32,"tag":520,"props":660,"children":662},{"class":522,"line":661},7,[663,668,672,677,682,688,693],{"type":32,"tag":520,"props":664,"children":665},{"style":626},[666],{"type":37,"value":667},"    prompt",{"type":32,"tag":520,"props":669,"children":670},{"style":527},[671],{"type":37,"value":614},{"type":32,"tag":520,"props":673,"children":674},{"style":533},[675],{"type":37,"value":676},"PromptTemplate.from_template(",{"type":32,"tag":520,"props":678,"children":679},{"style":650},[680],{"type":37,"value":681},"\"Categorize this: ",{"type":32,"tag":520,"props":683,"children":685},{"style":684},"--shiki-default:#79B8FF",[686],{"type":37,"value":687},"{text}",{"type":32,"tag":520,"props":689,"children":690},{"style":650},[691],{"type":37,"value":692},"\"",{"type":32,"tag":520,"props":694,"children":695},{"style":533},[696],{"type":37,"value":697},")\n",{"type":32,"tag":520,"props":699,"children":700},{"class":522,"line":26},[701],{"type":32,"tag":520,"props":702,"children":703},{"style":533},[704],{"type":37,"value":697},{"type":32,"tag":520,"props":706,"children":708},{"class":522,"line":707},9,[709],{"type":32,"tag":520,"props":710,"children":711},{"emptyLinePlaceholder":597},[712],{"type":37,"value":600},{"type":32,"tag":520,"props":714,"children":716},{"class":522,"line":715},10,[717,722,726],{"type":32,"tag":520,"props":718,"children":719},{"style":533},[720],{"type":37,"value":721},"drafter ",{"type":32,"tag":520,"props":723,"children":724},{"style":527},[725],{"type":37,"value":614},{"type":32,"tag":520,"props":727,"children":728},{"style":533},[729],{"type":37,"value":619},{"type":32,"tag":520,"props":731,"children":733},{"class":522,"line":732},11,[734,738,742,746,750,754,758],{"type":32,"tag":520,"props":735,"children":736},{"style":626},[737],{"type":37,"value":629},{"type":32,"tag":520,"props":739,"children":740},{"style":527},[741],{"type":37,"value":614},{"type":32,"tag":520,"props":743,"children":744},{"style":533},[745],{"type":37,"value":638},{"type":32,"tag":520,"props":747,"children":748},{"style":626},[749],{"type":37,"value":643},{"type":32,"tag":520,"props":751,"children":752},{"style":527},[753],{"type":37,"value":614},{"type":32,"tag":520,"props":755,"children":756},{"style":650},[757],{"type":37,"value":653},{"type":32,"tag":520,"props":759,"children":760},{"style":533},[761],{"type":37,"value":658},{"type":32,"tag":520,"props":763,"children":765},{"class":522,"line":764},12,[766,770,774,778,783,788,793,797,801],{"type":32,"tag":520,"props":767,"children":768},{"style":626},[769],{"type":37,"value":667},{"type":32,"tag":520,"props":771,"children":772},{"style":527},[773],{"type":37,"value":614},{"type":32,"tag":520,"props":775,"children":776},{"style":533},[777],{"type":37,"value":676},{"type":32,"tag":520,"props":779,"children":780},{"style":650},[781],{"type":37,"value":782},"\"Draft a response: ",{"type":32,"tag":520,"props":784,"children":785},{"style":684},[786],{"type":37,"value":787},"{category}",{"type":32,"tag":520,"props":789,"children":790},{"style":650},[791],{"type":37,"value":792},", ",{"type":32,"tag":520,"props":794,"children":795},{"style":684},[796],{"type":37,"value":687},{"type":32,"tag":520,"props":798,"children":799},{"style":650},[800],{"type":37,"value":692},{"type":32,"tag":520,"props":802,"children":803},{"style":533},[804],{"type":37,"value":697},{"type":32,"tag":520,"props":806,"children":808},{"class":522,"line":807},13,[809],{"type":32,"tag":520,"props":810,"children":811},{"style":533},[812],{"type":37,"value":697},{"type":32,"tag":520,"props":814,"children":816},{"class":522,"line":815},14,[817],{"type":32,"tag":520,"props":818,"children":819},{"emptyLinePlaceholder":597},[820],{"type":37,"value":600},{"type":32,"tag":520,"props":822,"children":824},{"class":522,"line":823},15,[825,830,834,839,843,847],{"type":32,"tag":520,"props":826,"children":827},{"style":533},[828],{"type":37,"value":829},"category ",{"type":32,"tag":520,"props":831,"children":832},{"style":527},[833],{"type":37,"value":614},{"type":32,"tag":520,"props":835,"children":836},{"style":533},[837],{"type":37,"value":838}," classifier.run(",{"type":32,"tag":520,"props":840,"children":841},{"style":626},[842],{"type":37,"value":37},{"type":32,"tag":520,"props":844,"children":845},{"style":527},[846],{"type":37,"value":614},{"type":32,"tag":520,"props":848,"children":849},{"style":533},[850],{"type":37,"value":851},"user_input)\n",{"type":32,"tag":520,"props":853,"children":855},{"class":522,"line":854},16,[856,861,865,870,875,879,884,888,892],{"type":32,"tag":520,"props":857,"children":858},{"style":533},[859],{"type":37,"value":860},"response ",{"type":32,"tag":520,"props":862,"children":863},{"style":527},[864],{"type":37,"value":614},{"type":32,"tag":520,"props":866,"children":867},{"style":533},[868],{"type":37,"value":869}," drafter.run(",{"type":32,"tag":520,"props":871,"children":872},{"style":626},[873],{"type":37,"value":874},"category",{"type":32,"tag":520,"props":876,"children":877},{"style":527},[878],{"type":37,"value":614},{"type":32,"tag":520,"props":880,"children":881},{"style":533},[882],{"type":37,"value":883},"category, ",{"type":32,"tag":520,"props":885,"children":886},{"style":626},[887],{"type":37,"value":37},{"type":32,"tag":520,"props":889,"children":890},{"style":527},[891],{"type":37,"value":614},{"type":32,"tag":520,"props":893,"children":894},{"style":533},[895],{"type":37,"value":851},{"type":32,"tag":33,"props":897,"children":898},{},[899],{"type":37,"value":900},"Parallel execution (LangGraph):",{"type":32,"tag":510,"props":902,"children":904},{"className":512,"code":903,"language":514,"meta":16,"style":16},"from langgraph.graph import StateGraph\n\ndef parallel_tasks(state):\n    seo_result = seo_agent.invoke(state[\"content\"])\n    tone_result = tone_agent.invoke(state[\"style_guide\"])\n    return {\"seo\": seo_result, \"tone\": tone_result}\n\nworkflow = StateGraph()\nworkflow.add_node(\"parallel\", parallel_tasks)\nworkflow.add_node(\"merge\", merge_agent)\nworkflow.set_entry_point(\"parallel\")\nworkflow.add_edge(\"parallel\", \"merge\")\napp = workflow.compile()\n",[905],{"type":32,"tag":52,"props":906,"children":907},{"__ignoreMap":16},[908,929,936,955,982,1008,1041,1048,1065,1083,1100,1116,1140],{"type":32,"tag":520,"props":909,"children":910},{"class":522,"line":523},[911,915,920,924],{"type":32,"tag":520,"props":912,"children":913},{"style":527},[914],{"type":37,"value":530},{"type":32,"tag":520,"props":916,"children":917},{"style":533},[918],{"type":37,"value":919}," langgraph.graph ",{"type":32,"tag":520,"props":921,"children":922},{"style":527},[923],{"type":37,"value":541},{"type":32,"tag":520,"props":925,"children":926},{"style":533},[927],{"type":37,"value":928}," StateGraph\n",{"type":32,"tag":520,"props":930,"children":931},{"class":522,"line":549},[932],{"type":32,"tag":520,"props":933,"children":934},{"emptyLinePlaceholder":597},[935],{"type":37,"value":600},{"type":32,"tag":520,"props":937,"children":938},{"class":522,"line":571},[939,944,950],{"type":32,"tag":520,"props":940,"children":941},{"style":527},[942],{"type":37,"value":943},"def",{"type":32,"tag":520,"props":945,"children":947},{"style":946},"--shiki-default:#B392F0",[948],{"type":37,"value":949}," parallel_tasks",{"type":32,"tag":520,"props":951,"children":952},{"style":533},[953],{"type":37,"value":954},"(state):\n",{"type":32,"tag":520,"props":956,"children":957},{"class":522,"line":593},[958,963,967,972,977],{"type":32,"tag":520,"props":959,"children":960},{"style":533},[961],{"type":37,"value":962},"    seo_result ",{"type":32,"tag":520,"props":964,"children":965},{"style":527},[966],{"type":37,"value":614},{"type":32,"tag":520,"props":968,"children":969},{"style":533},[970],{"type":37,"value":971}," seo_agent.invoke(state[",{"type":32,"tag":520,"props":973,"children":974},{"style":650},[975],{"type":37,"value":976},"\"content\"",{"type":32,"tag":520,"props":978,"children":979},{"style":533},[980],{"type":37,"value":981},"])\n",{"type":32,"tag":520,"props":983,"children":984},{"class":522,"line":603},[985,990,994,999,1004],{"type":32,"tag":520,"props":986,"children":987},{"style":533},[988],{"type":37,"value":989},"    tone_result ",{"type":32,"tag":520,"props":991,"children":992},{"style":527},[993],{"type":37,"value":614},{"type":32,"tag":520,"props":995,"children":996},{"style":533},[997],{"type":37,"value":998}," tone_agent.invoke(state[",{"type":32,"tag":520,"props":1000,"children":1001},{"style":650},[1002],{"type":37,"value":1003},"\"style_guide\"",{"type":32,"tag":520,"props":1005,"children":1006},{"style":533},[1007],{"type":37,"value":981},{"type":32,"tag":520,"props":1009,"children":1010},{"class":522,"line":622},[1011,1016,1021,1026,1031,1036],{"type":32,"tag":520,"props":1012,"children":1013},{"style":527},[1014],{"type":37,"value":1015},"    return",{"type":32,"tag":520,"props":1017,"children":1018},{"style":533},[1019],{"type":37,"value":1020}," {",{"type":32,"tag":520,"props":1022,"children":1023},{"style":650},[1024],{"type":37,"value":1025},"\"seo\"",{"type":32,"tag":520,"props":1027,"children":1028},{"style":533},[1029],{"type":37,"value":1030},": seo_result, ",{"type":32,"tag":520,"props":1032,"children":1033},{"style":650},[1034],{"type":37,"value":1035},"\"tone\"",{"type":32,"tag":520,"props":1037,"children":1038},{"style":533},[1039],{"type":37,"value":1040},": tone_result}\n",{"type":32,"tag":520,"props":1042,"children":1043},{"class":522,"line":661},[1044],{"type":32,"tag":520,"props":1045,"children":1046},{"emptyLinePlaceholder":597},[1047],{"type":37,"value":600},{"type":32,"tag":520,"props":1049,"children":1050},{"class":522,"line":26},[1051,1056,1060],{"type":32,"tag":520,"props":1052,"children":1053},{"style":533},[1054],{"type":37,"value":1055},"workflow ",{"type":32,"tag":520,"props":1057,"children":1058},{"style":527},[1059],{"type":37,"value":614},{"type":32,"tag":520,"props":1061,"children":1062},{"style":533},[1063],{"type":37,"value":1064}," StateGraph()\n",{"type":32,"tag":520,"props":1066,"children":1067},{"class":522,"line":707},[1068,1073,1078],{"type":32,"tag":520,"props":1069,"children":1070},{"style":533},[1071],{"type":37,"value":1072},"workflow.add_node(",{"type":32,"tag":520,"props":1074,"children":1075},{"style":650},[1076],{"type":37,"value":1077},"\"parallel\"",{"type":32,"tag":520,"props":1079,"children":1080},{"style":533},[1081],{"type":37,"value":1082},", parallel_tasks)\n",{"type":32,"tag":520,"props":1084,"children":1085},{"class":522,"line":715},[1086,1090,1095],{"type":32,"tag":520,"props":1087,"children":1088},{"style":533},[1089],{"type":37,"value":1072},{"type":32,"tag":520,"props":1091,"children":1092},{"style":650},[1093],{"type":37,"value":1094},"\"merge\"",{"type":32,"tag":520,"props":1096,"children":1097},{"style":533},[1098],{"type":37,"value":1099},", merge_agent)\n",{"type":32,"tag":520,"props":1101,"children":1102},{"class":522,"line":732},[1103,1108,1112],{"type":32,"tag":520,"props":1104,"children":1105},{"style":533},[1106],{"type":37,"value":1107},"workflow.set_entry_point(",{"type":32,"tag":520,"props":1109,"children":1110},{"style":650},[1111],{"type":37,"value":1077},{"type":32,"tag":520,"props":1113,"children":1114},{"style":533},[1115],{"type":37,"value":697},{"type":32,"tag":520,"props":1117,"children":1118},{"class":522,"line":764},[1119,1124,1128,1132,1136],{"type":32,"tag":520,"props":1120,"children":1121},{"style":533},[1122],{"type":37,"value":1123},"workflow.add_edge(",{"type":32,"tag":520,"props":1125,"children":1126},{"style":650},[1127],{"type":37,"value":1077},{"type":32,"tag":520,"props":1129,"children":1130},{"style":533},[1131],{"type":37,"value":792},{"type":32,"tag":520,"props":1133,"children":1134},{"style":650},[1135],{"type":37,"value":1094},{"type":32,"tag":520,"props":1137,"children":1138},{"style":533},[1139],{"type":37,"value":697},{"type":32,"tag":520,"props":1141,"children":1142},{"class":522,"line":807},[1143,1148,1152],{"type":32,"tag":520,"props":1144,"children":1145},{"style":533},[1146],{"type":37,"value":1147},"app ",{"type":32,"tag":520,"props":1149,"children":1150},{"style":527},[1151],{"type":37,"value":614},{"type":32,"tag":520,"props":1153,"children":1154},{"style":533},[1155],{"type":37,"value":1156}," workflow.compile()\n",{"type":32,"tag":33,"props":1158,"children":1159},{},[1160],{"type":37,"value":1161},"This code runs 2 agents in parallel and passes results to a merge agent. LangGraph automatically manages state and writes checkpoints to Redis.",{"type":32,"tag":33,"props":1163,"children":1164},{},[1165,1167,1174],{"type":37,"value":1166},"Multi-agent orchestration isn't an end in itself—it's a tool. If you're automating another growth channel or building a decision pipeline, pick an agent topology, but clarify metrics: tokens\u002Ftask, latency, error rate. In production, success means the system runs with 95% uptime and token costs stay within budget. If you're building a multi-agent system for content generation, integrate it with ",{"type":32,"tag":438,"props":1168,"children":1171},{"href":1169,"rel":1170},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Fgeo",[442],[1172],{"type":37,"value":1173},"Generative Engine Optimization",{"type":37,"value":1175}," strategy—agents collect citation data, feed GEO metrics, ROI becomes measurable. Otherwise, you've just built a complicated API wrapper.",{"type":32,"tag":1177,"props":1178,"children":1179},"style",{},[1180],{"type":37,"value":1181},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":571,"depth":571,"links":1183},[1184,1185,1188,1189,1190,1191],{"id":42,"depth":549,"text":45},{"id":112,"depth":549,"text":115,"children":1186},[1187],{"id":201,"depth":571,"text":204},{"id":312,"depth":549,"text":315},{"id":390,"depth":549,"text":393},{"id":458,"depth":549,"text":461},{"id":500,"depth":549,"text":503},"markdown","content:en:ai:multi-agent-orchestration-from-single-llm-call-to-systems.md","content","en\u002Fai\u002Fmulti-agent-orchestration-from-single-llm-call-to-systems.md","en\u002Fai\u002Fmulti-agent-orchestration-from-single-llm-call-to-systems","md",1782079487819]