{"slug": "building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs", "title": "Building a Home Maintenance Scheduler Agent in typescript with HazelJS", "summary": "A developer built a Home Maintenance Scheduler Agent using HazelJS to help homeowners manage maintenance tasks through intelligent scheduling, provider matching, and reminders. The agent uses a multi-agent architecture with RAG-powered task search and a supervisor for coordination. It includes production-ready features like semantic search and automated reminders.", "body_md": "Home maintenance is one of those tasks that everyone knows they should do regularly, but few actually manage to keep up with. Between changing HVAC filters, cleaning gutters, inspecting roofs, and coordinating service providers, it's easy for important maintenance tasks to slip through the cracks. In this post, we'll build a Home Maintenance Scheduler Agent using HazelJS that helps homeowners stay on top of their maintenance needs through intelligent task scheduling, provider matching, and reminder coordination.\n\nHomeowners face several challenges when it comes to maintenance:\n\nOur agent will address these challenges using HazelJS's multi-agent architecture, RAG-powered task search, and intelligent scheduling capabilities.\n\nThe Home Maintenance Scheduler Agent uses a multi-agent architecture where each agent specializes in a specific aspect of maintenance planning:\n\nThis separation of concerns allows each agent to focus on its specialty while the supervisor ensures smooth coordination between them.\n\nOne of the key features of our agent is the ability to search through a database of maintenance tasks using Retrieval-Augmented Generation (RAG). We maintain a knowledge base of maintenance tasks with metadata including:\n\nWhen a homeowner asks about maintenance needs, the TaskSearchAgent uses semantic search to find relevant tasks based on their query. For example, a query like \"Find HVAC maintenance tasks\" would return tasks related to HVAC filter replacement, system inspections, and seasonal maintenance.\n\nThe RAG implementation uses HazelJS's `RAGPipeline`\n\nwith a `MemoryVectorStore`\n\nfor efficient semantic search:\n\n```\n@Service()\nexport class MaintenanceKnowledgeBaseService {\n  private readonly embeddings = new LocalMaintenanceEmbeddingProvider();\n  private readonly vectorStore = new MemoryVectorStore(this.embeddings);\n  private readonly rag = new RAGPipeline({\n    vectorStore: this.vectorStore,\n    embeddingProvider: this.embeddings,\n    topK: 3,\n  });\n\n  async answer(query: string, topK = 3) {\n    const sources = await this.search(query, topK);\n    return {\n      answer: sources.map((source) => source.content).join('\\n\\n'),\n      sources: sources.map((source) => ({\n        id: source.id,\n        score: Number(source.score.toFixed(3)),\n        category: source.metadata?.category,\n        frequency: source.metadata?.frequency,\n        difficulty: source.metadata?.difficulty,\n        season: source.metadata?.season,\n        priority: source.metadata?.priority,\n      })),\n    };\n  }\n}\n```\n\nThe TaskSchedulerAgent takes the retrieved tasks and creates a realistic maintenance schedule based on:\n\nThe scheduler calculates optimal dates for each task and provides a summary including total estimated duration, cost, and number of high-priority tasks. It also generates maintenance tips specific to the category of maintenance being scheduled.\n\nFor tasks that require professional services, the ProviderSearchAgent finds suitable service providers based on:\n\nThe agent ranks providers by rating and provides contact information, services offered, and pricing details. This helps homeowners make informed decisions when hiring professionals for maintenance tasks.\n\nThe ReminderCoordinatorAgent sets up automated reminders for maintenance tasks. It considers:\n\nThe agent generates a reminder schedule with notification settings, ensuring homeowners never miss important maintenance deadlines.\n\nThe HomeManagerAgent uses HazelJS's supervisor routing to coordinate between the specialist agents. When a homeowner makes a request, the supervisor analyzes the request and routes it to the appropriate specialist:\n\nThe supervisor continues delegating until it has gathered enough information to provide a comprehensive response, then synthesizes the results into a cohesive maintenance plan.\n\nDespite being a demo, the agent includes production-ready features:\n\nThe agent can be run with:\n\n```\nnpm install\nnpm run build\nnpm run dev\n```\n\nThe app runs on `http://localhost:3000`\n\nwith the HazelJS Inspector available at `/__hazel`\n\nfor real-time monitoring and debugging.\n\nYou can test the agent with a curl request:\n\n```\ncurl -s -X POST http://localhost:3000/maintenance/supervisor \\\n  -H 'content-type: application/json' \\\n  -d '{\"message\":\"I have a house, need plumbing maintenance, budget $500, prefer DIY. Schedule my maintenance.\",\"userId\":\"homeowner-1\"}'\n```\n\nThe agent will analyze your request, extract your maintenance profile, search for relevant tasks, create a schedule, find providers if needed, and set up reminders—all coordinated through the supervisor routing system.\n\n**Complete Project:** [Home Maintenance Scheduler Agent](https://github.com/nisafatimaa/home-maintenance-scheduler-agent)\n\nThe Home Maintenance Scheduler Agent demonstrates several key HazelJS capabilities:\n\nThis agent shows how [HazelJS](https://hazeljs.ai) can be used to build practical, everyday applications that solve real problems while maintaining production-grade quality and reliability.", "url": "https://wpnews.pro/news/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs", "canonical_source": "https://dev.to/nisa_fatima_bcd75fa085b76/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs-5c3f", "published_at": "2026-07-14 19:17:40+00:00", "updated_at": "2026-07-14 19:29:59.876880+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "natural-language-processing", "machine-learning"], "entities": ["HazelJS", "TaskSearchAgent", "TaskSchedulerAgent", "ProviderSearchAgent", "ReminderCoordinatorAgent", "HomeManagerAgent", "RAGPipeline", "MemoryVectorStore"], "alternates": {"html": "https://wpnews.pro/news/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs", "markdown": "https://wpnews.pro/news/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs.md", "text": "https://wpnews.pro/news/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs.txt", "jsonld": "https://wpnews.pro/news/building-a-home-maintenance-scheduler-agent-in-typescript-with-hazeljs.jsonld"}}