You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #24 from boemer00/feature/plan-execute-pattern
fix(calendar): support 'Z' ISO timestamps; preserve fallback formatting
- utils/date_parser.iso_to_datetime:
- Normalize trailing 'Z' (UTC) to '+00:00' before datetime.fromisoformat
- Adds internal _normalize_iso_utc_z helper
- tools/tasks.list_calendar_events:
- Add _format_calendar_event_fallback to keep formatting when parsing fails
- Always include location line (📍 ...) and "(All day)" label in fallback
- tests/agent/test_graph.py:
- Align with refactor by monkeypatching `tool_node_with_state_injection`
instead of removed `create_tool_node`
Result:
- Previously failing calendar tests now pass (location and "All day" restored)
An intelligent task management agent deployed on **Google Cloud Run** with **WhatsApp interface**, powered by **LangGraph** and **GPT-4o-mini**. Features natural language date parsing, multi-user support, and Google Calendar integration. Built to demonstrate production-ready AI engineering skills.
9
+
An intelligent task management agent deployed on **Google Cloud Run** with **WhatsApp interface**, powered by **LangGraph** and **GPT-4o-mini**. Features **Plan-Execute architecture** for complex multi-step requests, natural language date parsing, multi-user support, and Google Calendar integration. Built to demonstrate production-ready Agentic AI engineering skills.
@@ -26,9 +26,10 @@ An intelligent task management agent deployed on **Google Cloud Run** with **Wha
26
26
27
27
## ⚡ Key Features
28
28
29
+
-**🧠 Plan-Execute Architecture** - Agent breaks down complex requests into multi-step plans (NEW!)
29
30
-**🚀 Production Deployment** - Fully deployed on Google Cloud Run with HTTPS endpoints
30
31
-**💬 WhatsApp Interface** - Natural conversational UI via Twilio WhatsApp API
31
-
-**🧠 LangGraph Agent** - ReAct pattern with state management and checkpointing
32
+
-**🔄 Advanced Agent Patterns** - ReAct loop with planning, reflection, and state management
32
33
-**🗄️ Cloud-Native Storage** - SQLite databases synced to Cloud Storage
33
34
-**🌍 Multi-User Support** - Isolated task lists per user with phone number hashing
34
35
-**⏰ Smart Date Parsing** - "tomorrow at 2pm", "next Friday", "in 3 hours"
@@ -134,14 +135,11 @@ ngrok http 8080
134
135
135
136
---
136
137
137
-
## 💬 Example Interaction
138
+
## 💬 Example Interactions
138
139
140
+
### Simple Request (Direct Execution)
139
141
```
140
-
User: Hi!
141
-
Agent: 👋 Hi! I'm your task assistant...
142
-
143
142
User: remind me to buy kombucha tomorrow at 2pm
144
-
Agent: Working on it.
145
143
Agent: ✓ Reminder set: 'buy kombucha' for Thursday, October 31, 2025 at 02:00 PM
146
144
147
145
User: show my tasks
@@ -152,11 +150,51 @@ User: mark 1 as done
152
150
Agent: ✓ Marked task #1 as done: 'buy kombucha'
153
151
```
154
152
153
+
### Complex Request (Plan-Execute Pattern) 🆕
154
+
```
155
+
User: organize my tasks for this week
156
+
157
+
Agent: [Internal] Creating plan...
158
+
📋 Plan:
159
+
1. List all current tasks
160
+
2. Check which tasks have due dates
161
+
3. Prioritize tasks by deadline
162
+
4. Suggest a schedule for the week
163
+
164
+
Agent: Let me help organize your week. First, let me see what you have...
165
+
[Executes: list_tasks()]
166
+
167
+
I found 5 tasks:
168
+
- Project report (Due: Nov 4, 2pm) 🔴 URGENT
169
+
- Review PRs (Due: Nov 4, 4pm)
170
+
- Buy groceries (Due: Nov 5, 2pm)
171
+
- Call dentist (no deadline)
172
+
- Email team (no deadline)
173
+
174
+
Agent: [Reflection: Step 1 complete → Moving to step 2]
175
+
176
+
Agent: Now let me prioritize by urgency...
177
+
178
+
Here's your organized week:
179
+
180
+
**Monday (Nov 4):**
181
+
- 2pm: Finish project report ⚡
182
+
- 4pm: Review pull requests
183
+
184
+
**Tuesday (Nov 5):**
185
+
- 2pm: Buy groceries
186
+
- Evening: Call dentist, email team
187
+
188
+
You have 2 urgent tasks today! Would you like me to set reminders?
189
+
```
190
+
191
+
**Key Difference**: Complex requests trigger the Plan-Execute pattern, where the agent creates a multi-step plan and systematically works through it with reflection after each step.
-**"Explain your Plan-Execute implementation"** → Complex requests trigger planner node → LLM creates numbered plan → agent executes step-by-step → reflection node tracks progress → repeats until plan complete. Simple requests bypass planning for efficiency.
324
+
-**"Why Plan-Execute over simple ReAct?"** → Handles multi-step goals (e.g., "organize my week"), improves task decomposition, shows structured thinking. Demonstrates understanding of advanced agentic patterns beyond basic tool calling.
325
+
-**"How does reflection work?"** → After each tool execution, reflection node checks: (1) Did we complete current step? (2) Move to next step or finish? (3) Clear plan when done. Keeps agent focused on structured goals.
326
+
-**"Show me the agent flow"** → START → should_plan() router → [planner OR agent] → agent → tools → should_reflect() router → [reflection OR agent] → loop until END. Conditional routing based on request complexity and plan state.
327
+
284
328
**Architecture & Design**
285
-
-**"Why LangGraph over pure LLM calls?"** → State persistence, checkpointing for conversation memory, built-in tool calling, conditional routing
286
-
-**"Explain the ReAct pattern"** → Reasoning (LLM thinks) → Acting (execute tools) → Observation (tool results) → repeat until done
287
-
-**"How does Cloud Run handle statelessness?"** → Databases synced to Cloud Storage on startup/shutdown, ephemeral containers
329
+
-**"Why LangGraph over pure LLM calls?"** → State persistence, checkpointing for conversation memory, built-in tool calling, conditional routing, Plan-Execute pattern support
330
+
-**"Explain the ReAct pattern"** → Reasoning (LLM thinks) → Acting (execute tools) → Observation (tool results) → repeat until done. Enhanced with planning for complex requests.
331
+
-**"How does Cloud Run handle statelessness?"** → Databases synced to Cloud Storage on startup/shutdown, ephemeral containers, checkpointer maintains conversation state
288
332
289
333
**Production Considerations**
290
334
-**"How do you handle Cloud Run cold starts?"** → First message gets "Working on it" acknowledgment within 100ms, then full response after agent processing
0 commit comments