The AI does not simply save raw user messages as task titles.
Instead, it extracts meaningful task names from natural language.
User Input:
I have to submit my final project tomorrow
Extracted Task:
Submit My Final Project
The system automatically removes phrases such as:
I have to
I need to
Remind me to
Please
Add task
Create task
New task
I should
I must
Supported priorities:
| Priority | Icon |
|---|---|
| High | 🔴 |
| Medium | 🟡 |
| Low | 🟢 |
Example:
{
"title": "Submit report",
"priority": "high"
}Tasks can include optional due dates.
Example:
{
"title": "Submit report",
"dueDate": "2026-06-15"
}Response:
✅ Task saved: "Submit Report" 🔴 high priority | 📅 Due: Mon Jun 15 2026
The system prevents duplicate pending tasks.
Example:
User: I need to buy groceries
If the task already exists:
⚠️ Task "Buy Groceries" already exists and is pending.
When completing or deleting tasks, exact names are not required.
Example:
Existing Task:
Buy Groceries For Weekend
User:
Complete groceries
The system performs a case-insensitive search and finds the correct task.
Supported statuses:
pending
done
Task Lifecycle:
Create Task
↓
Pending
↓
Complete Task
↓
Done
When listing tasks, results are grouped automatically.
Example:
📋 PENDING TASKS
1. 🔴 Submit Report
2. 🟡 Buy Groceries
✅ COMPLETED TASKS
1. ✓ Call Doctor
📊 Summary: 2 pending, 1 completed
The task agent follows a strict state-machine architecture.
User
↓
Plan
↓
Action
↓
Observation
↓
Output
Supported Actions:
saveTask
getTasks
completeTask
deleteTask
Prevents infinite reasoning cycles.
if (sameTypeCount > 2) {
return state.observation;
}Maximum:
5 iterations
per request.
Only approved functions may execute.
saveTask;
getTasks;
completeTask;
deleteTask;The agent automatically repairs malformed LLM responses:
- Invalid JSON
- Escaped quotes
- Unicode issues
- Markdown code blocks
Tasks are persisted in MongoDB.
Task Schema Fields:
title;
priority;
status;
dueDate;
createdAt;
updatedAt;This allows tasks to survive application restarts and remain available across sessions.
User:
I need to submit my assignment tomorrow
AI:
✅ Task saved: "Submit My Assignment" 🔴 high priority
User:
Show my pending tasks
AI:
📋 PENDING TASKS
1. 🔴 Submit My Assignment
2. 🟡 Buy Groceries
📊 Summary: 2 pending, 0 completed
User:
I finished the assignment
AI:
🎉 Task completed: "Submit My Assignment"! Great job! ✅
User:
Delete groceries
AI:
🗑️ Task deleted: "Buy Groceries"