import{s as Re,n as ze,o as Se}from"../chunks/scheduler.f6319a2a.js";import{S as Ye,i as He,g as p,s as n,r as o,A as xe,h as M,f as s,c as a,j as Ge,u as y,x as m,k as Qe,y as Fe,a as t,v as i,d as c,t as b,w}from"../chunks/index.85aa684c.js";import{C as S}from"../chunks/CodeBlock.3400fc53.js";import{D as Le}from"../chunks/DocNotebookDropdown.3fc3604b.js";import{H as de,E as Pe}from"../chunks/getInferenceSnippets.0233181f.js";function qe(Ce){let r,x,Y,F,J,L,T,P,j,ge="归根结底，Agent可以定义为由几个简单组件构成：它拥有工具、提示词。最重要的是，它具备对过往步骤的记忆，能够追溯完整的规划、执行和错误历史。",q,U,D,h,fe="我们提供了多项功能来审查Agent的过往运行记录。",K,u,Ie='您可以通过插装（instrumentation）在可视化界面中查看Agent的运行过程，该界面支持对特定步骤进行缩放操作，具体方法参见<a href="./inspect_runs">插装指南</a>。',O,d,Ze="您也可以使用<code>agent.replay()</code>方法实现回放：",ee,C,Be="当Agent完成运行后：",le,g,se,f,ve="若要回放最近一次运行，只需使用：",te,I,ne,Z,ae,B,Ve="许多高级应用场景需要对Agent的记忆进行动态修改。",pe,v,_e="您可以通过以下方式访问Agent的记忆：",Me,V,me,_,Ne="使用<code>agent.memory.get_full_steps()</code>可获取完整步骤字典数据。",oe,N,ke="您还可以通过步骤回调（step callbacks）实现记忆的动态修改。",ye,k,We="步骤回调函数可通过参数直接访问<code>agent</code>对象，因此能够访问所有记忆步骤并根据需要进行修改。例如，假设您正在监控网页浏览Agent每个步骤的屏幕截图，希望保留最新截图同时删除旧步骤的图片以节省token消耗。",ie,W,Xe=`可参考以下代码示例：
<em>注：此代码片段不完整，部分导入语句和对象定义已精简，完整代码请访问<a href="https://github.com/huggingface/smolagents/blob/main/src/smolagents/vision_web_browser.py" rel="nofollow">原始脚本</a></em>`,ce,X,be,A,Ae="最后在初始化Agent时，将此函数传入<code>step_callbacks</code>参数：",we,E,re,$,Ee='请访问我们的 <a href="https://github.com/huggingface/smolagents/blob/main/src/smolagents/vision_web_browser.py" rel="nofollow">vision web browser code</a> 查看完整可运行示例。',Je,G,Te,Q,$e="当您需要处理耗时数天的工具调用时，这种方式特别有用：您可以逐步执行Agents。这还允许您在每一步更新记忆。",je,R,Ue,z,he,H,ue;return J=new de({props:{title:"📚 管理Agent的记忆",local:"-管理agent的记忆",headingTag:"h1"}}),T=new Le({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/memory.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/pytorch/memory.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/tensorflow/memory.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/memory.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/pytorch/memory.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/tensorflow/memory.ipynb"}]}}),U=new de({props:{title:"回放Agent的记忆",local:"回放agent的记忆",headingTag:"h3"}}),g=new S({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyQyUyMENvZGVBZ2VudCUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0RJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTJDJTIwdmVyYm9zaXR5X2xldmVsJTNEMCklMEElMEFyZXN1bHQlMjAlM0QlMjBhZ2VudC5ydW4oJTIyV2hhdCdzJTIwdGhlJTIwMjB0aCUyMEZpYm9uYWNjaSUyMG51bWJlciUzRiUyMik=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> InferenceClientModel, CodeAgent

agent = CodeAgent(tools=[], model=InferenceClientModel(), verbosity_level=<span class="hljs-number">0</span>)

result = agent.run(<span class="hljs-string">&quot;What&#x27;s the 20th Fibonacci number?&quot;</span>)`,wrap:!1}}),I=new S({props:{code:"YWdlbnQucmVwbGF5KCk=",highlighted:"agent.replay()",wrap:!1}}),Z=new de({props:{title:"动态修改Agent的记忆",local:"动态修改agent的记忆",headingTag:"h3"}}),V=new S({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBBY3Rpb25TdGVwJTBBJTBBc3lzdGVtX3Byb21wdF9zdGVwJTIwJTNEJTIwYWdlbnQubWVtb3J5LnN5c3RlbV9wcm9tcHQlMEFwcmludCglMjJUaGUlMjBzeXN0ZW0lMjBwcm9tcHQlMjBnaXZlbiUyMHRvJTIwdGhlJTIwYWdlbnQlMjB3YXMlM0ElMjIpJTBBcHJpbnQoc3lzdGVtX3Byb21wdF9zdGVwLnN5c3RlbV9wcm9tcHQpJTBBJTBBdGFza19zdGVwJTIwJTNEJTIwYWdlbnQubWVtb3J5LnN0ZXBzJTVCMCU1RCUwQXByaW50KCUyMiU1Q24lNUNuVGhlJTIwZmlyc3QlMjB0YXNrJTIwc3RlcCUyMHdhcyUzQSUyMiklMEFwcmludCh0YXNrX3N0ZXAudGFzayklMEElMEFmb3IlMjBzdGVwJTIwaW4lMjBhZ2VudC5tZW1vcnkuc3RlcHMlM0ElMEElMjAlMjAlMjAlMjBpZiUyMGlzaW5zdGFuY2Uoc3RlcCUyQyUyMEFjdGlvblN0ZXApJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaWYlMjBzdGVwLmVycm9yJTIwaXMlMjBub3QlMjBOb25lJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJpbnQoZiUyMiU1Q25TdGVwJTIwJTdCc3RlcC5zdGVwX251bWJlciU3RCUyMGdvdCUyMHRoaXMlMjBlcnJvciUzQSU1Q24lN0JzdGVwLmVycm9yJTdEJTVDbiUyMiklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbHNlJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJpbnQoZiUyMiU1Q25TdGVwJTIwJTdCc3RlcC5zdGVwX251bWJlciU3RCUyMGdvdCUyMHRoZXNlJTIwb2JzZXJ2YXRpb25zJTNBJTVDbiU3QnN0ZXAub2JzZXJ2YXRpb25zJTdEJTVDbiUyMik=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> ActionStep

system_prompt_step = agent.memory.system_prompt
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;The system prompt given to the agent was:&quot;</span>)
<span class="hljs-built_in">print</span>(system_prompt_step.system_prompt)

task_step = agent.memory.steps[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;\\n\\nThe first task step was:&quot;</span>)
<span class="hljs-built_in">print</span>(task_step.task)

<span class="hljs-keyword">for</span> step <span class="hljs-keyword">in</span> agent.memory.steps:
    <span class="hljs-keyword">if</span> <span class="hljs-built_in">isinstance</span>(step, ActionStep):
        <span class="hljs-keyword">if</span> step.error <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
            <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;\\nStep <span class="hljs-subst">{step.step_number}</span> got this error:\\n<span class="hljs-subst">{step.error}</span>\\n&quot;</span>)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;\\nStep <span class="hljs-subst">{step.step_number}</span> got these observations:\\n<span class="hljs-subst">{step.observations}</span>\\n&quot;</span>)`,wrap:!1}}),X=new S({props:{code:"aW1wb3J0JTIwaGVsaXVtJTBBZnJvbSUyMFBJTCUyMGltcG9ydCU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yME5vbmUlMEElMjAlMjAlMjAlMjBwbmdfYnl0ZXMlMjAlM0QlMjBkcml2ZXIuZ2V0X3NjcmVlbnNob3RfYXNfcG5nKCklMEElMjAlMjAlMjAlMjBpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4oQnl0ZXNJTyhwbmdfYnl0ZXMpKSUwQSUyMCUyMCUyMCUyMG1lbW9yeV9zdGVwLm9ic2VydmF0aW9uc19pbWFnZXMlMjAlM0QlMjAlNUJpbWFnZS5jb3B5KCklNUQ=",highlighted:`<span class="hljs-keyword">import</span> helium
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO
<span class="hljs-keyword">from</span> time <span class="hljs-keyword">import</span> sleep

<span class="hljs-keyword">def</span> <span class="hljs-title function_">update_screenshot</span>(<span class="hljs-params">memory_step: ActionStep, agent: CodeAgent</span>) -&gt; <span class="hljs-literal">None</span>:
    sleep(<span class="hljs-number">1.0</span>)  <span class="hljs-comment"># Let JavaScript animations happen before taking the screenshot</span>
    driver = helium.get_driver()
    latest_step = memory_step.step_number
    <span class="hljs-keyword">for</span> previous_memory_step <span class="hljs-keyword">in</span> agent.memory.steps:  <span class="hljs-comment"># Remove previous screenshots from logs for lean processing</span>
        <span class="hljs-keyword">if</span> <span class="hljs-built_in">isinstance</span>(previous_memory_step, ActionStep) <span class="hljs-keyword">and</span> previous_memory_step.step_number &lt;= latest_step - <span class="hljs-number">2</span>:
            previous_memory_step.observations_images = <span class="hljs-literal">None</span>
    png_bytes = driver.get_screenshot_as_png()
    image = Image.<span class="hljs-built_in">open</span>(BytesIO(png_bytes))
    memory_step.observations_images = [image.copy()]`,wrap:!1}}),E=new S({props:{code:"Q29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCV2ViU2VhcmNoVG9vbCgpJTJDJTIwZ29fYmFjayUyQyUyMGNsb3NlX3BvcHVwcyUyQyUyMHNlYXJjaF9pdGVtX2N0cmxfZiU1RCUyQyUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhZGRpdGlvbmFsX2F1dGhvcml6ZWRfaW1wb3J0cyUzRCU1QiUyMmhlbGl1bSUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHN0ZXBfY2FsbGJhY2tzJTNEJTVCdXBkYXRlX3NjcmVlbnNob3QlNUQlMkMlMEElMjAlMjAlMjAlMjBtYXhfc3RlcHMlM0QyMCUyQyUwQSUyMCUyMCUyMCUyMHZlcmJvc2l0eV9sZXZlbCUzRDIlMkMlMEEp",highlighted:`CodeAgent(
    tools=[WebSearchTool(), go_back, close_popups, search_item_ctrl_f],
    model=model,
    additional_authorized_imports=[<span class="hljs-string">&quot;helium&quot;</span>],
    step_callbacks=[update_screenshot],
    max_steps=<span class="hljs-number">20</span>,
    verbosity_level=<span class="hljs-number">2</span>,
)`,wrap:!1}}),G=new de({props:{title:"分步运行 Agents",local:"分步运行-agents",headingTag:"h3"}}),R=new S({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyQyUyMENvZGVBZ2VudCUyQyUyMEFjdGlvblN0ZXAlMkMlMjBUYXNrU3RlcCUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0RJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTJDJTIwdmVyYm9zaXR5X2xldmVsJTNEMSklMEFwcmludChhZ2VudC5tZW1vcnkuc3lzdGVtX3Byb21wdCklMEElMEF0YXNrJTIwJTNEJTIwJTIyV2hhdCUyMGlzJTIwdGhlJTIwMjB0aCUyMEZpYm9uYWNjaSUyMG51bWJlciUzRiUyMiUwQSUwQSUyMyUyMFlvdSUyMGNvdWxkJTIwbW9kaWZ5JTIwdGhlJTIwbWVtb3J5JTIwYXMlMjBuZWV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9yeSUyMGFzJTIweW91JTIwcGxlYXNlISUwQSUyMCUyMCUyMCUyMCUyMyUyMEZvciUyMGluc3RhbmNlJTIwdG8lMjB1cGRhdGUlMjB0aGUlMjBsYXRlc3QlMjBzdGVwJTNBJTBBJTIwJTIwJTIwJTIwJTIzJTIwYWdlbnQubWVtb3J5LnN0ZXBzJTVCLTElNUQlMjAlM0QlMjAuLi4lMEElMEFwcmludCglMjJUaGUlMjBmaW5hbCUyMGFuc3dlciUyMGlzJTNBJTIyJTJDJTIwZmluYWxfYW5zd2VyKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> InferenceClientModel, CodeAgent, ActionStep, TaskStep

agent = CodeAgent(tools=[], model=InferenceClientModel(), verbosity_level=<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(agent.memory.system_prompt)

task = <span class="hljs-string">&quot;What is the 20th Fibonacci number?&quot;</span>

<span class="hljs-comment"># You could modify the memory as needed here by inputting the memory of another agent.</span>
<span class="hljs-comment"># agent.memory.steps = previous_agent.memory.steps</span>

<span class="hljs-comment"># Let&#x27;s start a new task!</span>
agent.memory.steps.append(TaskStep(task=task, task_images=[]))

final_answer = <span class="hljs-literal">None</span>
step_number = <span class="hljs-number">1</span>
<span class="hljs-keyword">while</span> final_answer <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">and</span> step_number &lt;= <span class="hljs-number">10</span>:
    memory_step = ActionStep(
        step_number=step_number,
        observations_images=[],
    )
    <span class="hljs-comment"># Run one step.</span>
    final_answer = agent.step(memory_step)
    agent.memory.steps.append(memory_step)
    step_number += <span class="hljs-number">1</span>

    <span class="hljs-comment"># Change the memory as you please!</span>
    <span class="hljs-comment"># For instance to update the latest step:</span>
    <span class="hljs-comment"># agent.memory.steps[-1] = ...</span>

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;The final answer is:&quot;</span>, final_answer)`,wrap:!1}}),z=new Pe({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/zh/tutorials/memory.md"}}),{c(){r=p("meta"),x=n(),Y=p("p"),F=n(),o(J.$$.fragment),L=n(),o(T.$$.fragment),P=n(),j=p("p"),j.textContent=ge,q=n(),o(U.$$.fragment),D=n(),h=p("p"),h.textContent=fe,K=n(),u=p("p"),u.innerHTML=Ie,O=n(),d=p("p"),d.innerHTML=Ze,ee=n(),C=p("p"),C.textContent=Be,le=n(),o(g.$$.fragment),se=n(),f=p("p"),f.textContent=ve,te=n(),o(I.$$.fragment),ne=n(),o(Z.$$.fragment),ae=n(),B=p("p"),B.textContent=Ve,pe=n(),v=p("p"),v.textContent=_e,Me=n(),o(V.$$.fragment),me=n(),_=p("p"),_.innerHTML=Ne,oe=n(),N=p("p"),N.textContent=ke,ye=n(),k=p("p"),k.innerHTML=We,ie=n(),W=p("p"),W.innerHTML=Xe,ce=n(),o(X.$$.fragment),be=n(),A=p("p"),A.innerHTML=Ae,we=n(),o(E.$$.fragment),re=n(),$=p("p"),$.innerHTML=Ee,Je=n(),o(G.$$.fragment),Te=n(),Q=p("p"),Q.textContent=$e,je=n(),o(R.$$.fragment),Ue=n(),o(z.$$.fragment),he=n(),H=p("p"),this.h()},l(e){const l=xe("svelte-u9bgzb",document.head);r=M(l,"META",{name:!0,content:!0}),l.forEach(s),x=a(e),Y=M(e,"P",{}),Ge(Y).forEach(s),F=a(e),y(J.$$.fragment,e),L=a(e),y(T.$$.fragment,e),P=a(e),j=M(e,"P",{"data-svelte-h":!0}),m(j)!=="svelte-p98u1b"&&(j.textContent=ge),q=a(e),y(U.$$.fragment,e),D=a(e),h=M(e,"P",{"data-svelte-h":!0}),m(h)!=="svelte-l1831j"&&(h.textContent=fe),K=a(e),u=M(e,"P",{"data-svelte-h":!0}),m(u)!=="svelte-1oxmy0k"&&(u.innerHTML=Ie),O=a(e),d=M(e,"P",{"data-svelte-h":!0}),m(d)!=="svelte-1psx7xq"&&(d.innerHTML=Ze),ee=a(e),C=M(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-18l9ooq"&&(C.textContent=Be),le=a(e),y(g.$$.fragment,e),se=a(e),f=M(e,"P",{"data-svelte-h":!0}),m(f)!=="svelte-1x8nag9"&&(f.textContent=ve),te=a(e),y(I.$$.fragment,e),ne=a(e),y(Z.$$.fragment,e),ae=a(e),B=M(e,"P",{"data-svelte-h":!0}),m(B)!=="svelte-tfmp24"&&(B.textContent=Ve),pe=a(e),v=M(e,"P",{"data-svelte-h":!0}),m(v)!=="svelte-1daasal"&&(v.textContent=_e),Me=a(e),y(V.$$.fragment,e),me=a(e),_=M(e,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1rvy0xd"&&(_.innerHTML=Ne),oe=a(e),N=M(e,"P",{"data-svelte-h":!0}),m(N)!=="svelte-1pthyy4"&&(N.textContent=ke),ye=a(e),k=M(e,"P",{"data-svelte-h":!0}),m(k)!=="svelte-aqg9g7"&&(k.innerHTML=We),ie=a(e),W=M(e,"P",{"data-svelte-h":!0}),m(W)!=="svelte-1nqqfaj"&&(W.innerHTML=Xe),ce=a(e),y(X.$$.fragment,e),be=a(e),A=M(e,"P",{"data-svelte-h":!0}),m(A)!=="svelte-1k5kj85"&&(A.innerHTML=Ae),we=a(e),y(E.$$.fragment,e),re=a(e),$=M(e,"P",{"data-svelte-h":!0}),m($)!=="svelte-eotga2"&&($.innerHTML=Ee),Je=a(e),y(G.$$.fragment,e),Te=a(e),Q=M(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-1gt6hke"&&(Q.textContent=$e),je=a(e),y(R.$$.fragment,e),Ue=a(e),y(z.$$.fragment,e),he=a(e),H=M(e,"P",{}),Ge(H).forEach(s),this.h()},h(){Qe(r,"name","hf:doc:metadata"),Qe(r,"content",De)},m(e,l){Fe(document.head,r),t(e,x,l),t(e,Y,l),t(e,F,l),i(J,e,l),t(e,L,l),i(T,e,l),t(e,P,l),t(e,j,l),t(e,q,l),i(U,e,l),t(e,D,l),t(e,h,l),t(e,K,l),t(e,u,l),t(e,O,l),t(e,d,l),t(e,ee,l),t(e,C,l),t(e,le,l),i(g,e,l),t(e,se,l),t(e,f,l),t(e,te,l),i(I,e,l),t(e,ne,l),i(Z,e,l),t(e,ae,l),t(e,B,l),t(e,pe,l),t(e,v,l),t(e,Me,l),i(V,e,l),t(e,me,l),t(e,_,l),t(e,oe,l),t(e,N,l),t(e,ye,l),t(e,k,l),t(e,ie,l),t(e,W,l),t(e,ce,l),i(X,e,l),t(e,be,l),t(e,A,l),t(e,we,l),i(E,e,l),t(e,re,l),t(e,$,l),t(e,Je,l),i(G,e,l),t(e,Te,l),t(e,Q,l),t(e,je,l),i(R,e,l),t(e,Ue,l),i(z,e,l),t(e,he,l),t(e,H,l),ue=!0},p:ze,i(e){ue||(c(J.$$.fragment,e),c(T.$$.fragment,e),c(U.$$.fragment,e),c(g.$$.fragment,e),c(I.$$.fragment,e),c(Z.$$.fragment,e),c(V.$$.fragment,e),c(X.$$.fragment,e),c(E.$$.fragment,e),c(G.$$.fragment,e),c(R.$$.fragment,e),c(z.$$.fragment,e),ue=!0)},o(e){b(J.$$.fragment,e),b(T.$$.fragment,e),b(U.$$.fragment,e),b(g.$$.fragment,e),b(I.$$.fragment,e),b(Z.$$.fragment,e),b(V.$$.fragment,e),b(X.$$.fragment,e),b(E.$$.fragment,e),b(G.$$.fragment,e),b(R.$$.fragment,e),b(z.$$.fragment,e),ue=!1},d(e){e&&(s(x),s(Y),s(F),s(L),s(P),s(j),s(q),s(D),s(h),s(K),s(u),s(O),s(d),s(ee),s(C),s(le),s(se),s(f),s(te),s(ne),s(ae),s(B),s(pe),s(v),s(Me),s(me),s(_),s(oe),s(N),s(ye),s(k),s(ie),s(W),s(ce),s(be),s(A),s(we),s(re),s($),s(Je),s(Te),s(Q),s(je),s(Ue),s(he),s(H)),s(r),w(J,e),w(T,e),w(U,e),w(g,e),w(I,e),w(Z,e),w(V,e),w(X,e),w(E,e),w(G,e),w(R,e),w(z,e)}}}const De='{"title":"📚 管理Agent的记忆","local":"-管理agent的记忆","sections":[{"title":"回放Agent的记忆","local":"回放agent的记忆","sections":[],"depth":3},{"title":"动态修改Agent的记忆","local":"动态修改agent的记忆","sections":[],"depth":3},{"title":"分步运行 Agents","local":"分步运行-agents","sections":[],"depth":3}],"depth":1}';function Ke(Ce){return Se(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class nl extends Ye{constructor(r){super(),He(this,r,Ke,qe,Re,{})}}export{nl as component};
