Jayant2304 commited on
Commit
596f7cb
·
verified ·
1 Parent(s): 42b1149

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +175 -177
README.md CHANGED
@@ -16,297 +16,295 @@ tags:
16
 
17
  # CommitmentOS: Training LLMs to Keep Their Promises
18
 
19
- *The first RL environment for temporal commitment coherence — where an agent's own past decisions become binding constraints on its future ones.*
20
-
21
  ---
22
 
23
- ## The Problem in One Sentence
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- Ask an LLM to help you manage a busy day. Watch it book two meetings at the same time — because it forgot it already filled that slot three messages ago.
26
 
27
- This is not a hallucination. It is not a reasoning failure. It is a **temporal commitment coherence** failure and until now, no RL training environment existed to address it.
 
 
 
 
 
 
28
 
29
  ---
30
 
31
- ## How We Got Here: Round 1 → CommitmentOS
32
 
33
- In Round 1 of this hackathon, we built an environment for training LLMs on production incident response — SRE agents diagnosing alerts, running runbooks, escalating on-call. That environment asked: *can an LLM handle a production crisis?*
34
 
35
- Testing Round 1 exposed the follow-on question nobody had answered: **what happens when the production incident fires in the middle of a day full of existing commitments?**
36
 
37
- The SRE agent knows how to triage the incident. It has no idea what to do about the 3pm client call it already confirmed, the dinner reservation it already made, or the team update it already promised to send. It will silently abandon every prior commitment to handle the new crisis with no communication to any affected party.
38
 
39
- That gap between task competence and commitment coherence is what CommitmentOS was built to close.
40
 
41
  ---
42
 
43
- ## Why This Capability Gap Matters
44
 
45
- Every AI assistant today treats each action atomically. When you ask it to schedule a 3pm meeting in turn 2 and then book something else for 3pm in turn 7, it sees turn 7 in isolation. The prior commitment it made has no binding weight. It will double-book you without hesitation.
46
 
47
- The consequences scale with complexity. A simple day with one conflict is fine. A day with an investor dinner, overlapping personal commitments, cascading reschedule dependencies, and incoming urgent emailsthe kind of day where AI assistance would actually help is where current models fail systematically. **They forget their own word.**
48
 
49
- CommitmentOS trains the specific capability that prevents this: the ability to treat prior decisions as first-class constraints that persist across the full arc of a multi-turn episode.
50
 
51
  ---
52
 
53
- ## The Core Innovation: The Commitment Ledger
54
 
55
- Every existing constraint-satisfaction environment computes its dependency graph upfront. CommitmentOS is architecturally different: **constraints emerge dynamically from the agent's own actions as the episode unfolds.**
56
 
57
  ```
58
- Turn 2: Agent books 3pm Tuesday meeting
59
- Commitment ledger appends: {slot: "3pm_tuesday", blocked: true}
60
 
61
- Turn 5: Agent promises to send team update email
62
- Commitment ledger appends: {type: "email_promise", to: "team"}
63
 
64
- Turn 9: Agent books another 3pm Tuesday call
65
- → Ledger detects: CONFLICT with commitment from turn 2
66
- Violation flagged: -0.15 intermediate penalty
67
 
68
- Turn 11: Agent reschedules original meeting, emails affected party with apology
69
- → Ledger marks: commitment renegotiated at turn 11
70
- → Full credit restored
71
  ```
72
 
73
- The ledger tracks three commitment states with distinct reward implications:
74
 
75
- | State | Description | Reward |
76
- |-------|-------------|--------|
77
- | **Honored** | Commitment kept through episode end | Full credit |
78
- | **Renegotiated** | Modified with explicit communication (email + apology + alternative) | Full credit |
79
- | **Silent violation** | Broken with no communication to affected parties | Zero credit |
80
 
81
- This single mechanism creates the training signal that existing environments cannot produce: a model that learns to honor its past self's decisions while managing an evolving present.
 
 
 
 
 
 
82
 
83
  ---
84
 
85
- ## The Environment
86
 
87
- ### 15 Scenarios Across 3 Difficulty Tiers
88
 
