Why real AI agents don't wait for you to click a button. A deep dive into Elani's worker-based architecture, cron triggers, and structured decision-making.
The standard mental model for AI applications is still deeply rooted in the "Client-Server" era.
User types prompt -> Server runs LLM -> Response returns.
This is fine for a chatbot. It is insufficient for an Agent.
If an "agent" only works when you explicitly tell it to do something, it's not an agent—it's a tool. A true agent works while you sleep. It anticipates needs, monitors streams, and acts without a trigger from the user.
At Elani, we realized that building a "Personal AI Productivity Agent" meant throwing out the standard API-first architecture. We didn't need a better chatbot; we needed a fleet of autonomous workers.
In a typical chat app, the user is the Driver. The system is dormant until an event (a message) occurs.
But productivity isn't reactive.
To achieve this, we moved the "Driver" from the user to the infrastructure itself.
Elani is built on a monorepo of specialized Cloudflare Workers. Unlike a monolithic API that waits for HTTP requests, these workers operate primarily on Cron Triggers and Queues.
scheduler-worker)The scheduler-worker is the pacemaker of our system. It doesn't wait for you. It wakes up on a schedule:
shared-utils/classifiers)When a worker wakes up, it doesn't just "ask an LLM." It invokes specific, structured classifiers.
We don't send free-form text to the model. We use strictly typed Zod Schemas to force the AI to think in data structures.
TopicNotificationClassifier: Determines if a topic update is worth your attention right now.OnboardingFactsClassifier: Extracts durable facts about you (timezone, role, preferences) to update your long-term memory.Context is maintained across workers using D1 (our SQL database) and Vectorize (our embedding database).
When scheduler-worker runs a scan, it doesn't just look at the last hour. It pulls from the User Graph—understanding that "The Project" refers to the Q3 initiative you mentioned three weeks ago.
This architecture allows for what we call Silent Intelligence.
When you log into Elani, you aren't greeting a blank chat box. You are stepping into a workspace that has already been prepared for you.
You verify. You approve. You execute.
We believe the future of AI isn't a smarter chatbot that you talk to for hours. It's a system that requires less talking.
By shifting from "On-Demand" to "Always-On" worker architecture, we are building software that respects the most finite resource you have: your attention.