ClearWell imports research sources, builds source-grounded project workspaces, and keeps the Step1 hybrid graph available as a secondary view.
cd backend
python3 -m venv .venv
.venv/bin/pip install -e ".[test]"
.venv/bin/python -c "import psycopg; conn=psycopg.connect('postgresql://qsh@127.0.0.1:5432/postgres', autocommit=True); cur=conn.cursor(); cur.execute(\"SELECT 1 FROM pg_database WHERE datname='clearwell'\"); cur.execute('CREATE DATABASE clearwell') if cur.fetchone() is None else None; conn.close()"
.venv/bin/python -c "from app.db.init_db import init_db; init_db()"
.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8000ClearWell Step2 uses PostgreSQL for application data and Qdrant for chunk vectors.
Required environment variables:
export CLEARWELL_CHAT_BASE_URL=https://api.openai.com/v1
export CLEARWELL_CHAT_API_KEY=...
export CLEARWELL_CHAT_MODEL=...
export CLEARWELL_EMBEDDING_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
export CLEARWELL_EMBEDDING_API_KEY=...
export CLEARWELL_EMBEDDING_MODEL=text-embedding-v4
export CLEARWELL_EMBEDDING_DIMENSION=1536
export CLEARWELL_QDRANT_URL=http://127.0.0.1:6333
export CLEARWELL_QDRANT_COLLECTION=clearwell_chunkscd frontend
npm install
npm run dev- Project spaces with per-project source libraries
- Multi-file upload for PDF, MD, Markdown, and TXT
- Qdrant-backed chunk retrieval
- Source-grounded chat with chunk citations
- Manual project summaries
- Weak project graph entry using the Step1 graph pipeline
curl -sS -X POST http://127.0.0.1:8000/api/projects \
-H 'Content-Type: application/json' \
-d '{"name":"Research","description":"Step2 smoke test"}'