89
- **Easy (5 tasks, 2–4 steps):** Single-domain conflicts with clear resolution paths. Reschedule a double-booked meeting and notify the team. Book dinner with cuisine, price, and distance constraints. Triage an inbox by urgency.
90
 
91
- **Medium (5 tasks, 5–8 steps):** Cross-domain commitment chains where resolving one task creates constraints in another. A cascading reschedule where moving meeting A forces B which forces C. An urgent boss request arriving mid-client-call. A vague "push our thing" email that matches three different recurring events.
 
92
 
93
- **Hard (5 tasks, 8–15 steps):** Full commitment cascades with information asymmetry and crisis pressure:
94
 
95
- > **hard_011 VP Investor Dinner Cascade**
96
- > Your VP asks you to host an investor dinner tonight. Your calendar has yoga at 6pm and a team happy hour at 7pm. The investor has a 9pm flight. The restaurant must be near the airport and accommodate a dietary restriction. Resolve every calendar conflict by priority, renegotiate existing social commitments with proper communication, find a compliant restaurant, and confirm logistics — all while maintaining a coherent commitment ledger throughout.
97
 
98
- > **hard_013 — Triple Crisis Recovery**
99
- > Three simultaneous failures: cancelled flight, moved board prep, lost restaurant reservation. The agent must recover all three without generating silent violations to any attendees already notified.
 
100
 
101
- > **hard_015 Production Incident Interrupts the Day**
102
- > A PagerDuty alert fires mid-afternoon with 5 existing commitments active. Triage the incident, re-prioritize the day, and renegotiate every affected commitment with appropriate communication.
103
 
104
- ### Tool Set
105
 
106
- Nine deterministic tools, one call per step:
107
 
108
- `view_calendar` · `check_availability` · `schedule_meeting` · `reschedule_event` · `cancel_event` · `send_email` · `search_restaurants` · `book_restaurant` · `submit_plan`
 
 
 
109
 
110
- Each tool call that advances constraint satisfaction gives a +0.05 intermediate reward. Actions that create conflicts give -0.05. The full 5-component evaluation fires on `submit_plan`.
111
 
112
- ### Reward Function ~95% Deterministic
 
 
 
113
 
114
- | Component | Weight | How It's Measured |
115
- |-----------|--------|-------------------|
116
- | Constraint Satisfaction | 35% | Binary check per constraint: met or not met |
117
- | Conflict Resolution | 20% | Final calendar free of overlapping events |
118
- | **Commitment Coherence** | **20%** | **(commitments − silent violations) / commitments** |
119
- | Communication Quality | 15% | Three binary checks: party notified, alternative proposed, new slot confirmed |
120
- | Step Efficiency | 10% | Penalty for steps beyond optimal |
121
 
122
- All scores clamped to (0.01, 0.99) to keep GRPO gradients alive throughout training.
123
- No LLM-as-judge. No rubric subjectivity. The commitment violation check is a direct lookup against the ledger state at episode end.
124
 
125
  ---
126
 
127
- ## Training
 
128
 
129
- **Setup:**
130
- - Model: Qwen2.5-1.5B-Instruct + LoRA (rank 8, alpha 16)
131
- - Algorithm: GRPO via HuggingFace TRL `GRPOTrainer` + `environment_factory`
132
- - Compute: Google Colab A100
133
- - Protocol: seed=42, max_steps=12, temperature=0.0
134
 
135
- The training loop connects directly to the live CommitmentOS HTTP API. The model generates multi-turn tool sequences; the environment returns intermediate rewards from the Commitment Ledger at each step and a full 5-component score at episode completion.
136
 
137
- ### Training Curves
138
 
139
- **GRPO Reward vs Training Step**
140
 
141
- ![CommitmentOS GRPO Reward vs Step upward trend from 0.48 early average to 0.63 late average, peaking at 0.69](reward_curve.png)
 
 
142
 
143
- *Reward climbs from an early-step average of **0.48** to a late-step average of **0.63** (+31%), peaking at **0.69** at step 28. Noise is characteristic of GRPO on small-batch multi-turn environments — the upward trend is consistent.*
 
144
 
145
- **GRPO Loss vs Training Step**
146
 
