Skip to content

Repository files navigation

Rewind — your day, scheduled like an OS

Website · Dashboard · Screenshots

Python 3.11+ FastAPI Next.js 16 Fetch.ai uAgents Composio ElevenLabs Claude Redis MIT License

Rewind — AI-Powered Agentic Scheduling Engine

Every productivity tool helps you make a plan. Rewind is the one that helps when the plan breaks.

Rewind is an operating system for your life, built for people with ADHD. It is a multi-agent system that manages your schedule with an OS-inspired three-tier scheduling engine. It monitors your Google Calendar, Gmail, and Slack in real-time, detects disruptions, rebalances your day, and can even draft and send emails or messages on your behalf — all while learning your behavioral patterns and energy levels.

Built with Fetch.ai uAgents, Composio, and ElevenLabs voice AI.

Voice commands through Meta Ray-Ban glasses

Voice control through Meta Ray-Ban glasses

GhostWorker drafts and sends an email from the schedule

The Scheduler Kernel hands off a task, GhostWorker drafts the email, you approve it, it gets sent


Screenshots

Dashboard Agent activity
Dashboard with today's prioritized tasks and backlog Agent activity feed with Scheduler Kernel and GhostWorker events
GhostWorker draft review Calendar
Pending email draft awaiting approval Weekly calendar view
Profile (Profiler Agent) Integrations (Composio)
Profile with success plot, behavioral traits, energy curve, adherence score Google Calendar, Gmail, Slack and LinkedIn integrations
Schedule through Meta glasses Voice via Meta glasses
Schedule seen through Meta Ray-Ban glasses Issuing a voice command through Meta Ray-Ban glasses

The Problem

6.1 million adults in the U.S. are diagnosed with ADHD. Diagnosis isn't the hard part. With the executive dysfunction that comes with ADHD, starting can feel impossible even when you know exactly what you need to do. The planning isn't the problem; the problem is what happens when the plan breaks.

Two members of our team live with ADHD. We've tried every productivity system: Notion databases, time-blocking in Google Calendar, even gamified to-do apps. They all fail the same way: they help you plan, then abandon you the moment something goes wrong.

A meeting runs 15 minutes over. You space out for 10. By the time you've replanned, 45 minutes are gone, and your momentum with it.

That is exactly the moment Rewind targets: the 15–30 minutes after a disruption, when the plan breaks and you're silently stuck, with no idea what to do next.

The Idea: An Operating System for Your Life

We realized this isn't a willpower problem. It's a working-memory problem, and computers solved a version of it long ago. When processes compete for limited CPU time and interrupts fire unexpectedly, an operating system doesn't panic. It relies on scheduling algorithms:

  • Long-Term Schedulers plan allocation.
  • Medium-Term Schedulers handle swaps.
  • Short-Term Schedulers decide what runs right now.

They don't delete processes when something changes; they adapt and reschedule them. Rewind applies the same model to human productivity.

Built from clinical research, not a feature list

Each workflow maps to an ADHD challenge documented in clinical research:

Rewind workflow ADHD challenge it addresses
Disruption Detection Disruption paralysis
Auto-Rescheduling Cognitive overload from replanning
Estimation Correction Time blindness
Energy-Aware Scheduling Working memory limitations

