Skip to main content
←Back to work

AI Task Manager Agent

Conversational agent that extracts, prioritizes, and manages tasks from natural language, backed by a reliable state-machine architecture.

Role
Backend and AI engineering
Scope
Guarded agent workflow with persistent task state
Core stack
Node.js · TypeScript · MongoDB · LLM Function Calling

What the project delivers

AI Task Manager Agent is a conversational task-management assistant that turns natural-language requests into structured, persisted tasks rather than saving raw messages as titles. A message like 'I have to submit my final project tomorrow' is cleaned of filler phrases such as 'I have to,' 'remind me to,' or 'please,' and converted into a clear task title with an inferred priority and optional due date.

The agent follows a strict state-machine workflow — plan, action, observation, output — and is restricted to a whitelist of approved functions (saveTask, getTasks, completeTask, deleteTask), with loop detection and a five-iteration cap to prevent runaway reasoning cycles. Malformed LLM output is automatically repaired, handling invalid JSON, escaped quotes, unicode issues, and stray markdown code fences before parsing.

The system prevents duplicate pending tasks, supports fuzzy, case-insensitive matching so users can complete or delete tasks without typing exact titles, and groups results into a pending/completed dashboard view with emoji-coded priorities. Tasks are persisted in MongoDB with title, priority, status, due date, and timestamp fields, so state survives restarts and remains available across sessions.

Engineering implementation

  • Duplicate pending-task detection and prevention
  • Loop detection and 5-iteration cap to prevent runaway reasoning
  • Function whitelisting restricted to saveTask, getTasks, completeTask, deleteTask
  • Persistent MongoDB storage surviving restarts across sessions

Product capabilities

  • Natural-language task extraction (strips filler phrases like 'I need to', 'remind me to')
  • Automatic priority inference with emoji-coded levels (high, medium, low)
  • Optional due-date parsing and display
  • Fuzzy, case-insensitive task matching for completing/deleting tasks
  • Grouped pending/completed task dashboard with summary counts
  • Plan → Action → Observation → Output agent workflow
  • Safe JSON repair for malformed LLM responses (invalid JSON, escaped quotes, markdown fences)

Tech Stack

  • Node.js
  • TypeScript
  • MongoDB
  • LLM Function Calling
  • State Machine Architecture

Project links