feat: enhance agent management with session handling and UI improvements

This commit is contained in:
Abhimanyu Saharan
2026-02-04 14:58:14 +05:30
parent f6105fa0d2
commit a33c539860
16 changed files with 1181 additions and 472 deletions

View File

@@ -4,14 +4,14 @@ If this file is empty, skip heartbeat work.
## Required inputs
- BASE_URL (e.g. http://localhost:8000)
- AUTH_TOKEN (Bearer token)
- AUTH_TOKEN (agent token)
- AGENT_NAME
## On every heartbeat
1) Check in:
```bash
curl -s -X POST "$BASE_URL/api/v1/agents/heartbeat" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "X-Agent-Token: $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "'$AGENT_NAME'", "status": "online"}'
```
@@ -19,13 +19,13 @@ curl -s -X POST "$BASE_URL/api/v1/agents/heartbeat" \
2) List boards:
```bash
curl -s "$BASE_URL/api/v1/boards" \
-H "Authorization: Bearer $AUTH_TOKEN"
-H "X-Agent-Token: $AUTH_TOKEN"
```
3) For each board, list tasks:
```bash
curl -s "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks" \
-H "Authorization: Bearer $AUTH_TOKEN"
-H "X-Agent-Token: $AUTH_TOKEN"
```
4) Claim next task (FIFO):
@@ -33,7 +33,7 @@ curl -s "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks" \
- Claim it by moving it to "in_progress":
```bash
curl -s -X PATCH "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks/{TASK_ID}" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "X-Agent-Token: $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "in_progress"}'
```
@@ -43,7 +43,7 @@ curl -s -X PATCH "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks/{TASK_ID}" \
- When complete, move to "review":
```bash
curl -s -X PATCH "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks/{TASK_ID}" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "X-Agent-Token: $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "review"}'
```

View File

@@ -5,4 +5,3 @@ Agent ID: {{ agent_id }}
Creature: AI
Vibe: calm, precise, helpful
Emoji: :gear:
Avatar: avatars/{{ agent_id }}.png