File size: 1,548 Bytes
f0988d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
# Agent Deployment Information

## 1. Deployment Configuration

### Target Space
- **Profile:** `Leon4gr45`  
- **Space:** `openweb`  
- **Full Identifier:** `Leon4gr45/openweb`  
- **Frontend Port:** `7860` (mandatory for all Hugging Face Spaces)

### Deployment Method
- **Docker SDK** — Chosen for flexibility to run both the Python app and the Pinchtab Go binary.

### HF Token
- The environment variable **`HF_TOKEN`** is used for deployment and monitoring.

### Required Files
- `Dockerfile`
- `README.md` with Hugging Face YAML frontmatter:
  ```yaml
  ---
  title: OpenResearcher
  sdk: docker
  app_port: 7860
  ---
  ```
- `.hfignore`
- `Agent.md`

---

## 2. API Exposure and Documentation

### Mandatory Endpoints
- **`/health`**: Returns HTTP 200 when the app is ready.
- **`/api-docs`**: Documents all available API endpoints.

### Functional Endpoints
- **GET `/health`**
  - Purpose: Health check for Hugging Face Space.
  - Response: `{"status": "ok"}`
- **GET `/api-docs`**
  - Purpose: API Documentation.
  - Response: HTML documentation.
- **POST `/predict`** (via Gradio)
  - Purpose: Main research agent interface.

---

## 3. Deployment Workflow

### Standard Deployment Command
```bash
hf upload Leon4gr45/openweb --repo-type=space
```

### Monitoring Logs
Build logs:
```bash
curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/openweb/logs/build"
```

Run logs:
```bash
curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/openweb/logs/run"
```