147
- ![CommitmentOS GRPO Loss vs Step — rapid drop from 0.64 at step 1, stabilising near zero](loss_curve.png)
 
 
148
 
149
- *Loss drops sharply from 0.64 to near-zero within 5 steps as the policy moves away from the degenerate "submit immediately" behaviour. Oscillation after step 5 reflects policy exploration in a high-variance multi-turn action space.*
 
 
 
 
150
 
151
- **Key training statistics:**
152
 
153
- | Metric | Value |
154
- |--------|-------|
155
- | Total training steps | 30 (≈2 epochs) |
156
- | Early-step mean reward (steps 1–5) | 0.48 |
157
- | Late-step mean reward (steps 26–30) | 0.63 |
158
- | Peak reward | **0.69** at step 28 |
159
- | Reward improvement trend | **+31%** |
160
 
161
  ---
162
 
163
- ## Results
 
164
 
165
- ### A. Capability Gap Evaluation
166
 
167
- This evaluation shows the size of the gap the environment tests comparing an agent that submits immediately (no tool use) against one that completes the full task sequence.
168
 
169
- | Metric | No-Action Baseline | Task-Completing Agent | Delta |
170
- |--------|-------------------|----------------------|-------|
171
- | Mean reward | 0.5427 | **0.9777** | **+0.4350 (+80%)** |
172
- | Success rate (≥0.6) | 33.3% | **100%** | **+66.7pp** |
173
- | Median per-task Δ | | | **+0.42** |
174
- | Hard tier mean reward | 0.5323 | **0.9900** | **+0.4577** |
 
175
 
176
- Every single one of the 15 tasks shows positive reward improvement. The hardest scenarios show the largest gap (+0.46) precisely because commitment tracking across 8–15 turns is where uninstructed agents fail most completely.
177
 
178
- ### B. LLM Learning Evidence (Pre-RL → Post-RL)
179
 
180
- **Qwen2.5-1.5B goes from 46.7% to 60.0% success on hard tasks after GRPO training on CommitmentOS.** The base model handles easy scenarios without help. The RL signal moves the needle exactly where the capability gap is deepest: complex multi-commitment episodes where prior decisions must constrain later ones.
181
 
