# Now use SmolAgents as usual
from smolagents import CodeAgent, WebSearchTool, OpenAIServerModel

model = OpenAIServerModel(model_id="gpt-4o")
agent = CodeAgent(
    tools=[WebSearchTool()],
    model=model,
    stream_outputs=True
)

agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
```

<Frame>
  <img src="https://files.buildwithfern.com/https://opik.docs.buildwithfern.com/docs/opik/2026-01-30T17:33:07.444Z/img/cookbook/smolagents_trace_cookbook.png" alt="Smolagents tracing" />
</Frame>

## Further improvements

If you would like to see us improve this integration, simply open a new feature
request on [Github](https://github.com/comet-ml/opik/issues).