mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 06:04:43 +00:00
feat: refresh web console theme
This commit is contained in:
parent
0fbf6272b1
commit
1fcae6ed76
34 changed files with 5037 additions and 748 deletions
|
|
@ -8,13 +8,13 @@ description: "Start the daemon and send your first message."
|
|||
Use the installed binary, or `cargo run` in development.
|
||||
|
||||
```bash
|
||||
sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 8787
|
||||
sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
|
||||
```
|
||||
|
||||
If you want to run without auth (local dev only):
|
||||
|
||||
```bash
|
||||
sandbox-agent --no-token --host 127.0.0.1 --port 8787
|
||||
sandbox-agent --no-token --host 127.0.0.1 --port 2468
|
||||
```
|
||||
|
||||
### CORS (frontend usage)
|
||||
|
|
@ -35,7 +35,7 @@ sandbox-agent \
|
|||
## 2. Create a session
|
||||
|
||||
```bash
|
||||
curl -X POST "http://127.0.0.1:8787/v1/sessions/my-session" \
|
||||
curl -X POST "http://127.0.0.1:2468/v1/sessions/my-session" \
|
||||
-H "Authorization: Bearer $SANDBOX_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"agent":"claude","agentMode":"build","permissionMode":"default"}'
|
||||
|
|
@ -44,7 +44,7 @@ curl -X POST "http://127.0.0.1:8787/v1/sessions/my-session" \
|
|||
## 3. Send a message
|
||||
|
||||
```bash
|
||||
curl -X POST "http://127.0.0.1:8787/v1/sessions/my-session/messages" \
|
||||
curl -X POST "http://127.0.0.1:2468/v1/sessions/my-session/messages" \
|
||||
-H "Authorization: Bearer $SANDBOX_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"message":"Summarize the repository and suggest next steps."}'
|
||||
|
|
@ -53,14 +53,14 @@ curl -X POST "http://127.0.0.1:8787/v1/sessions/my-session/messages" \
|
|||
## 4. Read events
|
||||
|
||||
```bash
|
||||
curl "http://127.0.0.1:8787/v1/sessions/my-session/events?offset=0&limit=50" \
|
||||
curl "http://127.0.0.1:2468/v1/sessions/my-session/events?offset=0&limit=50" \
|
||||
-H "Authorization: Bearer $SANDBOX_TOKEN"
|
||||
```
|
||||
|
||||
For streaming output, use SSE:
|
||||
|
||||
```bash
|
||||
curl "http://127.0.0.1:8787/v1/sessions/my-session/events/sse?offset=0" \
|
||||
curl "http://127.0.0.1:2468/v1/sessions/my-session/events/sse?offset=0" \
|
||||
-H "Authorization: Bearer $SANDBOX_TOKEN"
|
||||
```
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ curl "http://127.0.0.1:8787/v1/sessions/my-session/events/sse?offset=0" \
|
|||
The CLI mirrors the HTTP API:
|
||||
|
||||
```bash
|
||||
sandbox-agent sessions create my-session --agent claude --endpoint http://127.0.0.1:8787 --token "$SANDBOX_TOKEN"
|
||||
sandbox-agent sessions create my-session --agent claude --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
|
||||
|
||||
sandbox-agent sessions send-message my-session --message "Hello" --endpoint http://127.0.0.1:8787 --token "$SANDBOX_TOKEN"
|
||||
sandbox-agent sessions send-message my-session --message "Hello" --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue