Project Info
Inspiration
I homeschool, and I have other family members who homeschool as well. A homeschooling parent is not only teaching. They are planning lessons, organizing curriculum, reviewing work, adjusting schedules, tracking progress, saving records, and deciding when a child needs more support. Most homeschool tools help store information, but they still leave the parent responsible for noticing every problem and manually coordinating every change. General-purpose AI chat can offer suggestions, but a parent must still transfer those suggestions into the family’s actual schedule and records. I've been thinking of a tool like Klio for my personal use case and 5.6-Sol was able to get very far with this prototype. I wanted to explore what it would look like if AI could understand the family’s curriculum, schedule, completed work, and learning evidence, and then safely help manage the work rather than simply talk about it.
What it does
Klio brings a family’s homeschool operation into one connected workspace. Parents can use Klio to: Plan daily, weekly, and monthly schedules Organize courses, curriculum units, and sequenced lessons Coordinate assignments across multiple children Capture student work and supporting evidence Review submissions before they become trusted learning records Identify unfinished work, scheduling conflicts, pacing concerns, and learning gaps Generate focused practice from approved evidence Ask Klio to handle routine planning work in the background Review, approve, reject, or undo changes when appropriate Klio proactively notices issues instead of waiting for the parent to formulate the perfect prompt. For example, it may notice that lessons are out of sequence, several assignments remain unfinished, a day is overloaded, or a student needs more practice with a concept. The parent can choose “Ask Klio to handle this.” Klio then starts a background task directly from that notice. Routine, reversible schedule changes can be completed automatically with an Undo option. More consequential academic or curriculum decisions remain proposals until the parent approves them. The goal is not to replace the parent’s judgment. It is to reduce the coordination burden so the parent can spend more time teaching and supporting their children. How I built it I built Klio as a production-style application rather than a scripted demonstration. The interface uses Next.js and React and includes Today, Week, and Month views. The schedule is connected to curriculum, assignments, evidence, parent reviews, practice activities, and AI-generated notices. Supabase provides authentication, a hosted PostgreSQL database, access controls, and durable storage for families, learners, curriculum, assignments, evidence, reviews, proposals, audit events, and agent activity. The OpenAI-powered agent uses structured turns and bounded tools. When a parent hands Klio a task, the system: Records the request and the authority granted by the parent. Places the work in a durable background queue. Collects the relevant family, curriculum, schedule, and evidence context. Uses the model to determine the smallest useful next action. Calls only the tools permitted for that task. Records progress and tool results. Verifies the resulting application state. Returns a completed action, a reviewable proposal, or one necessary clarification. Because the work is durable, the parent can leave the page and return later without losing the task. Klio restores the task’s progress or completion receipt in the same place where it began. I also designed an autonomy system around the risk and reversibility of each action. Ordinary schedule adjustments can happen immediately and remain undoable. Grades, major curriculum decisions, and other significant academic changes continue to require explicit parental approval. Challenges I faced One of the hardest challenges was turning an AI conversation into dependable action. It is easy for a model to describe a good plan. It is much harder to safely apply that plan to real schedules and records without duplicating lessons, using stale information, or changing something the parent intended to preserve. Another challenge was background execution. Some AI tasks take longer than a normal web request, but the application still needs to feel responsive. I separated the user-facing application from the worker that processes agent tasks. Klio immediately confirms the handoff, displays durable progress, and continues the work independently. I also had to find the right balance between autonomy and parental control. Requiring approval for every minor schedule adjustment makes the agent feel like another inbox. Allowing every change automatically would be inappropriate for an educational system. Klio therefore distinguishes between safe, reversible operational changes and decisions that require human judgment. Keeping the data connected was another major challenge. A schedule change may affect curriculum order, workload, parent availability, evidence, and future recommendations. Stable identifiers, structured relationships, audit records, and post-action verification became essential parts of the system. What I learned AI needs real tools, not just good prompts. The agent became useful when it could safely inspect records, update schedules, create practice, and verify its work. Long-running tasks need durable state. Background work must survive navigation, refreshes, and temporary failures without losing progress. The interface must feel responsive even when the model is still working.*Immediate feedback, visible progress, and persistent results made the agent feel dependable.
Klio
Klio is a bounded homeschool operating workspace for parents coordinating multiple learners. It turns everyday handoffs—notes, worksheets, scores, voice updates, unfinished lessons, and curriculum materials—into evidence-backed plans, reviews, practice, and reversible schedule changes without letting an AI silently become the educational authority.
Built for the Education track of OpenAI Build Week.
- Live app: klio-olive.vercel.app
- Runtime model:
gpt-5.6-terra - Stack: Next.js 16, React 19, Supabase, OpenAI Codex SDK, OpenAI Responses API, Vercel Cron
- License: MIT
The problem
Homeschool planning tools usually track assignments, while general AI assistants produce suggestions. Neither one reliably manages the harder operating problem: a parent is one shared teaching resource across several learners, source work must stay connected to conclusions, grades need review, curriculum order matters, and schedule changes must remain understandable and reversible.
Klio combines those responsibilities in one persistent family workspace. It can do routine follow-through, but every action passes through a narrow domain tool, current family authorization, deterministic policy, and an audit trail.
What Klio does
- Captures text, photos, PDFs, files, voice notes, explicit scores, books, and activities as preserved evidence.
- Maintains academic terms, learning days, curriculum scope, course order, learner capacity, and parent-attention constraints.
- Uses a persistent conversational agent to file work, organize days, create assignments and reminders, prepare reviews, and generate focused practice.
- Keeps inferred grades, learning interpretations, curriculum-direction changes, and major schedule changes behind parent review.
- Distinguishes provisional written-work feedback from parent-approved learning records.
- Generates structured, answer-safe practice grounded in approved evidence and renders it in a scored learner player.
- Produces weekly briefings, pacing signals, calendar-conflict warnings, and quiet no-op outcomes when nothing needs attention.
- Records undo information for eligible schedule mutations and refuses stale undo operations that would overwrite later work.
Judge walkthrough
The hosted judge account contains synthetic data only: three learners, four completed weeks, current curriculum and schedule state, evidence history, reviews, attention items, and generated practice.
-
Open the live app and sign in with
test@klio.com. The password is supplied in the Devpost testing instructions, never in this repository. -
On Home, inspect the family schedule, weekly briefing, pacing cards, and parent-attention notices.
-
Open Conversations, select Jacob, and try:
Using Jacob's approved osmosis evidence, create a different six-item Science practice on causal explanations, schedule it for tomorrow, and do not change or invent a grade.
-
Watch the durable receipt move from queued work through evidence reading and practice creation. The Vercel worker runs the turn against hosted Supabase using GPT-5.6 Terra.
-
Open the generated practice to inspect the six-item progression and answer-safe learner view.
-
Open Attention to review any draft interpretation. Open the new schedule adjustment to undo it.
The production smoke test exercised the same path: web handoff → durable queue → Codex worker → bounded tools → parent review → generated practice → schedule → successful undo.
Architecture
flowchart LR
P[Parent or judge browser] --> W[Next.js web app on Vercel]
W <--> S[Supabase Auth, Postgres, and Storage]
W --> Q[Durable agent turn queue]
Q --> S
C[Vercel Cron every minute] --> R[Bounded worker batch]
R <--> S
R --> X[Codex SDK and GPT-5.6 Terra]
X <--> M[Klio MCP tool gateway]
M --> S
The web and worker share one codebase but not one request lifecycle. Web requests enqueue durable turns in Supabase. A secured Vercel Cron route claims work fairly across families, renews leases and heartbeats, bounds concurrency and retries, and records progress. The Codex SDK runs with a family-specific workspace and only the Klio MCP tools allowed for that turn.
Structured capture and curriculum-material analysis also use the OpenAI Responses API with Zod-validated outputs. The persistent operating agent uses the Codex SDK with gpt-5.6-terra and a signed, expiring capability for the local MCP gateway.
Bounded authority
Klio's central product decision is that model intelligence and write authority are separate.
- The model receives a current, family-authorized snapshot; stale thread context is supplemental only.
- Capabilities are signed, expiring, turn-bound, requester-bound, family-bound, snapshot-versioned, and limited to named domain tools.
- The agent has no arbitrary SQL, shell, filesystem, browser, generic HTTP, generic record-update, or source-deletion tool.
- Every write revalidates ownership and snapshot state, uses an idempotency key, and records provenance.
- Submitted work and curriculum files are untrusted evidence, never executable instructions.
- Source evidence is preserved. Parent corrections remain available as negative examples rather than being silently overwritten.
- Supabase Row Level Security isolates every family; the browser receives only a publishable key.
- OpenAI, Supabase secret-key, Stripe, and cron credentials stay server-side.
The detailed contract is in docs/bounded-agent-safety.md.
How Codex and GPT-5.6 contributed
Codex as the build collaborator
Codex accelerated repository exploration, implementation planning, schema and RLS work, Next.js API and UI changes, adversarial test coverage, deployment debugging, and live browser verification. It was especially useful for tracing behaviors across the queue, database policies, runtime tool gateway, receipts, and parent-facing UI instead of treating each layer independently.
The primary Codex /feedback Session ID is provided in the Devpost submission form. Dated commits and the submission-readiness plan provide additional evidence of work during the submission period.
GPT-5.6 in the product
GPT-5.6 Terra interprets parent requests against the authorized family snapshot, chooses among the tools the host permits for that turn, and returns a schema-validated receipt describing what it understood, used, changed, and left for review. It does not receive blanket application authority.
The hosted smoke test used GPT-5.6 Terra to identify a specific osmosis explanation gap without inventing a grade, prepare a parent-reviewable evidence record, generate six grounded practice activities, schedule a follow-up, and then preserve an undo path.
Key human decisions
| Decision | Why it remained human-owned |
|---|---|
| Separate intelligence from authority | A capable model should not imply permission to mutate every family record. |
| Treat the parent as one shared scheduling resource | Student capacity alone cannot prevent overlapping parent-led lessons across siblings. |
| Keep inferred grades and interpretations provisional | Written work and educational judgment require accountable parent review. |
| Prefer deterministic policy for capacity, order, leases, retries, and undo | These invariants must hold even when model output varies. |
| Deploy a real durable worker | The submitted product should behave like the demonstrated product, including background follow-through and recovery. |
What was built during the submission period
Klio existed before the July 13, 2026 9:00 AM Pacific submission-period start. In accordance with the official rules, only the meaningful extensions added during the submission period are presented as Build Week work.
Before July 13: baseline
The July 10–11 baseline contained the initial Next.js/Supabase prototype, private family workspaces, multimodal capture, durable jobs, record operations, and an early source-backed parent-review flow. Those capabilities establish the starting point; they are not claimed as new Build Week work.
July 13–20: meaningful extensions
| Date | Evidence | Meaningful extension |
|---|---|---|
| July 14 | commit 4fd9bb7 | Parent command surface, contextual follow-through, and end-to-end coverage. |
| July 16 | commit 758af2b | Bounded autonomous homeschool workflows, domain capabilities, review boundaries, and recovery behavior. |
| July 18 | commit 41c3ad7 | Date-scoped workspace flows, pagination, scheduling constraints, and calendar conflicts. |
| July 19–20 | submission commit | Generic curriculum scope and source-backed ingestion, curriculum material enrichment, improved weekly briefings and parent-attention UI, isolated verification fixes, hosted Supabase deployment, Vercel web-plus-worker topology, synthetic judge data, and live GPT-5.6 smoke testing. |
Run locally
Requirements
- Node.js 20 or newer
- pnpm 10
- Docker
- Supabase CLI
- PostgreSQL client (
psql) for the optional sample-data seed - An OpenAI API key for agent execution
- Stripe CLI only when testing billing
Setup
git clone https://github.com/btimofeyev/klio.git
cd klio
corepack enable
pnpm install
cp .env.example .env.local
pnpm db:start
pnpm exec supabase status -o env
Copy the local Supabase URL, publishable key, and secret key into the matching variables in .env.local. Then set:
OPENAI_API_KEY=your_project_key
OPENAI_MODEL=gpt-5.6-terra
KLIO_AGENT_RUNTIME=codex_app_server
KLIO_AGENT_CAPABILITY_SECRET=replace_with_a_long_random_secret
KLIO_AGENT_INLINE=true
NEXT_PUBLIC_APP_URL=http://localhost:3100
Generate the capability secret with openssl rand -hex 32. Start the web app and local worker together:
pnpm dev
Open http://localhost:3100. Local Supabase uses ports 56320–56329; Studio is at http://127.0.0.1:56323.
Synthetic sample data
No hosted credentials or real student data are checked into Git. To create the same kind of local synthetic workspace:
- Start Klio and register
demo@klio.localthrough the local signup page. - Seed four completed weeks plus the current week:
psql 'postgresql://postgres:postgres@127.0.0.1:56322/postgres' \
-v ON_ERROR_STOP=1 \
-v completed_weeks=4 \
-f scripts/seed-demo-eight-weeks.sql
The repeatable fixture creates three synthetic learners, curriculum, assignments, evidence, reviews, pacing state, schedule changes, and practice history.
Verification
With local Supabase running:
pnpm lint
pnpm typecheck
pnpm test
pnpm test:e2e
pnpm build
Run the standalone containment tests with:
node --test proofs/capture-agent-phase0/test/*.test.mjs
To opt into the live OpenAI browser test after configuring a valid key:
RUN_LIVE_OPENAI_E2E=1 pnpm exec playwright test -g "selected evidence becomes"
Tests use transient local users and clean up their records. RLS coverage includes family isolation for academic plans, grading, proposals, corrections, instructional records, worker leases, and private Storage.
Production deployment
The reference deployment uses one Vercel project and hosted Supabase:
- Create and link a hosted Supabase project.
- Apply the checked-in migrations with
pnpm exec supabase db push. - Configure the variables from
.env.examplein Vercel. Use production-only random values forKLIO_AGENT_CAPABILITY_SECRETandCRON_SECRET, setKLIO_AGENT_INLINE=false, and point the Supabase and app URLs at the hosted services. - Deploy to Vercel.
vercel.jsoninvokes/api/internal/agent-workerevery minute; the route requires Vercel'sAuthorization: Bearer $CRON_SECRETheader.
The Codex Linux runtime assets are explicitly included in Next.js output tracing for the worker route. Use a Vercel plan whose Node function duration supports the configured long-running agent batch.
Repository map
src/app/ Next.js pages and HTTP routes
src/components/ Parent workspace and learner UI
src/lib/agent/workspace/ Durable turns, snapshots, tools, policy, runtime
src/lib/curriculum/ Scope, research, ingestion, and pacing
src/lib/proactive/ Briefings, reactions, and scheduled evaluation
src/lib/worker/ Fair bounded worker orchestration
supabase/migrations/ Ordered PostgreSQL schema and RLS migrations
e2e/ Playwright product and safety flows
proofs/capture-agent-phase0/ Standalone Codex containment proof
License
Copyright © 2026 Ben Timofeyev. Released under the MIT License.
Analysis
View
Metric
- 22
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Next.jsIn code
- OpenAIIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- JavaScriptClaimed
- Node.jsClaimed
- VercelClaimed
8 of 11 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeConfig
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
3.7 MB
Source files
974
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
btimofeyev/klio
1,273 files · 6.3 MB · @ b162d1e
Structure
Interface
62 files · 5%Screens, components and styles rendered to the user.
API & routing
53 files · 4%Request entry points: routes, handlers and controllers.
Application logic
969 files · 76%Domain rules, services and shared utilities.
Background jobs
4 files · 0%Work run outside a request: tasks, workers and schedules.
Data & schema
46 files · 4%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript71%
- CSS13%
- SQL9%
- YAML6%
- Markdown1%
- Shell0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 44- @hookform/resolvers
- @openai/codex-sdk
- @supabase/ssr
- @supabase/supabase-js
- class-variance-authority
- clsx
- date-fns
- dictionary-en
- lucide-react
- motion
- music-metadata
- next
- nspell
- openai
- papaparse
- react
- react-dom
- react-hook-form
- +26 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.