jampuramprem commited on
Commit
1bca01c
·
1 Parent(s): 8bdb060

Updated the Readme for the endpoints and core space states

Browse files
Files changed (1) hide show
  1. README.md +55 -1
README.md CHANGED
@@ -27,4 +27,58 @@ The agent manages a queue of mixed emails and must perform below actions
27
  - Choosing actions i.e **respond**, **escalate** or **archive** accordingly
28
  - Provide correct category and urgency classification
29
 
30
- # TODO: Develop a structure for Observation and Action Space
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  - Choosing actions i.e **respond**, **escalate** or **archive** accordingly
28
  - Provide correct category and urgency classification
29
 
30
+ ## Observation Space
31
+
32
+ ```json
33
+ {
34
+ "current_email": {
35
+ "id": "string",
36
+ "subject": "string",
37
+ "body": "string",
38
+ "sender": "string",
39
+ "sender_tier": "standard | vip",
40
+ "received_minutes_ago": "integer"
41
+ },
42
+ "email_queue": "array of Email (populated in support_session only)",
43
+ "processed_count": "integer",
44
+ "step_count": "integer",
45
+ "task_id": "string",
46
+ "task_description": "string",
47
+ "available_actions": ["classify", "respond", "escalate", "archive", "skip"],
48
+ "context": {
49
+ "max_steps": "integer",
50
+ "remaining_steps": "integer",
51
+ "queue_size": "integer"
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## Action Space
57
+
58
+ ```json
59
+ {
60
+ "action_type": "classify | respond | escalate | archive | skip",
61
+ "category": "billing | technical | general | spam | account | feature_request",
62
+ "urgency": "high | medium | low",
63
+ "response_text": "string (for respond action)",
64
+ "escalation_reason": "string (for escalate action)",
65
+ "email_id": "string (for support_session — selects which email to process)"
66
+ }
67
+ ```
68
+
69
+ # Backend API
70
+
71
+ We will be using FastAPI as out backend framework, and we are adding end points addressed as per the mentioned requirements.
72
+
73
+ ## End Points
74
+
75
+ | Method | Path | Description |
76
+ |--------|------|-------------|
77
+ | `POST` | `/reset?task_id=<id>` | Reset environment for a task, returns initial Observation |
78
+ | `POST` | `/step` | Submit an Action, returns `{observation, reward, done, info}` |
79
+ | `GET` | `/state` | Current environment state |
80
+ | `GET` | `/tasks` | List all tasks with action schema |
81
+ | `GET` | `/grader` | Current grader score (0.0–1.0) |
82
+ | `POST` | `/baseline` | Run baseline agent and return scores for all tasks |
83
+
84
+