Real-time response: from the moment a meeting runs over to a nudge appearing on screen takes under 3 seconds. That's fast enough to catch someone before they spiral into doom-scrolling.


Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        Frontend (Next.js)                       │
│  Dashboard · Calendar · Integrations · Profile · Voice Agent    │
│                    ↕ WebSocket + REST API                       │
├─────────────────────────────────────────────────────────────────┤
│                   FastAPI Server (port 8000)                    │
│          REST endpoints · WebSocket manager · Redis             │
├─────────────────────────────────────────────────────────────────┤
│                    uAgents Framework (Fetch.ai)                 │
│                                                                 │
│  ┌──────────────┐    ┌──────────────────┐    ┌──────────────┐  │
│  │   Context     │───▶│   Disruption     │───▶│  Scheduler   │  │
│  │   Sentinel    │    │   Detector       │    │  Kernel      │  │
│  │  (port 8004)  │    │  (port 8001)     │    │ (port 8002)  │  │
│  └──────────────┘    └──────────────────┘    └──────┬───────┘  │
│         ▲                     ▲                     │          │
│         │              ┌──────┴───────┐             ▼          │
│  ┌──────┴───────┐      │   Profiler   │      ┌────────────┐   │
│  │   Composio    │      │   Agent      │      │ GhostWorker│   │
│  │  (Gmail, Cal, │      └──────────────┘      │ (autonomous│   │
│  │  Slack, etc.) │                             │  execution)│   │
│  └──────────────┘      ┌──────────────┐       └────────────┘   │
│                        │   Energy      │                        │
│                        │   Monitor     │                        │
│                        └──────────────┘                         │
│                        ┌──────────────┐                         │
│                        │   Reminder    │                         │
│                        │   Agent       │                         │
│                        └──────────────┘                         │
├─────────────────────────────────────────────────────────────────┤
│              Three-Tier Scheduling Engine                       │
│     LTS (daily plan) → MTS (disruption recovery) → STS (MLFQ)  │
└─────────────────────────────────────────────────────────────────┘

Agents

Context Sentinel

Polls Google Calendar, Gmail, and Slack via Composio every 60 seconds. Detects context changes (meetings ending early, new emails, schedule conflicts) and emits ContextChangeEvent messages downstream.

Disruption Detector

Classifies context changes by severity: minor (a meeting ran 5 min over), major (a meeting was cancelled), or critical (an urgent Slack from your manager). Calculates freed or lost minutes from schedule changes. Queries the Profiler Agent for user patterns to improve classification. Emits DisruptionEvent to the Scheduler Kernel.

Scheduler Kernel

The brain of Rewind. Orchestrates the three-tier scheduling engine:

  • LTS — Daily planning: pulls tasks from backlog into today's schedule
  • MTS — Disruption recovery: swaps tasks between active schedule and backlog
  • STS — Real-time execution ordering via MLFQ with energy constraints

Auto-delegates P3 (low priority) tasks to GhostWorker when energy is low.

Profiler Agent

