Buckets:

HuggingFaceDocBuilder's picture
download
raw
11.4 kB
import{s as xe,n as we,o as be}from"../chunks/scheduler.4048030c.js";import{S as ye,i as Ce,e as g,s as n,c as o,h as ve,a as h,d as a,b as i,f as $e,j as r,g as me,k as ce,l as ke,m as s,n as l,t as u,o as m,p}from"../chunks/index.5d0b9360.js";import{C as Te,H as d,E as qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.89cf75bd.js";import{Q as A}from"../chunks/Question.e487118a.js";function _e(pe){let f,N,F,E,$,O,c,I,x,fe="Test your ability to design and implement multi-agent workflows.",j,w,R,b,B,y,D,C,G,v,K,k,Y,T,J,q,V,_,X,S,Z,ee,te,Q,ae,M,de="If you got 4-5 correct, you’re ready to design multi-agent workflows without reaching for subagents unnecessarily. If you missed several, review the platform-specific invocation patterns and failure-handling guidance.",se,P,ne,H,ge="<li>Use subagents when the task shape justifies isolation or parallelism</li> <li>Pass only the context a child agent needs, and use files when the payload is too large for a prompt</li> <li>Design for retries, partial results, and platform-specific invocation details from the start</li>",ie,L,oe,U,he="You’ve finished Unit 4: Subagents. Next up is Unit 5, where you’ll add deterministic lifecycle hooks around those same agent workflows.",re,z,le,W,ue;return $=new Te({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),c=new d({props:{title:"Quiz 2: Multi-Agent Workflows",local:"quiz-2-multi-agent-workflows",headingTag:"h1"}}),w=new d({props:{title:"Question 1: When is the overhead of subagents worth it?",local:"question-1-when-is-the-overhead-of-subagents-worth-it",headingTag:"h2"}}),b=new A({props:{choices:[{text:"Always spawn as many subagents as possible for maximum parallelism",explain:"More subagents means more token usage, latency, and coordination overhead. Use subagents selectively."},{text:"Use subagents when tasks are independent and parallelizable, and the overhead is justified by the task complexity",explain:"Correct! Subagent workflows consume more tokens than single-agent runs. Only use them when the parallelism benefit outweighs the overhead.",correct:!0},{text:"Subagents are only for research tasks; never use for implementation",explain:"False. Worker subagents can implement fixes, write code, and make changes. Codex even has a built-in 'worker' agent type for this."},{text:"Subagents should always share the same context window as the parent",explain:"Subagents run as isolated instances with their own context. They communicate results back to the parent, not share context directly."}]}}),y=new d({props:{title:"Question 2: How do parent agents share context with subagents?",local:"question-2-how-do-parent-agents-share-context-with-subagents",headingTag:"h2"}}),C=new A({props:{choices:[{text:"Subagents can directly access the parent agent's memory and variables",explain:"False. Subagents are isolated. They receive context from the parent via their task description and report results back."},{text:"Pass small context in the task description; for large data, write to a file and reference the path",explain:"Correct! Subagents can't access parent memory. Use task descriptions for small context and files for larger data.",correct:!0},{text:"Use global variables that all subagents can read",explain:"Subagents are separate instances. Global variables don't cross agent boundaries."},{text:"There's no way to share data between parent and subagent",explain:"False. The parent passes context in the task description, and subagents report results back. File system can also be used."}]}}),v=new d({props:{title:"Question 3: How should you design for subagent failure?",local:"question-3-how-should-you-design-for-subagent-failure",headingTag:"h2"}}),k=new A({props:{choices:[{text:"If a subagent fails, the entire workflow always fails",explain:"Not necessarily. Good design handles failures gracefully — retry, skip, or use partial results."},{text:"Design for failure: use timeouts, handle partial results, and have fallback strategies",explain:"Correct! Subagents can timeout, produce errors, or return unexpected results. Robust workflows handle these cases.",correct:!0},{text:"Assume all subagents will succeed; don't add error handling since it's just overhead",explain:"Risky. Network issues, token limits, and unexpected errors are common in multi-agent workflows."},{text:"If a subagent fails, immediately spawn 5 more to retry the same task",explain:"Wasteful. Diagnose the failure first, then retry selectively. Brute-force retries waste tokens."}]}}),T=new d({props:{title:"Question 4: How do Claude Code and Codex expose subagents?",local:"question-4-how-do-claude-code-and-codex-expose-subagents",headingTag:"h2"}}),q=new A({props:{choices:[{text:"Claude Code: use /agent spawn. Codex: use codex-agent spawn. They're identical.",explain:"Neither command exists. Claude Code uses conversational invocation; Codex uses natural language requests to spawn agents."},{text:"Claude Code: conversational invocation + custom agents in .claude/agents/. Codex: natural language requests + custom agents as TOML files in .codex/agents/.",explain:"Correct! Both platforms use natural language to trigger subagent creation, but configure custom agents differently — Claude Code with markdown files, Codex with TOML files.",correct:!0},{text:"Claude Code doesn't support subagents. Only Codex does.",explain:"False. Claude Code has robust subagent support via the Agent tool, conversational invocation, and custom agents."},{text:"Both platforms use the exact same subagent API and configuration format",explain:"No. Claude Code uses markdown-based agent definitions; Codex uses TOML. The invocation style is conversational for both but with different capabilities."}]}}),_=new d({props:{title:"Question 5: What built-in agent types does Codex provide?",local:"question-5-what-built-in-agent-types-does-codex-provide",headingTag:"h2"}}),S=new A({props:{choices:[{text:"Codex has three built-in agent types: default (general), worker (implementation), and explorer (read-heavy codebase exploration)",explain:"Correct! These three built-in types cover the most common subagent use cases without requiring custom agent definitions.",correct:!0},{text:"Codex has no built-in agent types; you must always define custom agents",explain:"False. Codex ships with default, worker, and explorer agents that can be used immediately."},{text:"Codex only supports one agent at a time; there's no parallelism",explain:"False. Codex supports up to max_threads (default 6) concurrent agent threads."},{text:"Codex subagents require a separate codex-agent binary to manage",explain:"False. Subagents are managed through Codex itself — use /agent to switch between threads, or ask Codex in natural language."}]}}),Q=new d({props:{title:"Summary",local:"summary",headingTag:"h2"}}),P=new d({props:{title:"Key Takeaways",local:"key-takeaways",headingTag:"h2"}}),L=new d({props:{title:"Next Steps",local:"next-steps",headingTag:"h2"}}),z=new qe({props:{source:"https://github.com/huggingface/context-course/blob/main/units/en/unit4/quiz2.mdx"}}),{c(){f=g("meta"),N=n(),F=g("p"),E=n(),o($.$$.fragment),O=n(),o(c.$$.fragment),I=n(),x=g("p"),x.textContent=fe,j=n(),o(w.$$.fragment),R=n(),o(b.$$.fragment),B=n(),o(y.$$.fragment),D=n(),o(C.$$.fragment),G=n(),o(v.$$.fragment),K=n(),o(k.$$.fragment),Y=n(),o(T.$$.fragment),J=n(),o(q.$$.fragment),V=n(),o(_.$$.fragment),X=n(),o(S.$$.fragment),Z=n(),ee=g("hr"),te=n(),o(Q.$$.fragment),ae=n(),M=g("p"),M.textContent=de,se=n(),o(P.$$.fragment),ne=n(),H=g("ul"),H.innerHTML=ge,ie=n(),o(L.$$.fragment),oe=n(),U=g("p"),U.textContent=he,re=n(),o(z.$$.fragment),le=n(),W=g("p"),this.h()},l(e){const t=ve("svelte-u9bgzb",document.head);f=h(t,"META",{name:!0,content:!0}),t.forEach(a),N=i(e),F=h(e,"P",{}),$e(F).forEach(a),E=i(e),r($.$$.fragment,e),O=i(e),r(c.$$.fragment,e),I=i(e),x=h(e,"P",{"data-svelte-h":!0}),me(x)!=="svelte-1oercc9"&&(x.textContent=fe),j=i(e),r(w.$$.fragment,e),R=i(e),r(b.$$.fragment,e),B=i(e),r(y.$$.fragment,e),D=i(e),r(C.$$.fragment,e),G=i(e),r(v.$$.fragment,e),K=i(e),r(k.$$.fragment,e),Y=i(e),r(T.$$.fragment,e),J=i(e),r(q.$$.fragment,e),V=i(e),r(_.$$.fragment,e),X=i(e),r(S.$$.fragment,e),Z=i(e),ee=h(e,"HR",{}),te=i(e),r(Q.$$.fragment,e),ae=i(e),M=h(e,"P",{"data-svelte-h":!0}),me(M)!=="svelte-1cwpqsl"&&(M.textContent=de),se=i(e),r(P.$$.fragment,e),ne=i(e),H=h(e,"UL",{"data-svelte-h":!0}),me(H)!=="svelte-1eaf935"&&(H.innerHTML=ge),ie=i(e),r(L.$$.fragment,e),oe=i(e),U=h(e,"P",{"data-svelte-h":!0}),me(U)!=="svelte-1xhls8b"&&(U.textContent=he),re=i(e),r(z.$$.fragment,e),le=i(e),W=h(e,"P",{}),$e(W).forEach(a),this.h()},h(){ce(f,"name","hf:doc:metadata"),ce(f,"content",Se)},m(e,t){ke(document.head,f),s(e,N,t),s(e,F,t),s(e,E,t),l($,e,t),s(e,O,t),l(c,e,t),s(e,I,t),s(e,x,t),s(e,j,t),l(w,e,t),s(e,R,t),l(b,e,t),s(e,B,t),l(y,e,t),s(e,D,t),l(C,e,t),s(e,G,t),l(v,e,t),s(e,K,t),l(k,e,t),s(e,Y,t),l(T,e,t),s(e,J,t),l(q,e,t),s(e,V,t),l(_,e,t),s(e,X,t),l(S,e,t),s(e,Z,t),s(e,ee,t),s(e,te,t),l(Q,e,t),s(e,ae,t),s(e,M,t),s(e,se,t),l(P,e,t),s(e,ne,t),s(e,H,t),s(e,ie,t),l(L,e,t),s(e,oe,t),s(e,U,t),s(e,re,t),l(z,e,t),s(e,le,t),s(e,W,t),ue=!0},p:we,i(e){ue||(u($.$$.fragment,e),u(c.$$.fragment,e),u(w.$$.fragment,e),u(b.$$.fragment,e),u(y.$$.fragment,e),u(C.$$.fragment,e),u(v.$$.fragment,e),u(k.$$.fragment,e),u(T.$$.fragment,e),u(q.$$.fragment,e),u(_.$$.fragment,e),u(S.$$.fragment,e),u(Q.$$.fragment,e),u(P.$$.fragment,e),u(L.$$.fragment,e),u(z.$$.fragment,e),ue=!0)},o(e){m($.$$.fragment,e),m(c.$$.fragment,e),m(w.$$.fragment,e),m(b.$$.fragment,e),m(y.$$.fragment,e),m(C.$$.fragment,e),m(v.$$.fragment,e),m(k.$$.fragment,e),m(T.$$.fragment,e),m(q.$$.fragment,e),m(_.$$.fragment,e),m(S.$$.fragment,e),m(Q.$$.fragment,e),m(P.$$.fragment,e),m(L.$$.fragment,e),m(z.$$.fragment,e),ue=!1},d(e){e&&(a(N),a(F),a(E),a(O),a(I),a(x),a(j),a(R),a(B),a(D),a(G),a(K),a(Y),a(J),a(V),a(X),a(Z),a(ee),a(te),a(ae),a(M),a(se),a(ne),a(H),a(ie),a(oe),a(U),a(re),a(le),a(W)),a(f),p($,e),p(c,e),p(w,e),p(b,e),p(y,e),p(C,e),p(v,e),p(k,e),p(T,e),p(q,e),p(_,e),p(S,e),p(Q,e),p(P,e),p(L,e),p(z,e)}}}const Se='{"title":"Quiz 2: Multi-Agent Workflows","local":"quiz-2-multi-agent-workflows","sections":[{"title":"Question 1: When is the overhead of subagents worth it?","local":"question-1-when-is-the-overhead-of-subagents-worth-it","sections":[],"depth":2},{"title":"Question 2: How do parent agents share context with subagents?","local":"question-2-how-do-parent-agents-share-context-with-subagents","sections":[],"depth":2},{"title":"Question 3: How should you design for subagent failure?","local":"question-3-how-should-you-design-for-subagent-failure","sections":[],"depth":2},{"title":"Question 4: How do Claude Code and Codex expose subagents?","local":"question-4-how-do-claude-code-and-codex-expose-subagents","sections":[],"depth":2},{"title":"Question 5: What built-in agent types does Codex provide?","local":"question-5-what-built-in-agent-types-does-codex-provide","sections":[],"depth":2},{"title":"Summary","local":"summary","sections":[],"depth":2},{"title":"Key Takeaways","local":"key-takeaways","sections":[],"depth":2},{"title":"Next Steps","local":"next-steps","sections":[],"depth":2}],"depth":1}';function Qe(pe){return be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ue extends ye{constructor(f){super(),Ce(this,f,Qe,_e,xe,{})}}export{Ue as component};

Xet Storage Details

Size:
11.4 kB
·
Xet hash:
6132acdb5cd88f27ab7eacfa0f6d0be95dadd7991439e4c0959b1716d1807a08

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.