AI agents become more useful when they are not just chatbots, but small systems that can understand a request, call tools, retrieve knowledge, and return structured results.
For this example, we built a Personal Study Planner Agent with HazelJS.
The goal is simple:
A student gives their exam date, available study time, and weak topics. The agent creates a realistic study plan.
This is an easy project, but it still shows important HazelJS agent patterns.
What the Project Includes
The project uses:
@hazeljs/corefor modules, controllers, and services
@hazeljs/agentfor agents, tools, delegation, and supervisor routing
@hazeljs/ragfor study-method retrieval
@hazeljs/guardrailsfor safer input/output handling
@hazeljs/evalfor golden tests
@hazeljs/inspectorfor the/__hazelweb view
The app has four agents:
StudyIntakeAgentStudyResourceAgentStudyScheduleAgentStudyCoachAgent
Each agent has a focused job.
Why This Example Works Well
A study planner is simple enough to understand quickly, but it still has a real workflow:
- Extract study constraints
- Find useful study methods
- Build a schedule
- Return a clear plan
That makes it a good beginner-friendly HazelJS agent example.
A sample request looks like this:
I have 10 days before my algebra exam. I can study 60 minutes daily. Weak topics are quadratic equations and word problems.
The system can extract the exam, timeline, daily capacity, weak topics, and urgency.
Agent 1: Study Intake
The first agent is StudyIntakeAgent.
Its job is to understand the student’s request.
@Agent({
name: 'StudyIntakeAgent',
description: 'Extracts exam goals, time constraints, weak topics, learning style, and urgency.',
})
@Service()
export class StudyIntakeAgent {
@Tool({
name: 'extractStudyProfile',
description: 'Extract structured study planning information from a student request.',
})
async extractStudyProfile(input: { message: string; studentId?: string }) {
// Extract exam, days, minutes, weak topics, and urgency
}
}
This keeps profile extraction separate from schedule creation.
That is a good agent design pattern: one agent, one responsibility.
Agent 2: Study Resources with RAG
The second agent is StudyResourceAgent.
It uses AI integrations.
Final Thoughts
This project is intentionally simple, but it shows strong HazelJS agent patterns:
- focused agents
- scoped tools
- RAG-backed knowledge
- delegation
- supervisor routing
- guardrails
- runtime observability
- evals
That makes the Personal Study Planner Agent a good beginner-friendly example for learning how to build practical AI agents with HazelJS.
Repo: Personal Study Planner
SOCIAL SHARE CARD GENERATOR