import{s as pe,f as ce,n as he,o as ge}from"../chunks/scheduler.889ebb13.js";import{S as de,i as we,g as s,s as l,r as R,A as ve,h as o,f as n,c as a,j as ue,u as X,x as r,k as J,y as xe,a as i,v as K,d as N,t as Q,w as V}from"../chunks/index.ca18042b.js";import{H as Y}from"../chunks/Heading.3daa581c.js";import{E as $e}from"../chunks/EditOnGithub.2e95618d.js";function Le(Z){let m,M,y,T,f,A,u,ee,H,p,te="Welcome to this second unit, where <strong>we’ll explore different agentic frameworks</strong> that can be used to build powerful agentic applications.",P,c,ne="We will study:",U,h,ie='<li>In Unit 2.1: <a href="https://huggingface.co/docs/smolagents/en/index" rel="nofollow">smolagents</a></li> <li>In Unit 2.2: <a href="https://www.llamaindex.ai/" rel="nofollow">LlamaIndex</a></li> <li>In Unit 2.3: <a href="https://www.langchain.com/langgraph" rel="nofollow">LangGraph</a></li>',F,g,le="Let’s dive in! 🕵",I,d,E,w,ae="An agentic framework is <strong>not always needed when building an application around LLMs</strong>. They provide flexibility in the workflow to efficiently solve a specific task, but they’re not always necessary.",j,v,se="Sometimes, <strong>predefined workflows are sufficient</strong> to fulfill user requests, and there is no real need for an agentic framework. If the approach to build an agent is simple, like a chain of prompts, using plain code may be enough. The advantage is that the developer will have <strong>full control and understanding of their system without abstractions</strong>.",q,x,oe="However, when the workflow becomes more complex, such as letting an LLM call functions or using multiple agents, these abstractions start to become helpful.",S,$,re="Considering these ideas, we can already identify the need for some features:",W,L,me=`<li>An <em>LLM engine</em> that powers the system.</li> <li>A <em>list of tools</em> the agent can access.</li> <li>A <em>parser</em> for extracting tool calls from the LLM output.</li> <li>A <em>system prompt</em> synced with the parser.</li> <li>A <em>memory system</em>.</li> <li><em>Error logging and retry mechanisms</em> to control LLM mistakes.
We’ll explore how these topics are resolved in various frameworks, including <code>smolagents</code>, <code>LlamaIndex</code>, and <code>LangGraph</code>.</li>`,G,k,z,_,fe='<thead><tr><th>Framework</th> <th>Description</th> <th>Unit Author</th></tr></thead> <tbody><tr><td><a href="./smolagents/introduction">smolagents</a></td> <td>Agents framework developed by Hugging Face.</td> <td>Sergio Paniego - <a href="https://huggingface.co/sergiopaniego" rel="nofollow">HF</a> - <a href="https://x.com/sergiopaniego" rel="nofollow">X</a> - <a href="https://www.linkedin.com/in/sergio-paniego-blanco" rel="nofollow">Linkedin</a></td></tr></tbody>',B,b,D,C,O;return f=new Y({props:{title:"Introduction to Agentic Frameworks",local:"introduction-to-agentic-frameworks",headingTag:"h1"}}),d=new Y({props:{title:"When to Use an Agentic Framework",local:"when-to-use-an-agentic-framework",headingTag:"h2"}}),k=new Y({props:{title:"Agentic Frameworks Units",local:"agentic-frameworks-units",headingTag:"h2"}}),b=new $e({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/en/unit2/introduction.mdx"}}),{c(){m=s("meta"),M=l(),y=s("p"),T=l(),R(f.$$.fragment),A=l(),u=s("img"),H=l(),p=s("p"),p.innerHTML=te,P=l(),c=s("p"),c.textContent=ne,U=l(),h=s("ul"),h.innerHTML=ie,F=l(),g=s("p"),g.textContent=le,I=l(),R(d.$$.fragment),E=l(),w=s("p"),w.innerHTML=ae,j=l(),v=s("p"),v.innerHTML=se,q=l(),x=s("p"),x.textContent=oe,S=l(),$=s("p"),$.textContent=re,W=l(),L=s("ul"),L.innerHTML=me,G=l(),R(k.$$.fragment),z=l(),_=s("table"),_.innerHTML=fe,B=l(),R(b.$$.fragment),D=l(),C=s("p"),this.h()},l(e){const t=ve("svelte-u9bgzb",document.head);m=o(t,"META",{name:!0,content:!0}),t.forEach(n),M=a(e),y=o(e,"P",{}),ue(y).forEach(n),T=a(e),X(f.$$.fragment,e),A=a(e),u=o(e,"IMG",{src:!0,alt:!0}),H=a(e),p=o(e,"P",{"data-svelte-h":!0}),r(p)!=="svelte-hlqese"&&(p.innerHTML=te),P=a(e),c=o(e,"P",{"data-svelte-h":!0}),r(c)!=="svelte-5kufvb"&&(c.textContent=ne),U=a(e),h=o(e,"UL",{"data-svelte-h":!0}),r(h)!=="svelte-1l0szbw"&&(h.innerHTML=ie),F=a(e),g=o(e,"P",{"data-svelte-h":!0}),r(g)!=="svelte-1r1x28z"&&(g.textContent=le),I=a(e),X(d.$$.fragment,e),E=a(e),w=o(e,"P",{"data-svelte-h":!0}),r(w)!=="svelte-mk5673"&&(w.innerHTML=ae),j=a(e),v=o(e,"P",{"data-svelte-h":!0}),r(v)!=="svelte-1xx3jm"&&(v.innerHTML=se),q=a(e),x=o(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-1ew78qv"&&(x.textContent=oe),S=a(e),$=o(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-tt5p1j"&&($.textContent=re),W=a(e),L=o(e,"UL",{"data-svelte-h":!0}),r(L)!=="svelte-5jk7f0"&&(L.innerHTML=me),G=a(e),X(k.$$.fragment,e),z=a(e),_=o(e,"TABLE",{"data-svelte-h":!0}),r(_)!=="svelte-1l1tw5j"&&(_.innerHTML=fe),B=a(e),X(b.$$.fragment,e),D=a(e),C=o(e,"P",{}),ue(C).forEach(n),this.h()},h(){J(m,"name","hf:doc:metadata"),J(m,"content",ke),ce(u.src,ee="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/thumbnail.jpg")||J(u,"src",ee),J(u,"alt","Thumbnail")},m(e,t){xe(document.head,m),i(e,M,t),i(e,y,t),i(e,T,t),K(f,e,t),i(e,A,t),i(e,u,t),i(e,H,t),i(e,p,t),i(e,P,t),i(e,c,t),i(e,U,t),i(e,h,t),i(e,F,t),i(e,g,t),i(e,I,t),K(d,e,t),i(e,E,t),i(e,w,t),i(e,j,t),i(e,v,t),i(e,q,t),i(e,x,t),i(e,S,t),i(e,$,t),i(e,W,t),i(e,L,t),i(e,G,t),K(k,e,t),i(e,z,t),i(e,_,t),i(e,B,t),K(b,e,t),i(e,D,t),i(e,C,t),O=!0},p:he,i(e){O||(N(f.$$.fragment,e),N(d.$$.fragment,e),N(k.$$.fragment,e),N(b.$$.fragment,e),O=!0)},o(e){Q(f.$$.fragment,e),Q(d.$$.fragment,e),Q(k.$$.fragment,e),Q(b.$$.fragment,e),O=!1},d(e){e&&(n(M),n(y),n(T),n(A),n(u),n(H),n(p),n(P),n(c),n(U),n(h),n(F),n(g),n(I),n(E),n(w),n(j),n(v),n(q),n(x),n(S),n($),n(W),n(L),n(G),n(z),n(_),n(B),n(D),n(C)),n(m),V(f,e),V(d,e),V(k,e),V(b,e)}}}const ke='{"title":"Introduction to Agentic Frameworks","local":"introduction-to-agentic-frameworks","sections":[{"title":"When to Use an Agentic Framework","local":"when-to-use-an-agentic-framework","sections":[],"depth":2},{"title":"Agentic Frameworks Units","local":"agentic-frameworks-units","sections":[],"depth":2}],"depth":1}';function _e(Z){return ge(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Te extends de{constructor(m){super(),we(this,m,_e,Le,pe,{})}}export{Te as component};
