planmyday
AI-powered daily planning agent built from scratch with Python and OpenAI
Technologies
Overview
planmyday is a conversational daily planning tool that helps structure your day through dialogue. Unlike static planning apps with forms to fill out, it asks clarifying questions, pushes back on unrealistic schedules, and remembers your preferences over time.
Built entirely from scratch—no LangChain, no agent frameworks. Just Python, the OpenAI API, and a state machine.
What I Built
State Machine Architecture
The core of planmyday is a state machine that controls the conversation flow:
- •Idle — Waiting for user to describe their day
- •Questions — Asking clarifying questions about priorities and constraints
- •Planning — Generating a structured schedule
- •Feedback — Iterating based on user input
- •Done — Final plan delivered
This pattern makes the agent feel like a collaborator rather than a text box—it decides what to do next based on context, not just the last message.
Structured Outputs
Used OpenAI's structured output feature with Pydantic to guarantee reliable, validated responses. No regex parsing, no hoping the LLM returns valid JSON. The model either returns a properly typed object or fails cleanly.
Profile & Persistence
The agent learns and remembers:
- •User preferences and recurring commitments
- •Session context that persists between conversations
- •Historical patterns to improve suggestions over time
Check-in System
Added follow-up functionality to ask whether plans were actually executed—closing the loop between planning and reflection.
Why No Frameworks
Frameworks like LangChain are powerful but hide what's actually happening. When something breaks, you're debugging abstractions instead of understanding fundamentals.
Building from scratch meant understanding exactly how agents work: the loop, the state, the decisions, the memory. That knowledge transfers to any framework or tool.
Learnings
For a deeper dive into the design decisions and lessons learned building planmyday, read Building an AI Agent from Scratch.