An AI-powered organizational memory SaaS that creates an evidence-backed Work Twin for every employee from the work they actually do.
Watch the 90-second product demo: WorkTwin on YouTube
Codex was our hands-on development partner throughout the hackathon. It helped implement and iterate on the React/Vite experience, FastAPI retrieval layer, Supabase schema and ingestion pipelines, test coverage, deployment configuration, and the final demo polish. Codex also drove the disciplined Git workflow: focused feature branches, verification, pull requests, and production deployment checks.
WorkTwin uses the official OpenAI Python SDK and GPT-5.6 through the Chat Completions API to turn retrieved, permitted organizational evidence into grounded Twin answers, implementation plans, and code drafts. Every substantive response is instructed to cite the supplied evidence and to respect the historical-Twin and human-approval guardrails. text-embedding-3-small creates the vector embeddings used to retrieve relevant Slack, GitHub, and email artifacts before GPT-5.6 responds.
Organizations lose valuable knowledge every time an employee changes roles or leaves the company.
WorkTwin connects to company work artifacts and continuously builds a Work Twin for each employee. A Twin preserves demonstrable expertise, decision-making context, technical ownership, and collaboration patterns so teammates can retrieve institutional knowledge long after a role changes or an employee leaves.
The goal is not to replace employees, but to preserve institutional knowledge and enable continuous collaboration.
- Each employee has one Work Twin, created from their work artifacts rather than from a manually written persona.
- A Twin's expertise, working style, and communication patterns are derived and refreshed from evidence.
- Every substantive answer is grounded in retrievable company memory and returns source citations.
- Departed employees remain available as clearly labelled historical Twins, subject to company permissions.
- Human approval is required for critical or external actions.
Organization (SaaS tenant)
├── Source connections / demo imports
│ ├── Slack: messages and threads
│ ├── GitHub: pull requests, reviews, commits, and issues
│ └── Email: formal decisions, cross-team communication, and handovers
├── Employee directory
│ └── active and departed employees, linked to source identities
├── Organizational memory (Supabase + pgvector)
│ └── normalized artifacts, memory chunks, embeddings, access scope, and provenance
├── Work Twin profiles
│ └── derived expertise, ownership, decision patterns, and communication summary
└── Twin interaction layer
└── cited Q&A, implementation planning, and code drafts with human approval
Each Twin is an evidence-backed representation of an employee's work context. It is not a separately trained model and does not require the employee to manually author a personality.
- Identity: Name, role, department, and linked Slack/GitHub/email identities.
- Lifecycle:
activeordeparted. Departed Twins and their permitted historical memory remain part of the organization.
- Expertise and ownership: Repositories, systems, projects, technical topics, and recurring responsibilities inferred from work artifacts.
- Working patterns: Decision preferences, planning and debugging habits, and communication summary inferred from evidence and refreshable as data changes.
- Memory: Original Slack discussions, GitHub activity, emails, documents, decisions, and incident records, with author, timestamp, source URL, and access scope.
- Retrieval: Queries retrieve relevant employee and shared organizational memory before generating a response; answers expose their sources.
Twins continuously update from connected or imported work artifacts:
- Slack messages and threads
- GitHub pull requests, reviews, commits, and issues
- Email conversations, decisions, approvals, and handovers
- Technical and design documents, meeting transcripts, Jira tickets, feedback, and incident reports
For the hackathon MVP, these sources are represented through curated, repeatable demo imports. Production connectors and webhooks follow the same ingestion contract.
Live Slack, GitHub, and email OAuth/webhook connectors are post-MVP. The demo uses controlled imports so every run is repeatable while preserving the production ingestion contract: source identity, provenance, timestamps, and access scope are validated before retrieval.
Run the import pipeline locally from backend/:
.venv/bin/python -m app.demo_imports
.venv/bin/python -m app.artifact_embeddings
.venv/bin/python -m app.derived_profilesUsers select an employee from the directory and ask that person's Twin about prior decisions or request a work artifact such as an implementation plan or code draft:
User ➔ Employee Twin ➔ retrieve employee + permitted organization memory ➔ cited response / draft
Example: a teammate can ask a departed backend engineer's Twin why a retry limit was selected, inspect the Slack and pull-request evidence, then request a compatible webhook implementation plan. The Twin never implies that it is the former employee responding in real time.
- Twins MAY: Answer company-knowledge questions with citations, draft code, review code, generate documentation, and suggest architecture.
- Twins MUST NOT: Deploy to production, approve pull requests, bypass artifact access controls, or modify production systems without human approval.
- Email and sensitive artifacts: Retrieval must respect an artifact's company-shared or restricted access scope; private or restricted email is never indiscriminately available to every Twin.
- Frontend: React (Vite, TypeScript, Tailwind CSS, Shadcn UI)
- Backend: Python (FastAPI)
- AI Core: Official OpenAI Python SDK (GPT-5.6 / Assistants API)
- Database: Supabase (PostgreSQL + pgvector)
- Clone the repository.
- Install Python dependencies:
pip install -r requirements.txt - Install frontend dependencies:
cd frontend && npm install - Set up
.envwithOPENAI_API_KEYandSUPABASE_URL.
cd backend
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
cp ../.env.example ../.env
uvicorn app.main:app --reloadSet OPENAI_API_KEY in the root .env, then send a request to POST /api/chat:
{"message":"Hello, WorkTwin!"}In a second terminal, start the Vite development server:
cd frontend
npm install
npm run devThe frontend runs on http://localhost:5173 and proxies /api requests to the
FastAPI server at http://127.0.0.1:8000.
Before opening a pull request, run the backend tests and production frontend build:
(cd backend && .venv/bin/python -m pytest)
(cd frontend && npm run build)The root .env must define OPENAI_API_KEY, OPENAI_MODEL, SUPABASE_URL, and SUPABASE_SERVICE_ROLE_KEY. Keep these values local and never commit the file.
Deploy the frontend to Vercel and the FastAPI API to Render. Supabase remains the managed database and vector store.
- In Render, create a new Blueprint from this repository. The included
render.yamlcreates theworktwin-apiservice frombackend/. - In that Render service, set
OPENAI_API_KEY,OPENAI_MODEL,SUPABASE_URL, andSUPABASE_SERVICE_ROLE_KEY. SetCORS_ORIGINSafter the Vercel URL is known. Keep all of these values server-side. - In Vercel, import the same repository and set Root Directory to
frontend. AddVITE_API_BASE_URLwith the Render service URL (for example,https://worktwin-api.onrender.com), then deploy. - Set Render's
CORS_ORIGINSto the final Vercel URL (for example,https://worktwin-demo.vercel.app) and redeploy the API. VerifyGET /health, then load the Vercel application.
VITE_API_BASE_URL is public by design and must contain only the API URL. Never put OpenAI or Supabase service-role credentials in Vercel or any VITE_* variable.
- Open the deployed app and select Priya Nair under Former employees.
- Explain the amber historical-evidence banner, then choose Load citation-contract story.
- Submit the loaded question in Implementation plan mode.
- Inspect the response's citations in the evidence panel to show the linked Slack, GitHub, and email records.
- Point out that the response is a historical evidence-based representation and that the policy keeps deployment and approval with a human.
The existing profile-editor and generic-chat prototype is being superseded by the data-driven Work Twin MVP described above. See TODO.md for the approved implementation sequence. No production Slack, GitHub, or email connector is required for the hackathon demo; the MVP starts with controlled imports that preserve source provenance.