Sophia (Σοφία) — the Greek word for Wisdom.
SophiaAI is an AI agent grounded in a hand-curated library of wisdom texts. Philosophy, science, spirit, and mind — a small, intentional collection chosen with care instead of the whole noisy internet. Ask her something, and she retrieves the exact passages that matter, then builds her answer on top of them.
She was born at Tokio School as a final project, Pero me dio las ideas principales para pensar en una aplicación de escritorio de Windows. Esta versión es la primera versión que ha existido de SophiaAI. Es mi proyecto para entregar en Tokyo School y estoy muy feliz con el resultado. Fue difícil, fue complejo. Me tomó más de un mes terminarlo, pero estoy muy feliz.
From an engineering perspective, SophiaAI is a RAG system.
The corpus lives on a shelf: plain markdown files organized into four pillars (mind, philosophy, spirit, science). Those files get chunked, embedded, and stored in a FAISS vector index. When a question comes in, the retriever pulls the most relevant chunks off the rack and hands them to the LLM — which already has access to web search (Tavily) and file I/O as tools.
The LLM doesn't just answer. It reaches for the tools it needs, loops until the work is done, and cites its sources. Same soul as the chatbot she started as — a curated-corpus ground truth — but now with hands.
FastAPI backend on :8000. Next.js client on :3000. JWT in an httpOnly cookie. One-swap-point boundaries so any piece can be replaced in a single commit.
Requires Python 3.11 and Node 20+.
# Clone and venv
git clone https://github.com/SpiritualTech33/SophiaAI.git
cd SophiaAI
python -m venv SophiaAI-venv
# Windows
SophiaAI-venv\Scripts\Activate.ps1
# macOS / Linux
source SophiaAI-venv/bin/activate
pip install -r requirements.txt
# Environment
cp .env.example .env
# Create API keys for OpenRouter, Hugging Face, and Tavily.
# Then fill in OPENROUTER_API_KEY, HF_TOKEN, TAVILY_API_KEY, and JWT_SECRET.Required external keys:
OPENROUTER_API_KEY— LLM provider for Sophia's answers.HF_TOKEN— Hugging Face token for image generation.TAVILY_API_KEY— Tavily web-search provider key.
Two terminals:
# Terminal 1 — backend
uvicorn sophia.app.main:app --reload
# Terminal 2 — frontend
cd web
cp .env.example .env.local
npm install
npm run devOpen http://localhost:3000. Register, talk to Sophia.
# Run the test suite
pytest -q