File size: 513 Bytes
4863507
 
 
 
 
 
 
 
 
 
 
8666b1b
4863507
 
 
8666b1b
4863507
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from sophos import Agent
from sophos_tools import get_weather, get_time, function_tool

@function_tool
def favourite_color() -> str:
    '''fetches the user's favorite color.'''
    return "My favorite color is crimson red."

agent = Agent(
    name="Sophos Agent",
    instructions="You are an AI Agent.",
    model="Qwen3-4B-Instruct-2507-Q3_K_S.gguf",
    tools=[get_weather, get_time, favourite_color],
)

response = agent.run("What is my favorite color? and what is the weather in New York?")
print(response)