Learns implicit behavioral patterns (such as your actual peak hours, not when you think you're productive, and how much you underestimate tasks) from task completion logs, schedule adherence, and external data (LinkedIn, GitHub, daily reflections). Outputs a UserProfile with peak hours, average task durations, energy curve, adherence score, distraction patterns, and estimation bias. Categorizes users into archetypes: Compounding Builder, Reliable Operator, Emerging Talent, or At Risk.

Energy Monitor

Infers energy level (1-5) from behavioral signals: circadian baseline (time-of-day), task completion velocity, and user-reported energy (with 2-hour decay). Caches in Redis for real-time scheduling decisions. The goal: never assign a task your brain can't handle right now.

GhostWorker

Autonomously executes delegated tasks — email replies, Slack messages, LinkedIn posts, appointment cancellations. Drafts are created for approval before execution, and you approve them with one tap. Uses Composio for delivery. Supports FET micropayments via Fetch.ai Payment Protocol.

Reminder Agent

LLM-powered proactive notifications via Claude. Evaluates schedule context every 120 seconds and generates contextual reminders (upcoming tasks, check-ins, transitions). Respects snooze periods and cooldowns.


Three-Tier Scheduling Engine

Inspired by Linux OS process scheduling:

Tier Trigger Purpose Algorithm
LTS Daily / on-demand Admit tasks from backlog to active schedule Weighted scoring (deadline urgency 40%, priority 30%, peak hours 15%, SJF duration 15%) + estimation-bias correction + bin-packing
MTS Every disruption Swap tasks between active and backlog SWAP-IN (freed time) / SWAP-OUT (lost time) with energy-aware filtering
STS Continuous Order active tasks for execution 4-level MLFQ (P0-P3), deadline urgency sorting, energy constraints, auto-delegation

Features

  • Real-time schedule adaptation — Calendar changes trigger automatic rebalancing
  • Energy-aware scheduling — Never assigns high-load tasks when energy is low
  • Autonomous task execution — GhostWorker drafts emails, Slack messages, and more
  • Voice interface — ElevenLabs conversational AI for hands-free task management
  • Behavioral profiling — Learns your patterns over a 14-day sliding window
  • Task creation — Dashboard form, voice commands, or API
  • Google Calendar sync — New tasks automatically create calendar events
  • WebSocket real-time updates — Dashboard updates instantly on any change
  • OAuth integrations — Gmail, Google Calendar, Slack, LinkedIn via Composio
  • Draft review — Approve, edit, or reject GhostWorker drafts before they're sent

Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS 4
Backend FastAPI, Python 3.11+, uvicorn
Agents Fetch.ai uAgents framework
Integrations Composio SDK (Gmail, Google Calendar, Slack, LinkedIn)
Voice ElevenLabs Conversational AI + LiveKit WebRTC
LLM Anthropic Claude (Reminder Agent reasoning)
Database Redis (task storage, state caching, vector indexes)
Charts Recharts (profile visualizations)

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Redis server
  • API keys: Composio, ElevenLabs, Anthropic

1. Install

git clone https://github.com/Tar-ive/rewind.git
cd rewind

# Backend
python -m venv .venv
source .venv/bin/activate
pip install -e .

# Frontend
cd frontend
npm install

2. Configure

Create .env in the project root:

# Redis
REDIS_URL=redis://localhost:6379

# Composio
COMPOSIO_API_KEY=
COMPOSIO_USER_ID=rewind-user-001
GOOGLE_CALENDAR_AUTH_CONFIG_ID=
GMAIL_AUTH_CONFIG_ID=
SLACK_AUTH_CONFIG_ID=
LINKEDIN_AUTH_CONFIG_ID=
COMPOSIO_CALLBACK_URL=http://localhost:3000/auth/callback

# ElevenLabs
ELEVENLABS_API_KEY=
ELEVENLABS_AGENT_ID=

# Anthropic
ANTHROPIC_API_KEY=

# Deployment: "local" or "agentverse"
AGENT_DEPLOY_MODE=local
AGENT_ENDPOINT_BASE=http://localhost

3. Run

# Terminal 1: Redis
redis-server

# Terminal 2: Backend
source .venv/bin/activate && cd backend
python -m uvicorn src.server:app --host 0.0.0.0 --port 8000 --reload

# Terminal 3: Agents
source .venv/bin/activate && cd backend
python -m src.agents.factory

# Terminal 4: Frontend
cd frontend && npm run dev

Open http://localhost:3000 for the landing page, or http://localhost:3000/dashboard for the app.


Deploying to Agentverse

All agents are pre-configured for Agentverse deployment via the mailbox pattern.

1. Set deployment mode

AGENT_DEPLOY_MODE=agentverse

2. Run agents with mailbox

source .venv/bin/activate && cd backend
python -m src.agents.factory

Each agent prints a link to the Local Agent Inspector.

3. Connect to Agentverse

For each agent:

  1. Open the Inspector URL printed in the terminal
  2. Click Connect → select Mailbox
  3. The agent is now registered and can receive messages while offline

4. Update agent addresses

After registration, update .env with the permanent Agentverse addresses:

DISRUPTION_DETECTOR_ADDRESS=agent1q...
SCHEDULER_KERNEL_ADDRESS=agent1q...
PROFILER_AGENT_ADDRESS=agent1q...
ENERGY_MONITOR_ADDRESS=agent1q...
GHOST_WORKER_ADDRESS=agent1q...
REMINDER_AGENT_ADDRESS=agent1q...

5. (Optional) Publish to Marketplace

Add to each agent for discoverability:

agent = Agent(
    name="rewind-scheduler-kernel",
    seed=SCHEDULER_KERNEL_SEED,
    mailbox=True,
    readme_path="README.md",
    publish_agent_details=True
)

Deployment Options

Method Infrastructure Best for
Local Your machine Development
Mailbox Local + Agentverse message buffer Production with your own infra
Hosted Agentverse cloud Lightweight agents, zero infra
Proxy Local + Agentverse visibility Marketplace discoverability

See the uAgents deployment guide and Agentverse docs for more details.


Project Structure

rewind/
├── backend/src/
│   ├── agents/           # 7 uAgents
│   │   ├── context_sentinel.py
│   │   ├── disruption_detector.py
│   │   ├── scheduler_kernel.py
│   │   ├── profiler_agent.py
│   │   ├── energy_monitor.py
│   │   ├── ghost_worker.py
│   │   ├── reminder_agent.py
│   │   └── factory.py        # Agent launcher
│   ├── engine/           # Scheduling algorithms
│   │   ├── lts.py            # Long-Term Scheduler
│   │   ├── mts.py            # Medium-Term Scheduler
│   │   ├── sts.py            # Short-Term Scheduler (MLFQ)
│   │   └── task_buffer.py    # Redis task storage
│   ├── models/
│   │   ├── task.py           # Task dataclass + Redis persistence
│   │   └── messages.py       # Inter-agent message types
│   ├── services/
│   │   └── composio_service.py  # Gmail, Calendar, Slack, LinkedIn
│   ├── config/
│   │   └── settings.py       # Environment config
│   ├── data_pipeline/        # Data parsing + embeddings
│   └── server.py             # FastAPI + WebSocket server
├── frontend/src/
│   ├── app/              # Pages
│   │   ├── page.tsx          # Landing page (problem, idea, features, team)
│   │   └── (app)/            # App shell with sidebar + voice agent
│   │       ├── dashboard/        # Dashboard (Today + Backlog + Voice)
│   │       ├── calendar/         # Google Calendar view
│   │       ├── integrations/     # OAuth connections
│   │       ├── profile/          # Behavioral insights
│   │       └── auth/callback/    # OAuth callback
│   ├── components/
│   │   ├── landing/          # Landing page sections + graphics
│   │   ├── VoiceAgent.tsx    # ElevenLabs voice interface
│   │   ├── TaskInput.tsx     # Task creation form
│   │   ├── DraftReview.tsx   # GhostWorker draft review
│   │   └── AgentActivityLog.tsx
│   └── lib/
│       ├── useScheduleStore.ts   # State management
│       ├── useWebSocket.ts       # Real-time connection
│       └── useElevenLabsAgent.ts # Voice agent hook
├── data/                 # LinkedIn exports, goals, reflections
├── docs/assets/          # Banner, demo GIFs, screenshots
├── .env                  # Configuration
└── pyproject.toml        # Python dependencies

API

Method Endpoint Description
GET /api/schedule Active tasks + backlog + energy
POST /api/tasks Create task (→ Redis + Calendar)
DELETE /api/tasks/{id} Remove task
POST /api/tasks/{id}/complete Mark complete
POST /api/tasks/{id}/start Start task
POST /api/schedule/plan-day Trigger LTS planning
POST /api/disruption Report disruption
POST /api/energy Update energy level
GET /api/calendar/events Google Calendar events
POST /api/calendar/events Create calendar event
GET /api/ghostworker/drafts Pending drafts
POST /api/ghostworker/drafts/{id}/approve Approve draft
POST /api/ghostworker/drafts/{id}/reject Reject draft
GET /api/auth/status Connected integrations
POST /api/auth/connect/{app} Start OAuth
POST /api/auth/disconnect Disconnect integration
GET /api/profile/full Profiler data
WS /ws Real-time updates

Inter-Agent Messages

Context Sentinel ──ContextChangeEvent──▶ Disruption Detector
Disruption Detector ──DisruptionEvent──▶ Scheduler Kernel
Energy Monitor ──EnergyLevel──▶ Scheduler Kernel
Profiler Agent ──UserProfile──▶ All Agents
Scheduler Kernel ──UpdatedSchedule──▶ Frontend (WebSocket)
Scheduler Kernel ──DelegationTask──▶ GhostWorker
GhostWorker ──TaskCompletion──▶ Scheduler Kernel
Reminder Agent ──ReminderNotification──▶ Frontend (Redis → WebSocket)

What We Learned

Research-first design produces better systems than feature-first design. When we started by listing "cool features," we built things nobody needed. When we started from the specific cognitive failure points (disruption paralysis, cognitive overload, time blindness), the features followed naturally. The research constrained us in productive ways, and it's why we're proud of what we built: a tool that can change how millions of people with ADHD get through their work.


License

MIT

About

An operating system for your life, built for ADHD patients. Treehacks 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages