File size: 1,083 Bytes
f147f7d
 
 
 
4337336
 
 
f147f7d
 
 
 
 
 
 
4337336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from smolagents import CodeAgent,  DuckDuckGoSearchTool, InferenceClientModel, tool, VisitWebpageTool, Tool, FinalAnswerTool, WebSearchTool, WikipediaSearchTool, GoogleSearchTool
from calculator_tool import CalculatorTool
import os 
import selenium 
import numpy as np
import time
import datetime
from typing import List, Dict, Any, Optional
import tempfile
import re
import json
import requests
from urllib.parse import urlparse


#Creating multyagent structure
web_agent = CodeAgent(
    tools=[
        DuckDuckGoSearchTool(),
        VisitWebpageTool(),
        FinalAnswerTool()
    ], 
    model=InferenceClientModel(),
    name="web_agent",
    description="Brows the web to find information",
    max_steps=10,
    verbosity_level=0,
)

manager_agent = CodeAgent(
    model=InferenceClientModel("deepseek-ai/DeepSeek-R1", provider="together", max_tokens=8096),
    managed_agent=[web_agent],
    additional_authorized_imports=[
        "datetime",
        "pandas",
        "numpy",
        "json"
    ],
    planning_intervals=5,
    verbosity_level=2,
    max_steps=15,
)