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
Recursive includes an axum-based HTTP server (`recursive http`) that exposes a REST API with sessions and SSE streaming.
```bash
recursive http --addr 127.0.0.1:3000
```
```
http://localhost:3000
```
By default the API is open. To require an API key:
```bash
recursive http --auth-keys key1,key2,key3
```
Then pass `X-API-Key: key1` in request headers.
```bash
recursive http &
curl http://localhost:3000/health
SESSION=$(curl -sX POST http://localhost:3000/sessions \
-H 'Content-Type: application/json' \
-d '{"system_prompt":"You are a helpful Rust assistant."}' \
| jq -r .session_id)
curl -N -X POST http://localhost:3000/sessions/$SESSION/run \
-H 'Content-Type: application/json' \
-d '{"message":"List the files in /workspace"}'
```
See the sub-pages for detailed documentation on each endpoint group.