Download logs.py from hibanail/First_agent_template: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/hibanail/First_agent_template/resolve/main/logs.py
- Command line
-
hf download hf://hibanail/First_agent_template/logs.py
-
curl -L -o logs.py https://huggingface.co/hibanail/First_agent_template/resolve/main/logs.py
769 Bytes
| 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") |