import{s as xe,n as Se,o as Ye}from"../chunks/scheduler.00b97157.js";import{S as He,i as Fe,e as p,s as n,c as o,h as Le,a as M,d as t,b as a,f as Re,g as i,j as m,k as ze,l as Pe,m as s,n as y,t as c,o as b,p as r}from"../chunks/index.a7c1a7a1.js";import{C as qe,H as fe,E as De}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4b5f77d2.js";import{C as S}from"../chunks/CodeBlock.7a3aa7b0.js";import{D as Ke}from"../chunks/DocNotebookDropdown.be7b60e3.js";function Oe(ge){let w,F,Y,L,J,P,T,q,j,D,U,Ie="归根结底，Agent可以定义为由几个简单组件构成：它拥有工具、提示词。最重要的是，它具备对过往步骤的记忆，能够追溯完整的规划、执行和错误历史。",K,u,O,h,Ze="我们提供了多项功能来审查Agent的过往运行记录。",ee,d,Be='您可以通过插装（instrumentation）在可视化界面中查看Agent的运行过程，该界面支持对特定步骤进行缩放操作，具体方法参见<a href="./inspect_runs">插装指南</a>。',le,C,ve="您也可以使用<code>agent.replay()</code>方法实现回放：",te,f,Ve="当Agent完成运行后：",se,g,ne,I,_e="若要回放最近一次运行，只需使用：",ae,Z,pe,B,Me,v,Ne="许多高级应用场景需要对Agent的记忆进行动态修改。",me,V,ke="您可以通过以下方式访问Agent的记忆：",oe,_,ie,N,We="使用<code>agent.memory.get_full_steps()</code>可获取完整步骤字典数据。",ye,k,$e="您还可以通过步骤回调（step callbacks）实现记忆的动态修改。",ce,W,Xe="步骤回调函数可通过参数直接访问<code>agent</code>对象，因此能够访问所有记忆步骤并根据需要进行修改。例如，假设您正在监控网页浏览Agent每个步骤的屏幕截图，希望保留最新截图同时删除旧步骤的图片以节省token消耗。",be,$,Ee=`可参考以下代码示例：
<em>注：此代码片段不完整，部分导入语句和对象定义已精简，完整代码请访问<a href="https://github.com/huggingface/smolagents/blob/main/src/smolagents/vision_web_browser.py" rel="nofollow">原始脚本</a></em>`,re,X,we,E,Ae="最后在初始化Agent时，将此函数传入<code>step_callbacks</code>参数：",Je,A,Te,G,Ge='请访问我们的 <a href="https://github.com/huggingface/smolagents/blob/main/src/smolagents/vision_web_browser.py" rel="nofollow">vision web browser code</a> 查看完整可运行示例。',je,Q,Ue,R,Qe="当您需要处理耗时数天的工具调用时，这种方式特别有用：您可以逐步执行Agents。这还允许您在每一步更新记忆。",ue,z,he,x,de,H,Ce;return J=new qe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),T=new Ke({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;",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"}]}}),j=new fe({props:{title:"📚 管理Agent的记忆",local:"-管理agent的记忆",headingTag:"h1"}}),u=new fe({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}}),Z=new S({props:{code:"YWdlbnQucmVwbGF5KCk=",highlighted:"agent.replay()",wrap:!1}}),B=new fe({props:{title:"动态修改Agent的记忆",local:"动态修改agent的记忆",headingTag:"h3"}}),_=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>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BJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJldmlvdXNfbWVtb3J5X3N0ZXAub2JzZXJ2YXRpb25zX2ltYWdlcyUyMCUzRCUyME5vbmUlMEElMjAlMjAlMjAlMjBwbmdfYnl0ZXMlMjAlM0QlMjBkcml2ZXIuZ2V0X3NjcmVlbnNob3RfYXNfcG5nKCklMEElMjAlMjAlMjAlMjBpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4oQnl0ZXNJTyhwbmdfYnl0ZXMpKSUwQSUyMCUyMCUyMCUyMG1lbW9yeV9zdGVwLm9ic2VydmF0aW9uc19pbWFnZXMlMjAlM0QlMjAlNUJpbWFnZS5jb3B5KCklNUQ=",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}}),A=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}}),Q=new fe({props:{title:"分步运行 Agents",local:"分步运行-agents",headingTag:"h3"}}),z=new S({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyQyUyMENvZGVBZ2VudCUyQyUyMEFjdGlvblN0ZXAlMkMlMjBUYXNrU3RlcCUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KHRvb2xzJTNEJTVCJTVEJTJDJTIwbW9kZWwlM0RJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTJDJTIwdmVyYm9zaXR5X2xldmVsJTNEMSklMEFwcmludChhZ2VudC5tZW1vcnkuc3lzdGVtX3Byb21wdCklMEElMEF0YXNrJTIwJTNEJTIwJTIyV2hhdCUyMGlzJTIwdGhlJTIwMjB0a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GVwKSUwQSUyMCUyMCUyMCUyMHN0ZXBfbnVtYmVyJTIwJTJCJTNEJTIwMSUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMENoYW5nZSUyMHRoZSUyMG1lbW9yeSUyMGFzJTIweW91JTIwcGxlYXNlISUwQSUyMCUyMCUyMCUyMCUyMyUyMEZvciUyMGluc3RhbmNlJTIwdG8lMjB1cGRhdGUlMjB0aGUlMjBsYXRlc3QlMjBzdGVwJTNBJTBBJTIwJTIwJTIwJTIwJTIzJTIwYWdlbnQubWVtb3J5LnN0ZXBzJTVCLTElNUQlMjAlM0QlMjAuLi4lMEElMEFwcmludCglMjJUaGUlMjBmaW5hbCUyMGFuc3dlciUyMGlzJTNBJTIyJTJDJTIwZmluYWxfYW5zd2VyKQ==",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}}),x=new De({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/zh/tutorials/memory.md"}}),{c(){w=p("meta"),F=n(),Y=p("p"),L=n(),o(J.$$.fragment),P=n(),o(T.$$.fragment),q=n(),o(j.$$.fragment),D=n(),U=p("p"),U.textContent=Ie,K=n(),o(u.$$.fragment),O=n(),h=p("p"),h.textContent=Ze,ee=n(),d=p("p"),d.innerHTML=Be,le=n(),C=p("p"),C.innerHTML=ve,te=n(),f=p("p"),f.textContent=Ve,se=n(),o(g.$$.fragment),ne=n(),I=p("p"),I.textContent=_e,ae=n(),o(Z.$$.fragment),pe=n(),o(B.$$.fragment),Me=n(),v=p("p"),v.textContent=Ne,me=n(),V=p("p"),V.textContent=ke,oe=n(),o(_.$$.fragment),ie=n(),N=p("p"),N.innerHTML=We,ye=n(),k=p("p"),k.textContent=$e,ce=n(),W=p("p"),W.innerHTML=Xe,be=n(),$=p("p"),$.innerHTML=Ee,re=n(),o(X.$$.fragment),we=n(),E=p("p"),E.innerHTML=Ae,Je=n(),o(A.$$.fragment),Te=n(),G=p("p"),G.innerHTML=Ge,je=n(),o(Q.$$.fragment),Ue=n(),R=p("p"),R.textContent=Qe,ue=n(),o(z.$$.fragment),he=n(),o(x.$$.fragment),de=n(),H=p("p"),this.h()},l(e){const l=Le("svelte-u9bgzb",document.head);w=M(l,"META",{name:!0,content:!0}),l.forEach(t),F=a(e),Y=M(e,"P",{}),Re(Y).forEach(t),L=a(e),i(J.$$.fragment,e),P=a(e),i(T.$$.fragment,e),q=a(e),i(j.$$.fragment,e),D=a(e),U=M(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-p98u1b"&&(U.textContent=Ie),K=a(e),i(u.$$.fragment,e),O=a(e),h=M(e,"P",{"data-svelte-h":!0}),m(h)!=="svelte-l1831j"&&(h.textContent=Ze),ee=a(e),d=M(e,"P",{"data-svelte-h":!0}),m(d)!=="svelte-1oxmy0k"&&(d.innerHTML=Be),le=a(e),C=M(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-1psx7xq"&&(C.innerHTML=ve),te=a(e),f=M(e,"P",{"data-svelte-h":!0}),m(f)!=="svelte-18l9ooq"&&(f.textContent=Ve),se=a(e),i(g.$$.fragment,e),ne=a(e),I=M(e,"P",{"data-svelte-h":!0}),m(I)!=="svelte-1x8nag9"&&(I.textContent=_e),ae=a(e),i(Z.$$.fragment,e),pe=a(e),i(B.$$.fragment,e),Me=a(e),v=M(e,"P",{"data-svelte-h":!0}),m(v)!=="svelte-tfmp24"&&(v.textContent=Ne),me=a(e),V=M(e,"P",{"data-svelte-h":!0}),m(V)!=="svelte-1daasal"&&(V.textContent=ke),oe=a(e),i(_.$$.fragment,e),ie=a(e),N=M(e,"P",{"data-svelte-h":!0}),m(N)!=="svelte-1rvy0xd"&&(N.innerHTML=We),ye=a(e),k=M(e,"P",{"data-svelte-h":!0}),m(k)!=="svelte-1pthyy4"&&(k.textContent=$e),ce=a(e),W=M(e,"P",{"data-svelte-h":!0}),m(W)!=="svelte-aqg9g7"&&(W.innerHTML=Xe),be=a(e),$=M(e,"P",{"data-svelte-h":!0}),m($)!=="svelte-1nqqfaj"&&($.innerHTML=Ee),re=a(e),i(X.$$.fragment,e),we=a(e),E=M(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1k5kj85"&&(E.innerHTML=Ae),Je=a(e),i(A.$$.fragment,e),Te=a(e),G=M(e,"P",{"data-svelte-h":!0}),m(G)!=="svelte-eotga2"&&(G.innerHTML=Ge),je=a(e),i(Q.$$.fragment,e),Ue=a(e),R=M(e,"P",{"data-svelte-h":!0}),m(R)!=="svelte-1gt6hke"&&(R.textContent=Qe),ue=a(e),i(z.$$.fragment,e),he=a(e),i(x.$$.fragment,e),de=a(e),H=M(e,"P",{}),Re(H).forEach(t),this.h()},h(){ze(w,"name","hf:doc:metadata"),ze(w,"content",el)},m(e,l){Pe(document.head,w),s(e,F,l),s(e,Y,l),s(e,L,l),y(J,e,l),s(e,P,l),y(T,e,l),s(e,q,l),y(j,e,l),s(e,D,l),s(e,U,l),s(e,K,l),y(u,e,l),s(e,O,l),s(e,h,l),s(e,ee,l),s(e,d,l),s(e,le,l),s(e,C,l),s(e,te,l),s(e,f,l),s(e,se,l),y(g,e,l),s(e,ne,l),s(e,I,l),s(e,ae,l),y(Z,e,l),s(e,pe,l),y(B,e,l),s(e,Me,l),s(e,v,l),s(e,me,l),s(e,V,l),s(e,oe,l),y(_,e,l),s(e,ie,l),s(e,N,l),s(e,ye,l),s(e,k,l),s(e,ce,l),s(e,W,l),s(e,be,l),s(e,$,l),s(e,re,l),y(X,e,l),s(e,we,l),s(e,E,l),s(e,Je,l),y(A,e,l),s(e,Te,l),s(e,G,l),s(e,je,l),y(Q,e,l),s(e,Ue,l),s(e,R,l),s(e,ue,l),y(z,e,l),s(e,he,l),y(x,e,l),s(e,de,l),s(e,H,l),Ce=!0},p:Se,i(e){Ce||(c(J.$$.fragment,e),c(T.$$.fragment,e),c(j.$$.fragment,e),c(u.$$.fragment,e),c(g.$$.fragment,e),c(Z.$$.fragment,e),c(B.$$.fragment,e),c(_.$$.fragment,e),c(X.$$.fragment,e),c(A.$$.fragment,e),c(Q.$$.fragment,e),c(z.$$.fragment,e),c(x.$$.fragment,e),Ce=!0)},o(e){b(J.$$.fragment,e),b(T.$$.fragment,e),b(j.$$.fragment,e),b(u.$$.fragment,e),b(g.$$.fragment,e),b(Z.$$.fragment,e),b(B.$$.fragment,e),b(_.$$.fragment,e),b(X.$$.fragment,e),b(A.$$.fragment,e),b(Q.$$.fragment,e),b(z.$$.fragment,e),b(x.$$.fragment,e),Ce=!1},d(e){e&&(t(F),t(Y),t(L),t(P),t(q),t(D),t(U),t(K),t(O),t(h),t(ee),t(d),t(le),t(C),t(te),t(f),t(se),t(ne),t(I),t(ae),t(pe),t(Me),t(v),t(me),t(V),t(oe),t(ie),t(N),t(ye),t(k),t(ce),t(W),t(be),t($),t(re),t(we),t(E),t(Je),t(Te),t(G),t(je),t(Ue),t(R),t(ue),t(he),t(de),t(H)),t(w),r(J,e),r(T,e),r(j,e),r(u,e),r(g,e),r(Z,e),r(B,e),r(_,e),r(X,e),r(A,e),r(Q,e),r(z,e),r(x,e)}}}const el='{"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 ll(ge){return Ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ml extends He{constructor(w){super(),Fe(this,w,ll,Oe,xe,{})}}export{Ml as component};
