File size: 1,730 Bytes
2705160
 
62ad9da
 
 
2705160
 
8fb7691
2705160
 
d123508
 
 
2705160
 
d971efd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42b982f
d971efd
 
42b982f
d971efd
 
42b982f
d971efd
 
 
42b982f
 
d971efd
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
title: Template Final Assignment
emoji: 🕵🏻‍♂️
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 5.25.2
python_version: 3.11
app_file: app.py
pinned: false
hf_oauth: true
# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
hf_oauth_expiration_minutes: 480
---

# SmolaAgents Course Final Assignment

This application is a demonstration of creating a robust agent system with monitoring and tracing capabilities.

## Features

- **Multi-Agent System**: Uses a manager agent to orchestrate a specialized web agent.
- **Advanced Models**: Leverages Qwen and DeepSeek models through HuggingFace's Inference API.
- **Gradio Interface**: Simple UI for agent interaction and evaluation.
- **Comprehensive Tracing**: Integrated observability through Langfuse and Phoenix.

## Tracing and Monitoring

The application includes a modular tracing system that supports both:

### Langfuse
- Cloud-based LLM observability platform
- Configure with environment variables:
  - `LANGFUSE_PUBLIC_KEY`
  - `LANGFUSE_SECRET_KEY`
  - `LANGFUSE_HOST` (defaults to EU region)

### Arize Phoenix
- Local, open-source LLM observability tool
- Start the Phoenix UI with:
  ```
  python -m phoenix.server.main serve
  ```
- View traces at http://localhost:6006

You can configure which tracing system to use:

```python
# Use Langfuse (default)
initialize_tracing(provider="langfuse")

# Use Phoenix
initialize_tracing(provider="phoenix")
```

Due to limitations in the OpenTelemetry integration, only one provider can be active at a time. Simply choose the provider that best meets your needs.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference