Psyence is a SaaS + open-source project that acts as a psychology-powered copilot for human interaction.
It uses Retrieval-Augmented Generation (RAG) with Cloudflare AutoRAG + R2 storage to deliver practical, context-grounded answers on:
- Flirting & dating (respectful approaches, handling rejection)
- Leadership & communication (speak like a CEO, motivate teams)
- Self-improvement (habits, mindset, productivity, stoicism)
- Humor & wit (light teasing, comebacks, banter)
- Negotiation & persuasion (influence ethically, set boundaries)
- Everyday psychology (confidence, charisma, relationships)
Psyence draws from psychology research, public-domain classics, playbooks, and curated templates.
Itβs like Duolingo + Charisma on Command + Psychology Today, powered by AI.
- RAG Answers β grounded in psychology & communication playbooks.
- Tone Styles β Friendly β’ Witty β’ Direct β’ Empathic β’ CEO-style.
- Role-Play Mode β simulate conversations, get feedback.
- Knowledge Cards β bite-sized psychology insights, negotiation tactics, humor patterns.
- Citations β every answer cites its source.
- Cloudflare Native β AutoRAG + R2 for low-latency, cheap storage.
- Frontend β Next.js 15 (App Router), TailwindCSS, shadcn/ui
- Backend β Cloudflare Workers + AutoRAG (RAG pipeline, retrieval, safety layer)
- Storage β Cloudflare R2 (documents, embeddings JSONL)
- Vector Search β AutoRAG indexer (with hybrid search: embeddings + BM25)
- LLM β OpenAI GPT-4.1 (default) or open-source (Mistral, LLaMA via plugins)
- Auth β Clerk / Auth.js
- Payments β Stripe
psyence/
βββ apps/
β βββ web/ # Next.js frontend
β βββ worker/ # Cloudflare Worker (AutoRAG endpoints)
βββ data/
β βββ raw/ # source material (txt/md/pdf summaries)
β βββ processed/ # cleaned + chunked text
β βββ embeddings/ # JSONL embeddings stored in R2
βββ scripts/
β βββ ingest.ts # pipeline: clean β chunk β embed β upload
βββ README.md
git clone https://github.com/<your-username>/psyence.git cd psyence
npm install
Create .env.local:
OPENAI_API_KEY=sk-xxxx CLOUDFLARE_ACCOUNT_ID=xxxx CLOUDFLARE_API_TOKEN=xxxx R2_BUCKET=psyence-rag
Put your .md or .txt notes in data/raw/. Then run:
npm run ingest
This will:
- Clean + chunk docs
- Generate embeddings
- Upload JSONL β R2
- Register in AutoRAG index
npm run dev
- π Public domain psychology texts β Project Gutenberg, Internet Archive
- π§Ύ Your own notes & playbooks β flirting, rejection replies, charisma hacks, negotiation scripts
- ποΈ Podcast & YouTube transcripts (transformative summaries only)
- π° Blogs & newsletters β Farnam Street, Psychology Today, Charisma on Command
- ποΈ Community datasets β cleaned Reddit/Quora Q&A (e.g. r/socialskills)
- Pre-chunk text β ~800β1200 tokens, avoids embedding huge docs.
- Store embeddings in JSONL batches β faster ingestion.
- Compression β
gzip/zstdon R2 to cut storage by Γγ°γ€. - Metadata tagging β tone, culture, context (dating, work, humor).
- Hybrid search β combine embeddings + keyword search for better accuracy.
- Re-ranking β small cross-encoder rerank top-12 β top-4 chunks.
- Caching β store popular queries in Cloudflare KV or D1 for instant (<50ms) answers.
- Fork & PR
- Add psychology notes / playbooks to
data/raw/ - Run
npm run ingestto process + embed - Submit your PR π
MIT License β all contributed content must be public domain, licensed, or original.
Psyence is building the OS for human interaction β a universal copilot for charisma, influence, relationships, and personal growth.
Think: "ChatGPT trained on all of psychology, social intelligence, and charisma playbooks."