Getting Started¶
Get the Companion application running on your local machine in 15 minutes.
Prefer Docker? The entire stack (backend, Postgres, frontend, Firebase emulators) can run in containers with no local Python/Node services — see Docker Dev & Testing.
Prerequisites¶
Install these before starting:
- Python 3.12+ — python.org
- Node.js 24 LTS — nodejs.org
- Git — git-scm.com
Windows-Specific Notes¶
On Windows, use PowerShell for all commands. Python commands use python (not python3).
Step 1: Clone the Repository¶
Step 2: Configure Environment¶
# Copy the environment template
cp .env.example .env # Unix/macOS
# Copy-Item .env.example .env # Windows PowerShell
Edit .env and set at minimum:
See .env.example for all available options.
Step 3: Set Up the Backend¶
Choose the environment you are working with:
Beta is deployed by pushing to develop. Monitor the deployment with:
# Create virtual environment
python -m venv .venv
# Activate it
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
# Install dependencies
cd backend
pip install -r requirements.txt
cd ..
Step 4: Start the Backend¶
From the project root, in one terminal:
.venv\Scripts\activate # If not already activated
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
You should see: INFO: Uvicorn running on http://0.0.0.0:8000
Verify the health endpoint:
curl http://localhost:8000/health
# Windows alternative: Invoke-RestMethod http://localhost:8000/health
Step 5: Set Up the Frontend¶
In a second terminal:
Step 6: Start the Frontend¶
In the second terminal (with backend still running):
You should see: Local: http://localhost:3000/
Step 7: Verify Everything Works¶
- Open http://localhost:3000 in your browser
- You should see the Companion chat interface
- Send a test message — you should see streaming agent responses
Running Tests¶
Backend Tests¶
All backend tests use in-memory SQLite and mock LLM — no API key needed.
Frontend Tests¶
Troubleshooting¶
Backend won't start¶
- Port 8000 in use: Stop any process on port 8000 or use
--port 8001 - Missing API key: Set
OPENAI_API_KEYin.env— agent features need it LANGGRAPH_STRICT_MSGPACKerror: AddLANGGRAPH_STRICT_MSGPACK=trueto.env
Frontend can't connect to backend¶
- CORS errors: The Vite dev proxy handles this — ensure
VITE_API_PROXYpoints to your backend - Backend not running: Start the backend first (port 8000), then the frontend
"Database is locked" errors¶
This indicates multiple SqliteSaver connections. The checkpointer is a singleton — restart the backend to clear any stale connections.
E2E tests fail¶
- Backend must be running: Playwright dev tests assume the backend is on port 8000
- Browser installation: Run
npx playwright installonce to install test browsers
Next Steps¶
- Architecture — Understand how the system works
- Features — Explore available features
- Coding Guidelines — Contribution standards
- Deployment — Docker Compose deployment