# Create a CodeAgent with DuckDuckGo search capability from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel web_search = DuckDuckGoSearchTool() model = HfApiModel( max_tokens=2096, temperature=0.5, model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded custom_role_conversions=None, ) agent = CodeAgent( tools=[web_search], # Add search tool here model=model # Add model here )