File size: 769 Bytes
2d2af9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from dotenv import load_dotenv
from langfuse import get_client
from model import model
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
from smolagents import CodeAgent, DuckDuckGoSearchTool

load_dotenv() 

langfuse = get_client()

# Verify connection
if langfuse.auth_check():
    print("Langfuse client is authenticated and ready!")
else:
    print("Authentication failed. Please check your credentials and host.")


SmolagentsInstrumentor().instrument()

agent = CodeAgent(tools=[], model=model)
alfred_agent = CodeAgent.from_hub(
    "sergiopaniego/AlfredAgent",
    trust_remote_code=True,
    model=model,
)

alfred_agent.run("Give me the best playlist for a party at Wayne's mansion. The party idea is a 'villain masquerade' theme")