import{s as kt,f as Gt,o as St,n as _t}from"../chunks/scheduler.f6319a2a.js";import{S as xt,i as Ht,g as i,s,r,A as Qt,h as o,f as l,c as a,j as Vt,u,x as p,k as it,y as Lt,a as n,v as m,d as g,t as T,w as c}from"../chunks/index.85aa684c.js";import{T as Ft}from"../chunks/Tip.3d397a88.js";import{C as b}from"../chunks/CodeBlock.3400fc53.js";import{D as Nt}from"../chunks/DocNotebookDropdown.3fc3604b.js";import{H as d,E as Et}from"../chunks/getInferenceSnippets.743412b2.js";function Rt(Te){let M,y='If you’re new to building agents, make sure to first read the <a href="../conceptual_guides/intro_agents">intro to agents</a> and the <a href="../guided_tour">guided tour of smolagents</a>.';return{c(){M=i("p"),M.innerHTML=y},l(w){M=o(w,"P",{"data-svelte-h":!0}),p(M)!=="svelte-1p1d9vw"&&(M.innerHTML=y)},m(w,ue){n(w,M,ue)},p:_t,d(w){w&&l(M)}}}function At(Te){let M,y,w,ue,J,ce,U,Me,f,we,I,be,j,ot="Agent runs are complicated to debug.",de,$,pt='Validating that a run went properly is hard, since agent workflows are <a href="../conceptual_guides/intro_agents">unpredictable by design</a> (if they were predictable, you’d just be using good old code).',fe,v,rt="And inspecting a run is hard as well: multi-step agents tend to quickly fill a console with logs, and most of the errors are just “LLM dumb” kind of errors, from which the LLM auto-corrects in the next step by writing better code or tool calls.",he,W,ut="So using instrumentation to record agent runs is necessary in production for later inspection and monitoring!",ye,Z,mt='We’ve adopted the <a href="https://opentelemetry.io/" rel="nofollow">OpenTelemetry</a> standard for instrumenting agent runs.',Je,C,gt="This means that you can just run some instrumentation code, then run your agents normally, and everything gets logged into your platform. Below are some examples of how to do this with different OpenTelemetry backends.",Ue,B,Tt="Here’s how it then looks like on the platform:",Ie,h,ct='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/inspect_run_phoenix.gif"/>',je,V,$e,k,Mt='First install the required packages. Here we install <a href="https://github.com/Arize-ai/phoenix" rel="nofollow">Phoenix by Arize AI</a> because that’s a good solution to collect and inspect the logs, but there are other OpenTelemetry-compatible platforms that you could use for this collection &amp; inspection part.',ve,G,We,S,wt="Then run the collector in the background.",Ze,_,Ce,x,bt="Finally, set up <code>SmolagentsInstrumentor</code> to trace your agents and send the traces to Phoenix default endpoint.",Be,H,Ve,Q,dt="Then you can run your agents!",ke,L,Ge,F,ft=`Voilà!
You can then navigate to <code>http://0.0.0.0:6006/projects/</code> to inspect your run!`,Se,me,ht,_e,N,yt="You can see that the CodeAgent called its managed ToolCallingAgent (by the way, the managed agent could have been a CodeAgent as well) to ask it to run the web search for the U.S. 2024 growth rate. Then the managed agent returned its report and the manager agent acted upon it to calculate the economy doubling time! Sweet, isn’t it?",xe,E,He,R,Jt="This part shows how to monitor and debug your Hugging Face <strong>smolagents</strong> with <strong>Langfuse</strong> using the <code>SmolagentsInstrumentor</code>.",Qe,A,Ut='<p><strong>What is Langfuse?</strong> <a href="https://langfuse.com" rel="nofollow">Langfuse</a> is an open-source platform for LLM engineering. It provides tracing and monitoring capabilities for AI agents, helping developers debug, analyze, and optimize their products. Langfuse integrates with various tools and frameworks via native integrations, OpenTelemetry, and SDKs.</p>',Le,z,Fe,Y,Ne,X,Ee,q,It='Set your Langfuse API keys and configure the OpenTelemetry endpoint to send traces to Langfuse. Get your Langfuse API keys by signing up for <a href="https://cloud.langfuse.com" rel="nofollow">Langfuse Cloud</a> or <a href="https://langfuse.com/self-hosting" rel="nofollow">self-hosting Langfuse</a>.',Re,P,jt='Also, add your <a href="https://huggingface.co/settings/tokens" rel="nofollow">Hugging Face token</a> (<code>HF_TOKEN</code>) as an environment variable.',Ae,D,ze,O,$t="With the environment variables set, we can now initialize the Langfuse client. <code>get_client()</code> initializes the Langfuse client using the credentials provided in the environment variables.",Ye,K,Xe,ee,qe,te,vt="Initialize the <code>SmolagentsInstrumentor</code> before your application code.",Pe,le,De,ne,Oe,se,Ke,ae,et,ie,Wt='After running the agent, you can view the traces generated by your smolagents application in <a href="https://cloud.langfuse.com" rel="nofollow">Langfuse</a>. You should see detailed steps of the LLM interactions, which can help you debug and optimize your AI agent.',tt,oe,Zt='<img src="https://langfuse.com/images/cookbook/integration-smolagents/smolagent_example_trace.png" alt="smolagents example trace"/>',lt,pe,Ct='<em><a href="https://cloud.langfuse.com/project/cloramnkj0002jz088vzn1ja4/traces/ce5160f9bfd5a6cd63b07d2bfcec6f54?timestamp=2025-02-11T09%3A25%3A45.163Z&amp;display=details" rel="nofollow">Public example trace in Langfuse</a></em>',nt,re,st,ge,at;return J=new d({props:{title:"Inspecting runs with OpenTelemetry",local:"inspecting-runs-with-opentelemetry",headingTag:"h1"}}),U=new Nt({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/en/inspect_runs.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/inspect_runs.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/inspect_runs.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/inspect_runs.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/inspect_runs.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/inspect_runs.ipynb"}]}}),f=new Ft({props:{warning:!1,$$slots:{default:[Rt]},$$scope:{ctx:Te}}}),I=new d({props:{title:"Why log your agent runs?",local:"why-log-your-agent-runs",headingTag:"h2"}}),V=new d({props:{title:"Setting up telemetry with Arize AI Phoenix",local:"setting-up-telemetry-with-arize-ai-phoenix",headingTag:"h2"}}),G=new b({props:{code:"cGlwJTIwaW5zdGFsbCUyMCdzbW9sYWdlbnRzJTVCdGVsZW1ldHJ5JTJDdG9vbGtpdCU1RCc=",highlighted:"pip install &#x27;smolagents[telemetry,toolkit]&#x27;",wrap:!1}}),_=new b({props:{code:"cHl0aG9uJTIwLW0lMjBwaG9lbml4LnNlcnZlci5tYWluJTIwc2VydmU=",highlighted:"python -m phoenix.server.main serve",wrap:!1}}),H=new b({props:{code:"ZnJvbSUyMHBob2VuaXgub3RlbCUyMGltcG9ydCUyMHJlZ2lzdGVyJTBBZnJvbSUyMG9wZW5pbmZlcmVuY2UuaW5zdHJ1bWVudGF0aW9uLnNtb2xhZ2VudHMlMjBpbXBvcnQlMjBTbW9sYWdlbnRzSW5zdHJ1bWVudG9yJTBBJTBBcmVnaXN0ZXIoKSUwQVNtb2xhZ2VudHNJbnN0cnVtZW50b3IoKS5pbnN0cnVtZW50KCk=",highlighted:`<span class="hljs-keyword">from</span> phoenix.otel <span class="hljs-keyword">import</span> register
<span class="hljs-keyword">from</span> openinference.instrumentation.smolagents <span class="hljs-keyword">import</span> SmolagentsInstrumentor

register()
SmolagentsInstrumentor().instrument()`,wrap:!1}}),L=new b({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjAoJTBBJTIwJTIwJTIwJTIwQ29kZUFnZW50JTJDJTBBJTIwJTIwJTIwJTIwVG9vbENhbGxpbmdBZ2VudCUyQyUwQSUyMCUyMCUyMCUyMFdlYlNlYXJjaFRvb2wlMkMlMEElMjAlMjAlMjAlMjBWaXNpdFdlYnBhZ2VUb29sJTJDJTBBJTIwJTIwJTIwJTIwSW5mZXJlbmNlQ2xpZW50TW9kZWwlMkMlMEEpJTBBJTBBbW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCgpJTBBJTBBc2VhcmNoX2FnZW50JTIwJTNEJTIwVG9vbENhbGxpbmdBZ2VudCglMEElMjAlMjAlMjAlMjB0b29scyUzRCU1QldlYlNlYXJjaFRvb2woKSUyQyUyMFZpc2l0V2VicGFnZVRvb2woKSU1RCUyQyUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBuYW1lJTNEJTIyc2VhcmNoX2FnZW50JTIyJTJDJTBBJTIwJTIwJTIwJTIwZGVzY3JpcHRpb24lM0QlMjJUaGlzJTIwaXMlMjBhbiUyMGFnZW50JTIwdGhhdCUyMGNhbiUyMGRvJTIwd2ViJTIwc2VhcmNoLiUyMiUyQyUwQSklMEElMEFtYW5hZ2VyX2FnZW50JTIwJTNEJTIwQ29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCJTVEJTJDJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMG1hbmFnZWRfYWdlbnRzJTNEJTVCc2VhcmNoX2FnZW50JTVEJTJDJTBBKSUwQW1hbmFnZXJfYWdlbnQucnVuKCUwQSUyMCUyMCUyMCUyMCUyMklmJTIwdGhlJTIwVVMlMjBrZWVwcyUyMGl0cyUyMDIwMjQlMjBncm93dGglMjByYXRlJTJDJTIwaG93JTIwbWFueSUyMHllYXJzJTIwd2lsbCUyMGl0JTIwdGFrZSUyMGZvciUyMHRoZSUyMEdEUCUyMHRvJTIwZG91YmxlJTNGJTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> (
    CodeAgent,
    ToolCallingAgent,
    WebSearchTool,
    VisitWebpageTool,
    InferenceClientModel,
)

model = InferenceClientModel()

search_agent = ToolCallingAgent(
    tools=[WebSearchTool(), VisitWebpageTool()],
    model=model,
    name=<span class="hljs-string">&quot;search_agent&quot;</span>,
    description=<span class="hljs-string">&quot;This is an agent that can do web search.&quot;</span>,
)

manager_agent = CodeAgent(
    tools=[],
    model=model,
    managed_agents=[search_agent],
)
manager_agent.run(
    <span class="hljs-string">&quot;If the US keeps its 2024 growth rate, how many years will it take for the GDP to double?&quot;</span>
)`,wrap:!1}}),E=new d({props:{title:"Setting up telemetry with 🪢 Langfuse",local:"setting-up-telemetry-with--langfuse",headingTag:"h2"}}),z=new d({props:{title:"Step 1: Install Dependencies",local:"step-1-install-dependencies",headingTag:"h3"}}),Y=new b({props:{code:"JTI1cGlwJTIwaW5zdGFsbCUyMGxhbmdmdXNlJTIwJ3Ntb2xhZ2VudHMlNUJ0ZWxlbWV0cnklNUQnJTIwb3BlbmluZmVyZW5jZS1pbnN0cnVtZW50YXRpb24tc21vbGFnZW50cw==",highlighted:'%pip install langfuse <span class="hljs-string">&#x27;smolagents[telemetry]&#x27;</span> openinference-instrumentation-smolagents',wrap:!1}}),X=new d({props:{title:"Step 2: Set Up Environment Variables",local:"step-2-set-up-environment-variables",headingTag:"h3"}}),D=new b({props:{code:"aW1wb3J0JTIwb3MlMEElMjMlMjBHZXQlMjBrZXlzJTIwZm9yJTIweW91ciUyMHByb2plY3QlMjBmcm9tJTIwdGhlJTIwcHJvamVjdCUyMHNldHRpbmdzJTIwcGFnZSUzQSUyMGh0dHBzJTNBJTJGJTJGY2xvdWQubGFuZ2Z1c2UuY29tJTBBb3MuZW52aXJvbiU1QiUyMkxBTkdGVVNFX1BVQkxJQ19LRVklMjIlNUQlMjAlM0QlMjAlMjJway1sZi0uLi4lMjIlMjAlMEFvcy5lbnZpcm9uJTVCJTIyTEFOR0ZVU0VfU0VDUkVUX0tFWSUyMiU1RCUyMCUzRCUyMCUyMnNrLWxmLS4uLiUyMiUyMCUwQW9zLmVudmlyb24lNUIlMjJMQU5HRlVTRV9IT1NUJTIyJTVEJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZjbG91ZC5sYW5nZnVzZS5jb20lMjIlMjAlMjMlMjAlRjAlOUYlODclQUElRjAlOUYlODclQkElMjBFVSUyMHJlZ2lvbiUwQSUyMyUyMG9zLmVudmlyb24lNUIlMjJMQU5HRlVTRV9IT1NUJTIyJTVEJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZ1cy5jbG91ZC5sYW5nZnVzZS5jb20lMjIlMjAlMjMlMjAlRjAlOUYlODclQkElRjAlOUYlODclQjglMjBVUyUyMHJlZ2lvbiUwQSUyMCUwQSUyMyUyMHlvdXIlMjBIdWdnaW5nJTIwRmFjZSUyMHRva2VuJTBBb3MuZW52aXJvbiU1QiUyMkhGX1RPS0VOJTIyJTVEJTIwJTNEJTIwJTIyaGZfLi4uJTIy",highlighted:`<span class="hljs-keyword">import</span> os
<span class="hljs-comment"># Get keys for your project from the project settings page: https://cloud.langfuse.com</span>
os.environ[<span class="hljs-string">&quot;LANGFUSE_PUBLIC_KEY&quot;</span>] = <span class="hljs-string">&quot;pk-lf-...&quot;</span> 
os.environ[<span class="hljs-string">&quot;LANGFUSE_SECRET_KEY&quot;</span>] = <span class="hljs-string">&quot;sk-lf-...&quot;</span> 
os.environ[<span class="hljs-string">&quot;LANGFUSE_HOST&quot;</span>] = <span class="hljs-string">&quot;https://cloud.langfuse.com&quot;</span> <span class="hljs-comment"># 🇪🇺 EU region</span>
<span class="hljs-comment"># os.environ[&quot;LANGFUSE_HOST&quot;] = &quot;https://us.cloud.langfuse.com&quot; # 🇺🇸 US region</span>
 
<span class="hljs-comment"># your Hugging Face token</span>
os.environ[<span class="hljs-string">&quot;HF_TOKEN&quot;</span>] = <span class="hljs-string">&quot;hf_...&quot;</span>`,wrap:!1}}),K=new b({props:{code:"ZnJvbSUyMGxhbmdmdXNlJTIwaW1wb3J0JTIwZ2V0X2NsaWVudCUwQSUyMCUwQWxhbmdmdXNlJTIwJTNEJTIwZ2V0X2NsaWVudCgpJTBBJTIwJTBBJTIzJTIwVmVyaWZ5JTIwY29ubmVjdGlvbiUwQWlmJTIwbGFuZ2Z1c2UuYXV0aF9jaGVjaygpJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoJTIyTGFuZ2Z1c2UlMjBjbGllbnQlMjBpcyUyMGF1dGhlbnRpY2F0ZWQlMjBhbmQlMjByZWFkeSElMjIpJTBBZWxzZSUzQSUwQSUyMCUyMCUyMCUyMHByaW50KCUyMkF1dGhlbnRpY2F0aW9uJTIwZmFpbGVkLiUyMFBsZWFzZSUyMGNoZWNrJTIweW91ciUyMGNyZWRlbnRpYWxzJTIwYW5kJTIwaG9zdC4lMjIp",highlighted:`<span class="hljs-keyword">from</span> langfuse <span class="hljs-keyword">import</span> get_client
 
langfuse = get_client()
 
<span class="hljs-comment"># Verify connection</span>
<span class="hljs-keyword">if</span> langfuse.auth_check():
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Langfuse client is authenticated and ready!&quot;</span>)
<span class="hljs-keyword">else</span>:
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Authentication failed. Please check your credentials and host.&quot;</span>)`,wrap:!1}}),ee=new d({props:{title:"Step 3: Initialize the SmolagentsInstrumentor",local:"step-3-initialize-the-smolagentsinstrumentor",headingTag:"h3"}}),le=new b({props:{code:"ZnJvbSUyMG9wZW5pbmZlcmVuY2UuaW5zdHJ1bWVudGF0aW9uLnNtb2xhZ2VudHMlMjBpbXBvcnQlMjBTbW9sYWdlbnRzSW5zdHJ1bWVudG9yJTBBJTIwJTBBU21vbGFnZW50c0luc3RydW1lbnRvcigpLmluc3RydW1lbnQoKQ==",highlighted:`<span class="hljs-keyword">from</span> openinference.instrumentation.smolagents <span class="hljs-keyword">import</span> SmolagentsInstrumentor
 
SmolagentsInstrumentor().instrument()`,wrap:!1}}),ne=new d({props:{title:"Step 4: Run your smolagent",local:"step-4-run-your-smolagent",headingTag:"h3"}}),se=new b({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjAoJTBBJTIwJTIwJTIwJTIwQ29kZUFnZW50JTJDJTBBJTIwJTIwJTIwJTIwVG9vbENhbGxpbmdBZ2VudCUyQyUwQSUyMCUyMCUyMCUyMFdlYlNlYXJjaFRvb2wlMkMlMEElMjAlMjAlMjAlMjBWaXNpdFdlYnBhZ2VUb29sJTJDJTBBJTIwJTIwJTIwJTIwSW5mZXJlbmNlQ2xpZW50TW9kZWwlMkMlMEEpJTBBJTBBbW9kZWwlMjAlM0QlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCUyMmRlZXBzZWVrLWFpJTJGRGVlcFNlZWstUjEtRGlzdGlsbC1Rd2VuLTMyQiUyMiUwQSklMEElMEFzZWFyY2hfYWdlbnQlMjAlM0QlMjBUb29sQ2FsbGluZ0FnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCV2ViU2VhcmNoVG9vbCgpJTJDJTIwVmlzaXRXZWJwYWdlVG9vbCgpJTVEJTJDJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMG5hbWUlM0QlMjJzZWFyY2hfYWdlbnQlMjIlMkMlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUzRCUyMlRoaXMlMjBpcyUyMGFuJTIwYWdlbnQlMjB0aGF0JTIwY2FuJTIwZG8lMjB3ZWIlMjBzZWFyY2guJTIyJTJDJTBBKSUwQSUwQW1hbmFnZXJfYWdlbnQlMjAlM0QlMjBDb2RlQWdlbnQoJTBBJTIwJTIwJTIwJTIwdG9vbHMlM0QlNUIlNUQlMkMlMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwbWFuYWdlZF9hZ2VudHMlM0QlNUJzZWFyY2hfYWdlbnQlNUQlMkMlMEEpJTBBbWFuYWdlcl9hZ2VudC5ydW4oJTBBJTIwJTIwJTIwJTIwJTIySG93JTIwY2FuJTIwTGFuZ2Z1c2UlMjBiZSUyMHVzZWQlMjB0byUyMG1vbml0b3IlMjBhbmQlMjBpbXByb3ZlJTIwdGhlJTIwcmVhc29uaW5nJTIwYW5kJTIwZGVjaXNpb24tbWFraW5nJTIwb2YlMjBzbW9sYWdlbnRzJTIwd2hlbiUyMHRoZXklMjBleGVjdXRlJTIwbXVsdGktc3RlcCUyMHRhc2tzJTJDJTIwbGlrZSUyMGR5bmFtaWNhbGx5JTIwYWRqdXN0aW5nJTIwYSUyMHJlY2lwZSUyMGJhc2VkJTIwb24lMjB1c2VyJTIwZmVlZGJhY2slMjBvciUyMGF2YWlsYWJsZSUyMGluZ3JlZGllbnRzJTNGJTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> (
    CodeAgent,
    ToolCallingAgent,
    WebSearchTool,
    VisitWebpageTool,
    InferenceClientModel,
)

model = InferenceClientModel(
    model_id=<span class="hljs-string">&quot;deepseek-ai/DeepSeek-R1-Distill-Qwen-32B&quot;</span>
)

search_agent = ToolCallingAgent(
    tools=[WebSearchTool(), VisitWebpageTool()],
    model=model,
    name=<span class="hljs-string">&quot;search_agent&quot;</span>,
    description=<span class="hljs-string">&quot;This is an agent that can do web search.&quot;</span>,
)

manager_agent = CodeAgent(
    tools=[],
    model=model,
    managed_agents=[search_agent],
)
manager_agent.run(
    <span class="hljs-string">&quot;How can Langfuse be used to monitor and improve the reasoning and decision-making of smolagents when they execute multi-step tasks, like dynamically adjusting a recipe based on user feedback or available ingredients?&quot;</span>
)`,wrap:!1}}),ae=new d({props:{title:"Step 5: View Traces in Langfuse",local:"step-5-view-traces-in-langfuse",headingTag:"h3"}}),re=new Et({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/inspect_runs.md"}}),{c(){M=i("meta"),y=s(),w=i("p"),ue=s(),r(J.$$.fragment),ce=s(),r(U.$$.fragment),Me=s(),r(f.$$.fragment),we=s(),r(I.$$.fragment),be=s(),j=i("p"),j.textContent=ot,de=s(),$=i("p"),$.innerHTML=pt,fe=s(),v=i("p"),v.textContent=rt,he=s(),W=i("p"),W.textContent=ut,ye=s(),Z=i("p"),Z.innerHTML=mt,Je=s(),C=i("p"),C.textContent=gt,Ue=s(),B=i("p"),B.textContent=Tt,Ie=s(),h=i("div"),h.innerHTML=ct,je=s(),r(V.$$.fragment),$e=s(),k=i("p"),k.innerHTML=Mt,ve=s(),r(G.$$.fragment),We=s(),S=i("p"),S.textContent=wt,Ze=s(),r(_.$$.fragment),Ce=s(),x=i("p"),x.innerHTML=bt,Be=s(),r(H.$$.fragment),Ve=s(),Q=i("p"),Q.textContent=dt,ke=s(),r(L.$$.fragment),Ge=s(),F=i("p"),F.innerHTML=ft,Se=s(),me=i("img"),_e=s(),N=i("p"),N.textContent=yt,xe=s(),r(E.$$.fragment),He=s(),R=i("p"),R.innerHTML=Jt,Qe=s(),A=i("blockquote"),A.innerHTML=Ut,Le=s(),r(z.$$.fragment),Fe=s(),r(Y.$$.fragment),Ne=s(),r(X.$$.fragment),Ee=s(),q=i("p"),q.innerHTML=It,Re=s(),P=i("p"),P.innerHTML=jt,Ae=s(),r(D.$$.fragment),ze=s(),O=i("p"),O.innerHTML=$t,Ye=s(),r(K.$$.fragment),Xe=s(),r(ee.$$.fragment),qe=s(),te=i("p"),te.innerHTML=vt,Pe=s(),r(le.$$.fragment),De=s(),r(ne.$$.fragment),Oe=s(),r(se.$$.fragment),Ke=s(),r(ae.$$.fragment),et=s(),ie=i("p"),ie.innerHTML=Wt,tt=s(),oe=i("p"),oe.innerHTML=Zt,lt=s(),pe=i("p"),pe.innerHTML=Ct,nt=s(),r(re.$$.fragment),st=s(),ge=i("p"),this.h()},l(e){const t=Qt("svelte-u9bgzb",document.head);M=o(t,"META",{name:!0,content:!0}),t.forEach(l),y=a(e),w=o(e,"P",{}),Vt(w).forEach(l),ue=a(e),u(J.$$.fragment,e),ce=a(e),u(U.$$.fragment,e),Me=a(e),u(f.$$.fragment,e),we=a(e),u(I.$$.fragment,e),be=a(e),j=o(e,"P",{"data-svelte-h":!0}),p(j)!=="svelte-b60rwm"&&(j.textContent=ot),de=a(e),$=o(e,"P",{"data-svelte-h":!0}),p($)!=="svelte-1vbx0nq"&&($.innerHTML=pt),fe=a(e),v=o(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-6dts52"&&(v.textContent=rt),he=a(e),W=o(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-be9uix"&&(W.textContent=ut),ye=a(e),Z=o(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-a44to5"&&(Z.innerHTML=mt),Je=a(e),C=o(e,"P",{"data-svelte-h":!0}),p(C)!=="svelte-1fuj4vi"&&(C.textContent=gt),Ue=a(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-18al2cw"&&(B.textContent=Tt),Ie=a(e),h=o(e,"DIV",{class:!0,"data-svelte-h":!0}),p(h)!=="svelte-14dyk5w"&&(h.innerHTML=ct),je=a(e),u(V.$$.fragment,e),$e=a(e),k=o(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-o5owj0"&&(k.innerHTML=Mt),ve=a(e),u(G.$$.fragment,e),We=a(e),S=o(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-1g5pcik"&&(S.textContent=wt),Ze=a(e),u(_.$$.fragment,e),Ce=a(e),x=o(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-y3xi4v"&&(x.innerHTML=bt),Be=a(e),u(H.$$.fragment,e),Ve=a(e),Q=o(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-1j1jswr"&&(Q.textContent=dt),ke=a(e),u(L.$$.fragment,e),Ge=a(e),F=o(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-jcl2lc"&&(F.innerHTML=ft),Se=a(e),me=o(e,"IMG",{src:!0}),_e=a(e),N=o(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-11c8ug9"&&(N.textContent=yt),xe=a(e),u(E.$$.fragment,e),He=a(e),R=o(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1klyknm"&&(R.innerHTML=Jt),Qe=a(e),A=o(e,"BLOCKQUOTE",{"data-svelte-h":!0}),p(A)!=="svelte-10vakt2"&&(A.innerHTML=Ut),Le=a(e),u(z.$$.fragment,e),Fe=a(e),u(Y.$$.fragment,e),Ne=a(e),u(X.$$.fragment,e),Ee=a(e),q=o(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-e5j4hz"&&(q.innerHTML=It),Re=a(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-8df0ib"&&(P.innerHTML=jt),Ae=a(e),u(D.$$.fragment,e),ze=a(e),O=o(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-wfv4z0"&&(O.innerHTML=$t),Ye=a(e),u(K.$$.fragment,e),Xe=a(e),u(ee.$$.fragment,e),qe=a(e),te=o(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-pz6aii"&&(te.innerHTML=vt),Pe=a(e),u(le.$$.fragment,e),De=a(e),u(ne.$$.fragment,e),Oe=a(e),u(se.$$.fragment,e),Ke=a(e),u(ae.$$.fragment,e),et=a(e),ie=o(e,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-1207qpx"&&(ie.innerHTML=Wt),tt=a(e),oe=o(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-jw4wqs"&&(oe.innerHTML=Zt),lt=a(e),pe=o(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-7h9ald"&&(pe.innerHTML=Ct),nt=a(e),u(re.$$.fragment,e),st=a(e),ge=o(e,"P",{}),Vt(ge).forEach(l),this.h()},h(){it(M,"name","hf:doc:metadata"),it(M,"content",zt),it(h,"class","flex justify-center"),Gt(me.src,ht="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/inspect_run_phoenix.png")||it(me,"src",ht)},m(e,t){Lt(document.head,M),n(e,y,t),n(e,w,t),n(e,ue,t),m(J,e,t),n(e,ce,t),m(U,e,t),n(e,Me,t),m(f,e,t),n(e,we,t),m(I,e,t),n(e,be,t),n(e,j,t),n(e,de,t),n(e,$,t),n(e,fe,t),n(e,v,t),n(e,he,t),n(e,W,t),n(e,ye,t),n(e,Z,t),n(e,Je,t),n(e,C,t),n(e,Ue,t),n(e,B,t),n(e,Ie,t),n(e,h,t),n(e,je,t),m(V,e,t),n(e,$e,t),n(e,k,t),n(e,ve,t),m(G,e,t),n(e,We,t),n(e,S,t),n(e,Ze,t),m(_,e,t),n(e,Ce,t),n(e,x,t),n(e,Be,t),m(H,e,t),n(e,Ve,t),n(e,Q,t),n(e,ke,t),m(L,e,t),n(e,Ge,t),n(e,F,t),n(e,Se,t),n(e,me,t),n(e,_e,t),n(e,N,t),n(e,xe,t),m(E,e,t),n(e,He,t),n(e,R,t),n(e,Qe,t),n(e,A,t),n(e,Le,t),m(z,e,t),n(e,Fe,t),m(Y,e,t),n(e,Ne,t),m(X,e,t),n(e,Ee,t),n(e,q,t),n(e,Re,t),n(e,P,t),n(e,Ae,t),m(D,e,t),n(e,ze,t),n(e,O,t),n(e,Ye,t),m(K,e,t),n(e,Xe,t),m(ee,e,t),n(e,qe,t),n(e,te,t),n(e,Pe,t),m(le,e,t),n(e,De,t),m(ne,e,t),n(e,Oe,t),m(se,e,t),n(e,Ke,t),m(ae,e,t),n(e,et,t),n(e,ie,t),n(e,tt,t),n(e,oe,t),n(e,lt,t),n(e,pe,t),n(e,nt,t),m(re,e,t),n(e,st,t),n(e,ge,t),at=!0},p(e,[t]){const Bt={};t&2&&(Bt.$$scope={dirty:t,ctx:e}),f.$set(Bt)},i(e){at||(g(J.$$.fragment,e),g(U.$$.fragment,e),g(f.$$.fragment,e),g(I.$$.fragment,e),g(V.$$.fragment,e),g(G.$$.fragment,e),g(_.$$.fragment,e),g(H.$$.fragment,e),g(L.$$.fragment,e),g(E.$$.fragment,e),g(z.$$.fragment,e),g(Y.$$.fragment,e),g(X.$$.fragment,e),g(D.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(le.$$.fragment,e),g(ne.$$.fragment,e),g(se.$$.fragment,e),g(ae.$$.fragment,e),g(re.$$.fragment,e),at=!0)},o(e){T(J.$$.fragment,e),T(U.$$.fragment,e),T(f.$$.fragment,e),T(I.$$.fragment,e),T(V.$$.fragment,e),T(G.$$.fragment,e),T(_.$$.fragment,e),T(H.$$.fragment,e),T(L.$$.fragment,e),T(E.$$.fragment,e),T(z.$$.fragment,e),T(Y.$$.fragment,e),T(X.$$.fragment,e),T(D.$$.fragment,e),T(K.$$.fragment,e),T(ee.$$.fragment,e),T(le.$$.fragment,e),T(ne.$$.fragment,e),T(se.$$.fragment,e),T(ae.$$.fragment,e),T(re.$$.fragment,e),at=!1},d(e){e&&(l(y),l(w),l(ue),l(ce),l(Me),l(we),l(be),l(j),l(de),l($),l(fe),l(v),l(he),l(W),l(ye),l(Z),l(Je),l(C),l(Ue),l(B),l(Ie),l(h),l(je),l($e),l(k),l(ve),l(We),l(S),l(Ze),l(Ce),l(x),l(Be),l(Ve),l(Q),l(ke),l(Ge),l(F),l(Se),l(me),l(_e),l(N),l(xe),l(He),l(R),l(Qe),l(A),l(Le),l(Fe),l(Ne),l(Ee),l(q),l(Re),l(P),l(Ae),l(ze),l(O),l(Ye),l(Xe),l(qe),l(te),l(Pe),l(De),l(Oe),l(Ke),l(et),l(ie),l(tt),l(oe),l(lt),l(pe),l(nt),l(st),l(ge)),l(M),c(J,e),c(U,e),c(f,e),c(I,e),c(V,e),c(G,e),c(_,e),c(H,e),c(L,e),c(E,e),c(z,e),c(Y,e),c(X,e),c(D,e),c(K,e),c(ee,e),c(le,e),c(ne,e),c(se,e),c(ae,e),c(re,e)}}}const zt='{"title":"Inspecting runs with OpenTelemetry","local":"inspecting-runs-with-opentelemetry","sections":[{"title":"Why log your agent runs?","local":"why-log-your-agent-runs","sections":[],"depth":2},{"title":"Setting up telemetry with Arize AI Phoenix","local":"setting-up-telemetry-with-arize-ai-phoenix","sections":[],"depth":2},{"title":"Setting up telemetry with 🪢 Langfuse","local":"setting-up-telemetry-with--langfuse","sections":[{"title":"Step 1: Install Dependencies","local":"step-1-install-dependencies","sections":[],"depth":3},{"title":"Step 2: Set Up Environment Variables","local":"step-2-set-up-environment-variables","sections":[],"depth":3},{"title":"Step 3: Initialize the SmolagentsInstrumentor","local":"step-3-initialize-the-smolagentsinstrumentor","sections":[],"depth":3},{"title":"Step 4: Run your smolagent","local":"step-4-run-your-smolagent","sections":[],"depth":3},{"title":"Step 5: View Traces in Langfuse","local":"step-5-view-traces-in-langfuse","sections":[],"depth":3}],"depth":2}],"depth":1}';function Yt(Te){return St(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class el extends xt{constructor(M){super(),Ht(this,M,Yt,At,kt,{})}}export{el as component};
