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
Recursive 内置基于 axum 的 HTTP 服务器(`recursive http`),提供带会话和 SSE 流式输出的 REST API。
```bash
recursive http --addr 127.0.0.1:3000
```
```bash
recursive http &
curl http://localhost:3000/health
SESSION=$(curl -sX POST http://localhost:3000/sessions \
-H 'Content-Type: application/json' \
-d '{"system_prompt":"你是一个有用的 Rust 助手。"}' \
| jq -r .session_id)
curl -N -X POST http://localhost:3000/sessions/$SESSION/run \
-H 'Content-Type: application/json' \
-d '{"message":"列出 /workspace 中的文件"}'
```