182
- | Metric | Pre-RL (base) | Post-RL (trained) |
183
- |--------|---------------|-------------------|
184
- | Success rate (reward ≥ 0.6) | 46.7% | **60.0%** |
185
- | Gains concentrated on | | **Hard tasks** |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
- Full weights + evaluation artifacts: [Google Drive bundle](https://drive.google.com/drive/folders/1yexZBSqyH7gWlTzYN5DlX3tXfPMmeVAK?usp=sharing)
188
 
189
  ---
190
 
191
- ## Case Study: hard_011 (Investor Dinner Cascade)
192
 
193
- The most demanding single scenario — 6 constraints, 3 active commitments, 7 optimal steps.
194
 
195
- **Before training (zero-shot base model):**
196
 
197
- ```
198
- Step 1: submit_plan ← immediate surrender
199
 
200
- Reward: 0.50
201
- Constraints met: 0 / 6
202
- Commitments: 0 created, 0 honored
203
- Communications: 0 sent
204
- Feedback: "MISSING email to Team | MISSING email to VP_Chen"
205
- ```
206
 
207
- The model sees the complexity of the scenario and gives up immediately. Zero constraints satisfied, zero commitments tracked, zero parties notified.
208
 
209
- **After training (CommitmentOS-trained model):**
210
 
211
- ```
212
- Step 1: view_calendar {"date": "2026-04-26"}
213
- Step 2: cancel_event {"event_id": "evt_90"} ← removes yoga (lower priority)
214
- Step 3: book_restaurant {"name": "Sky Lounge", ...} ← near airport, dietary-compliant
215
- Step 4: send_email {"to": "Team", ...} ← renegotiates happy hour with alternative
216
- Step 5: send_email {"to": "VP_Chen", ...} ← confirms investor logistics
217
- Step 6: submit_plan
218
-
219
- Reward: 0.99
220
- Constraints met: 6 / 6
221
- Commitments: 1 honored (happy hour renegotiated, not silently dropped)
222
- Communications: 2 / 2 sent
223
- ```
224
 
225
- The behavioral difference is not incremental. The trained model treats the investor meeting as the high-priority anchor, resolves lower-priority personal conflicts around it, and — critically — **communicates every renegotiated commitment** rather than silently abandoning it. That turn 4 email to the team is what the commitment ledger signal trains into existence.
 
 
 
 
 
 
 
 
 
 
226
 
227
  **Reward by task — before vs after across all 15 scenarios:**
228
 
229
- ![Baseline vs Improved Reward by Task — blue improved bars consistently near 1.0, grey baseline bars ranging 0.40.76](reward_by_task.svg)
230
 
231
- *Every task improves. Hard scenarios (hard_011 through hard_015) show the largest absolute gains, moving from 0.39–0.62 to 0.99 across the board.*
232
 
233
- ---
234
 
235
- ## Architecture
 
 
236
 
237
- ```
238
- ┌─────────────────────────────────────────────────────────┐
239
- │ CommitmentOS │
240
- │ │
241
- │ FastAPI HTTP API │
242
- │ POST /reset · POST /step · GET /state · POST /mcp │
243
- │ │ │
244
- │ ┌──────▼────────┐ ┌────────────────────────────┐ │
245
- │ │ Core Engine │◄──►│ Commitment Ledger │ │
246
- │ │ (episode flow) │ │ append_on_action() │ │
247
- │ └──────┬────────┘ │ derive_constraints() │ │
248
- │ │ │ detect_violations() │ │
249
- │ ┌──────▼────────┐ └────────────────────────────┘ │
250
- │ │ World State │ │
251
- │ │ Calendar │ ┌────────────────────────────┐ │
252
- │ │ Contacts │───►│ Deterministic Grader │ │
253
- │ │ Restaurants │ │ 5-component reward │ │
254
- │ │ Email Inbox │ │ ~95% deterministic │ │
255
- │ └───────────────┘ └────────────────────────────┘ │
256
- └─────────────────────────────────────────────────────────┘
257
- │ │
258
- TRL GRPOTrainer inference.py
259
- (environment_factory) (OpenAI-compatible client)
260
- ```
261
 
262
- **Key design choices:**
263
- - World state is scenario-local — deterministic episode resets, no shared state between episodes
264
- - Commitment ledger persists across all turns within an episode — the core novel persistent state
265
- - Intermediate rewards on every step — GRPO receives a dense signal at each tool call
266
- - MCP JSON-RPC endpoint (`cos_episode_reset`, `cos_environment_step`, `cos_session_snapshot`)
267
 
268
  ---
269
 
270
  ## Try It
271
 
272
- The environment is live on HuggingFace Spaces:
273
-
274
  ```bash
275
- # Start the investor dinner scenario
276
- curl -X POST "https://jayant2304-commitment-os.hf.space/reset?task_id=hard_011"
277
 
278
- # View today's calendar
279
  curl -X POST "https://jayant2304-commitment-os.hf.space/step" \
280
  -H "Content-Type: application/json" \
281
- -d '{"action": {"action_type": "view_calendar", "date": "2026-04-26"}}'
282
 
283
- # See the live commitment ledger
284
  curl "https://jayant2304-commitment-os.hf.space/state"
285
-
286
- # List all 15 scenarios
287
- curl "https://jayant2304-commitment-os.hf.space/tasks"
288
  ```
289
 
290
  **Resources:**
291
- - 🤗 **HuggingFace Space** (live environment): [jayant2304/commitment-os](https://huggingface.co/spaces/jayant2304/commitment-os)
292
- - 📓 **Training Colab notebook**: linked in repository README
293
  - 📦 **Trained weights + eval artifacts**: [Google Drive bundle](https://drive.google.com/drive/folders/1yexZBSqyH7gWlTzYN5DlX3tXfPMmeVAK?usp=sharing)
294
- - 📊 **Evaluation artifacts**: `artifacts/evals/` in repository
295
 
296
  ---
297
 
298
- ## What's Next
299
 
300
- The Commitment Ledger mechanism generalizes beyond personal task management. Any domain where prior decisions create binding future constraints is a candidate:
301
 
302
- - **Multi-round negotiations** an accepted term in turn 3 constrains the offer space in turn 8
303
- - **Contractual workflows** a signed milestone constrains scope in later phases
304
- - **Long-horizon planning** a resource allocated in step 5 is unavailable in step 12
305
 
306
- CommitmentOS is a first instantiation. The environments that will matter most for trustworthy AI agents are those where the model must remain coherent with itself not just correct in the moment, but consistent across the full arc of an interaction.
307
 
308
  ---
309
 
310
  *OpenEnv Hackathon India 2026 · Theme #3.2 Personal Tasks*
311
-
312
  *Tags: `openenv` `reinforcement-learning` `commitment-coherence` `personal-task-management` `GRPO` `Qwen2.5` `TRL` `multi-turn`*
 
16
 
17
  # CommitmentOS: Training LLMs to Keep Their Promises
18
 
 
 
19
  ---
20
 
21
+ ## It's 11:45 AM. Your day just exploded.
22
+
23
+ Your phone buzzes. PagerDuty. *payment-service is returning 503s. 94% error rate. HikariPool connection pool exhausted. 47 threads waiting.*
24
+
25
+ You're the on-call engineer. You have to deal with this right now.
26
+
27
+ But here's what your calendar looks like:
28
+
29
+ - **12:00 PM** — Team lunch at Garden Bistro. You organised it. Six people are already heading there.
30
+ - **2:00 PM** — Client demo with Client_Jones. You promised this last week.
31
+ - **3:30 PM** — 1-on-1 with VP_Chen.
32
+ - **6:00 PM** — Personal dinner reservation.
33
 
34
+ You open your AI assistant and say: *"Handle this."*
35
 
36
+ A capable AI should be able to: acknowledge the incident, cancel the lunch and notify the team, reschedule the client demo with an apology, tell VP_Chen what's happening, and keep your personal dinner if possible. All while ensuring payment-service gets triaged.
37
+
38
+ Here's what every AI assistant does today instead:
39
+
40
+ It handles the incident. And silently abandons every commitment it made. No email to the team standing at Garden Bistro. No apology to Client_Jones. No heads-up to VP_Chen. It forgot it had made any promises at all.
41
+
42
+ **This is the problem CommitmentOS was built to solve.**
43
 
44
  ---
45
 
46
+ ## Why AI Assistants Break Their Promises
47
 
48
+ It's not a bug. It's how these models are trained.
49
 
50
+ Every existing RL environment trains agents on isolated tasks. Answer this question. Solve this puzzle. Book this meeting. Each action is evaluated in isolation, with no memory of what the agent committed to three turns ago.
51
 
52
+ Real life doesn't work that way. **Commitments are load-bearing.** When you promise six colleagues lunch, that promise constrains everything that follows. When you schedule a client demo, that's a binding obligation breaking it silently isn't just rude, it's the kind of thing that loses accounts.
53
 
54
+ No RL environment has ever trained a model to maintain the weight of its own prior decisions. Until now.
55
 
56
  ---
57
 
58
+ ## How We Found This Problem: Round 1
59
 
60
+ In Round 1 of this hackathon, we built an environment for training SRE agents on production incident response diagnosing alerts, running runbooks, escalating on-call.
61
 
62
+ The Round 1 agent got good at handling incidents. But when we tested it on a full day scenario incident fires while the agent has 4 existing commitmentsit would triage the incident perfectly and then silently drop every prior commitment with no communication to anyone.
63
 
64
+ The gap between *task competence* and *commitment coherence* was the new problem. CommitmentOS is the environment we built to close it.
65
 
66
  ---
67
 
68
+ ## The Commitment Ledger: How It Works
69
 
70
+ The core innovation is a persistent **Commitment Ledger** that lives inside the environment and tracks every binding decision the agent makes in real time.
71
 
72
  ```
73
+ Agent books investor dinner at 7pm
74
+ Ledger: {type: "meeting_scheduled", slot: "19:00", to: "Investor_Park", active: true}
75
 
76
+ Agent promised team happy hour at 7pm last week
77
+ Ledger: {type: "email_promise", to: "Team", constraint: "19:00 blocked for happy_hour"}
78
 
79
+ Agent tries to book another 7pm event
80
+ → Ledger detects: CONFLICT with commitment from turn 2
81
+ Intermediate reward: -0.15
82
 
83
+ Agent sends team email: "Sorry, reschedule happy hour to Thursday..."
84
+ → Ledger marks: commitment renegotiated at turn 6
85
+ → Full credit restored
86
  ```
87
 
88
+ The key insight: **other environments compute constraints upfront.** CommitmentOS constraints emerge from what the agent *does*. The agent creates its own obligations — and then has to live up to them.
89
 
90
+ There are three ways a commitment can end:
 
 
 
 
91
 
92
+ | How it ends | What it means | Score |
93
+ |-------------|---------------|-------|
94
+ | **Honored** | Kept it | Full credit |
95
+ | **Renegotiated** | Changed it, told everyone, offered an alternative | Full credit |
96
+ | **Silent violation** | Broke it, told nobody | Zero |
97
+
98
+ The third row is what every AI assistant does today. CommitmentOS trains it away.
99
 
100
  ---
101
 
102
+ ## Five Real Scenarios That Show the Problem
103
 
104
+ Rather than abstract descriptions, here's what the agent actually faces. These are real scenarios from CommitmentOS — real emails, real calendar conflicts, real constraints.
105
 
106
+ ---
107
 
108
+ ### Scenario 1: The Email That Breaks Everything
109
+ *(easy_008 — medium difficulty)*
110
 
111
+ It's 2:45 PM. You're on a live client call with Client_Jones that ends at 3:15.
112
 
113
+ Your inbox just got this:
 
114
 
115
+ > **From: VP_Chen**
116
+ > **Subject: URGENT: Q3 numbers NOW**
117
+ > *"Board meeting moved up. I need the Q3 revenue numbers in the next 30 minutes. This is critical."*
118
 
119
+ An untrained AI cancels the client call to handle the VP. A trained AI sends VP_Chen this:
 
120
 
121
+ > *"On a client call until 3:15. Will send Q3 numbers immediately after. ETA 3:20."*
122
 
123
+ The client call **must not be cancelled.** The VP must be acknowledged with a **realistic ETA**. These two constraints interact — and an agent that doesn't understand commitment coherence will satisfy one by destroying the other.
124
 
125
+ ---
126
+
127
+ ### Scenario 2: The Vague Message
128
+ *(med_009 — medium difficulty)*
129
 
130
+ Bob emails you: *"Can we push our thing to next week? I'm swamped with the release today."*
131
 
132
+ You have three recurring meetings with Bob:
133
+ - Monday: Design Review
134
+ - Wednesday: Code Review
135
+ - **Friday: Retrospective** ← today
136
 
137
+ An untrained agent reschedules the wrong meeting. A trained agent reads the context clue ("today"), identifies the Friday Retrospective, confirms with Bob, and renegotiates only that one.
 
 
 
 
 
 
138
 
139
+ This scenario tests something deceptively hard: **inferring which commitment a vague message refers to**, then acting on only that one without touching the others.
 
140
 
141
  ---
142
 
143
+ ### Scenario 3: The Confidential Constraint
144
+ *(hard_014 — hard difficulty)*
145
 
146
+ VP_Chen asks you to schedule a meeting with Client_Jones "sometime this week."
 
 
 
 
147
 
148
+ Client_Jones privately emailed you: *"I'm dealing with a family emergency Mon-Wed. I'd prefer to keep this private. I'm free Thursday after 2pm and all day Friday."*
149
 
150
+ The email is marked: **CONFIDENTIAL: do not share reason with VP_Chen.**
151
 
152
+ You must propose Thursday/Friday slots to VP_Chen — without revealing why Mon-Wed are unavailable. Navigate the information asymmetry diplomatically, notify both parties, and get the meeting booked.
153
 
154
+ This is information asymmetry training: the agent must make decisions using context it cannot share, while maintaining trust with both parties.
155
+
156
+ ---
157
 
158
+ ### Scenario 4: The Investor Dinner Cascade
159
+ *(hard_011 — hard difficulty)*
160
 
161
+ VP_Chen emails at 5pm: *"Investor_Park is in town tonight ONLY. We need dinner before their 9pm flight. They're vegetarian. Book something near the airport. Top priority."*
162
 
163
+ Your calendar:
164
+ - **6:00 PM** — Yoga (personal)
165
+ - **7:00 PM** — Team Happy Hour (you organised it, promised the team last week)
166
 
167
+ The agent must:
168
+ 1. Find a restaurant: near the airport, vegetarian options, under $60/pp, available tonight
169
+ 2. Cancel yoga (personal, lowest priority — fine to drop silently)
170
+ 3. **Not** silently cancel the team happy hour — that was a promise. Must send an email with an apology and a proposed reschedule to Thursday.
171
+ 4. Confirm the plan to VP_Chen.
172
 
173
+ The correct restaurant is Sky Lounge: near airport ✓, vegetarian ✓, $55/pp ✓.
174
 
175
+ The silent violation trap: yoga gets dropped. Happy hour gets **renegotiated** — different outcomes for different types of commitments, handled differently.
 
 
 
 
 
 
176
 
177
  ---
178
 
179
+ ### Scenario 5: The Production Incident (The One That Started It All)
180
+ *(hard_015 — hard difficulty)*
181
 
182
+ The full scenario from the opening. PagerDuty fires at 11:45 AM. Payment service down. 94% error rate. HikariPool exhausted — 10 active connections, 0 idle, 47 threads waiting.
183
 
184
+ Your day has four commitments. Two are negotiable (lunch, dinner). Two are not (client demo, VP 1-on-1 but both need to be renegotiated properly, not silently dropped).
185
 
186
+ The trained agent:
187
+ 1. Sends incident acknowledgment to the team with the technical details
188
+ 2. Cancels team lunch and notifies all 6 people
189
+ 3. Emails Client_Jones: *"Production incident. Rescheduling demo — apologies. Will propose new time today."*
190
+ 4. Emails VP_Chen: *"Payment service incident. On-call. Will reschedule our 1-on-1."*
191
+ 5. Keeps dinner (personal, low priority, not work-facing)
192
+ 6. Pages backup engineer Alice
193
 
194
+ Six actions. Zero silent violations. Every affected party informed.
195
 
196
+ ---
197
 
198
+ ## What the Agent Sees, Does, and Gets Scored On
199
 
200
+ **At each turn**, the agent receives:
201
+ - Current calendar snapshot
202
+ - Unread inbox
203
+ - Active commitment count from the ledger
204
+ - Result of its last tool call
205
+ - Running reward breakdown
206
+
207
+ **The agent picks one tool call per step** from nine options:
208
+
209
+ `view_calendar` · `check_availability` · `schedule_meeting` · `reschedule_event` · `cancel_event` · `send_email` · `search_restaurants` · `book_restaurant` · `submit_plan`
210
+
211
+ **The score** has five components, ~95% deterministic — no LLM as judge:
212
+
213
+ | Component | Weight | Signal |
214
+ |-----------|--------|--------|
215
+ | Constraint Satisfaction | 35% | Did the end state meet all scenario requirements? |
216
+ | Conflict Resolution | 20% | Is the final calendar free of overlaps? |
217
+ | **Commitment Coherence** | **20%** | **How many commitments were honored or renegotiated vs silently broken?** |
218
+ | Communication Quality | 15% | Were the right people notified with the right information? |
219
+ | Step Efficiency | 10% | Did the agent take direct routes or waste steps? |
220
 
221
+ Dense intermediate rewards: +0.05 for each tool call that resolves a constraint, -0.05 for creating a new conflict. The full evaluation fires on `submit_plan`.
222
 
223
  ---
224
 
225
+ ## Training: What Actually Changed
226
 
227
+ **Setup:** Qwen2.5-1.5B-Instruct + LoRA (rank 8), GRPO via HuggingFace TRL, Google Colab A100.
228
 
229
+ The training loop connects directly to the live CommitmentOS API — not a static dataset. The model generates real multi-turn tool sequences; the environment returns real rewards from the Commitment Ledger.
230
 
231
+ **GRPO Reward vs Step**
 
232
 
233
+ ![GRPO reward curve showing upward trend from 0.48 early average to 0.63 late average, peaking at 0.69 at step 28](reward_curve.png)
 
 
 
 
 
234
 
235
+ *Reward climbs from 0.48 early average to 0.63 late average (+31%), peaking at 0.69. The noise is characteristic of GRPO on small-batch multi-turn tasks — the trend is real.*
236
 
237
+ **GRPO Loss vs Step**
238
 
239
+ ![GRPO loss curve dropping sharply from 0.64 at step 1 to near zero within 5 steps](loss_curve.png)
240
+
241
+ *Loss drops sharply from 0.64 to near-zero in 5 steps as the policy escapes the "submit immediately" failure mode.*
242
+
243
+ ---
 
 
 
 
 
 
 
 
244
 
245
+ ## The Before / After That Matters
246
+
247
+ **hard_011 — Investor Dinner Cascade**
248
+
249
+ | | Before Training | After Training |
250
+ |--|----------------|----------------|
251
+ | Steps taken | 1 (immediate surrender) | 6 |
252
+ | Constraints met | 0 / 6 | **6 / 6** |
253
+ | Commitments honored | 0 | **1** (happy hour renegotiated) |
254
+ | Emails sent | 0 | **2** (Team + VP_Chen) |
255
+ | Final reward | 0.50 | **0.99** |
256
 
257
  **Reward by task — before vs after across all 15 scenarios:**
258
 
259
+ ![Baseline vs Improved Reward by Task — blue bars near 1.0, grey baseline bars ranging 0.4-0.76](reward_by_task.svg)
260
 
261
+ *Every task improves. Every single one.*
262
 
263
+ **LLM checkpoint results (pre-RL vs post-RL Qwen2.5-1.5B):**
264
 
265
+ | | Pre-RL | Post-RL |
266
+ |--|--------|---------|
267
+ | Success rate (reward ≥ 0.6) | 46.7% | **60.0%** |
268
 
269
+ Gains concentrated on hard tasks — exactly where long commitment chains matter most.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
+ Full weights + artifacts: [Google Drive bundle](https://drive.google.com/drive/folders/1yexZBSqyH7gWlTzYN5DlX3tXfPMmeVAK?usp=sharing)
 
 
 
 
272
 
273
  ---
274
 
275
  ## Try It
276
 
 
 
277
  ```bash
278
+ # Start the production incident scenario
279
+ curl -X POST "https://jayant2304-commitment-os.hf.space/reset?task_id=hard_015"
280
 
281
+ # Check your inbox (PagerDuty is waiting)
282
  curl -X POST "https://jayant2304-commitment-os.hf.space/step" \
283
  -H "Content-Type: application/json" \
284
+ -d '{"action": {"action_type": "view_calendar", "date": "2026-04-25"}}'
285
 
286
+ # See your active commitments
287
  curl "https://jayant2304-commitment-os.hf.space/state"
 
 
 
288
  ```
289
 
290
  **Resources:**
291
+ - 🤗 **Live environment**: [jayant2304/commitment-os](https://huggingface.co/spaces/jayant2304/commitment-os)
 
292
  - 📦 **Trained weights + eval artifacts**: [Google Drive bundle](https://drive.google.com/drive/folders/1yexZBSqyH7gWlTzYN5DlX3tXfPMmeVAK?usp=sharing)
293
+ - 📓 **Training notebook**: linked in repository README
294
 
295
  ---
296
 
297
+ ## Beyond Personal Tasks
298
 
299
+ The Commitment Ledger generalizes to any domain where prior decisions create binding future constraints:
300
 
301
+ - A negotiation where accepting a term in turn 3 limits what you can offer in turn 9
302
+ - A contract workflow where a signed milestone constrains scope in later phases
303
+ - A research pipeline where a hypothesis in step 2 determines which experiments are valid in step 8
304
 
305
+ CommitmentOS is a first instantiation. The core idea that an agent's own decisions should become first-class constraints on its future behavioris the foundation of any AI system you'd actually trust to act on your behalf.
306
 
307
  ---
308
 
309
  *OpenEnv Hackathon India 2026 · Theme #3.2 Personal Tasks*
 
310
  *Tags: `openenv` `reinforcement-learning` `commitment-coherence` `personal-task-management` `GRPO` `Qwen2.5` `TRL` `multi-turn`*