Agentic Task Hub is a Next.js app with a landing page of self-contained tools: Task Hub (weekly tasks, logs, and AI briefings), P21 SQL Query Master (natural language → T-SQL sketches), BOSS (P21 business rule agent — multi-agent pipeline to full C# from your training corpus), and Department playbooks (SOP checklists with worker links). Optional AI features include a monitor agent (alerts from your snapshot), a daily summary agent (Markdown brief), and a voice assistant that understands what’s on screen and can add tasks from natural language.
Dark UI, Prisma with PostgreSQL, and bring-your-own-key (BYOK) OpenAI so you can deploy publicly without putting your API key in server env.
Supervisors paste JSON playbooks; the app expands steps with an agent, assigns workers, and sends private links. Preview walkthrough and Open walkthrough (sent) open the chart + table + step-by-step modal.
Landing page: open Task Hub, P21 SQL Query Master, BOSS, or Department playbooks; sticky bar has API key (BYOK), dictate, and voice mic.
Natural-language rule → multi-agent pipeline → full C# from DCNA_BR_TEMPLATE_v1 and your docs/p21/training/boss/ corpus.
Plain English → T-SQL + review against the bundled dictionary; SQL is not run in-app.
Weekly tasks, Today, activity log, and agents (monitor + daily summary).
Earlier static shots: Today tab IMG1.png, voice panel IMG2.png, header controls IMG3.png.
Export of the BOSS flow (generated rule spec / C# context): Open or download the example (PDF)
| Area | What it does |
|---|---|
| Tasks | Create tasks with title, description, priority, and weekly schedules (weekday + optional HH:MM in your timezone). |
| Today | Derived “slots” for the current day; log completions with optional rating and notes. |
| Activity log | History of completions across tasks. |
| Agents | Monitor — JSON alerts/insights from a live snapshot; Daily summary — Markdown report from yesterday’s logs + today’s snapshot. |
| P21 SQL | NL → SQL + review using a bundled P21 schema dictionary (docs/p21/training/); SQL is not executed in-app. |
| BOSS | Business rule agent: retrieval over examples + docs + T-SQL sketches, synthesis into full C# from DCNA_BR_TEMPLATE_v1; see PDF example. |
| Playbooks | Supervisors upload JSON playbooks; workers complete steps via token links (email/SMS). |
| Voice | Page-aware chat + optional task creation; requires an OpenAI key (server env or BYOK). |
| BYOK | Paste your key in API key; stored in localStorage only, sent over HTTPS on AI requests. Falls back to OPENAI_API_KEY on the server if unset. |
- Node.js 20.x (LTS; see
enginesinpackage.jsonand.nvmrc) - npm (or pnpm/yarn/bun)
- OpenAI API access for AI features (or rely on server-side
OPENAI_API_KEYin development)
npm installCopy the example env and adjust:
cp .env.example .envImportant variables:
| Variable | Purpose |
|---|---|
DATABASE_URL |
PostgreSQL URL — see .env.example |
DIRECT_URL |
Optional: Neon direct (non-pooler) URL for migrations. Required if DATABASE_URL uses Neon’s pooler host (-pooler); see VERCEL.md |
OPENAI_API_KEY |
Optional on the server if every user brings their own key (BYOK) |
TASKHUB_TIMEZONE |
IANA timezone for schedules (e.g. America/New_York) |
OPENAI_CHAT_MODEL |
Optional override (default gpt-4o-mini) |
Create a Postgres database, set DATABASE_URL in .env, then:
npx prisma migrate devThis applies migrations in prisma/migrations. The app does not use SQLite anymore (serverless hosts like Vercel need Postgres or another hosted SQL).
npm run devOpen http://localhost:3000.
npm run build
npm start| Command | Description |
|---|---|
npm run dev |
Next.js dev server |
npm run build |
prisma migrate deploy + next build (needs DATABASE_URL; Neon pooler also needs DIRECT_URL) |
npm run start |
Production server |
npm run lint |
ESLint |
src/app/— App Router pages andapi/routes (tasks, snapshot, agents, voice, P21, playbooks).src/components/—Dashboard,FeatureHub, P21 panels, playbooks UI, voice + BYOK.src/lib/— Prisma client, scheduling/snapshot helpers, OpenAI agents, P21 BOSS pipeline.docs/p21/training/— P21 training files (BOSS bundle, NL-SQL examples, SQL dictionary).prisma/— Schema and migrations (PostgreSQL).public/— Screenshots0-…10-(see Examples), optionalIMG*.png, and example PDF.
- Vercel / serverless: Use a hosted Postgres (e.g. Neon). Set
DATABASE_URLin the project’s environment variables. SeeVERCEL.md. - For no shared OpenAI bill, omit
OPENAI_API_KEYand document that users must use API key in the app (BYOK). - Use HTTPS in production; voice uses the browser Web Speech API (e.g. Chromium, Safari).
This project includes generic legal-style documents to document limitations of liability and AI-related risks. They are not legal advice and may not be sufficient for your situation or jurisdiction.
| Document | Purpose |
|---|---|
DISCLAIMER.md |
“As is” software, no warranty, limitation of liability, AI output risks, third-party services |
TERMS_OF_USE.md |
End-user style acceptable use, AI/BYOK responsibilities, indemnification (template — fill in governing law) |
PRIVACY.md |
High-level privacy notes for self-hosting, BYOK, and third parties (template for your own policy) |
You (maintainer or host) should have a qualified attorney review these before relying on them for a public product, company, or regulated environment.
Private / your choice — add a LICENSE file if you open-source the repo.










