Local Development
Run the full PocketAgent platform — Next.js frontend and FastAPI backend — on your machine.
Prerequisites
- Node.js 20+ and npm
- Python 3.11+
- An OpenAI-compatible API key
- WalletConnect project ID (for RainbowKit wallet connections)
Clone and install
git clone https://github.com/Jayanng/PocketAgent.git
cd PocketAgent
npm install
cd backend && pip install -r requirements.txtConfigure environment
Backend
cd backend
cp .env.example .envSet at minimum OPENAI_API_KEY, ENCRYPTION_KEY, and JWT_SECRET. See the full reference in Configuration.
Frontend
cd frontend
cp .env.example .env.localSet NEXT_PUBLIC_API_URL=http://127.0.0.1:8000 (no trailing slash) and your WalletConnect project ID.
Start dev servers
npm run devFrom the repository root. Runs frontend (:3000) and backend (:8000) concurrently.
- Web UI —
http://localhost:3000 - Automations —
http://localhost:3000/scheduled-tasks - REST API —
http://127.0.0.1:8000 - Swagger UI —
http://127.0.0.1:8000/docs - ReDoc —
http://127.0.0.1:8000/redoc
Local auth bypass
For UI-only development you can set
DISABLE_AGENT_AUTH=true in the backend and NEXT_PUBLIC_DISABLE_AGENT_AUTH=true in the frontend. Never use this in production.Run tests
cd backend && pytest -q
cd frontend && npm test