AutoPM runs an end-to-end PM workflow inside a "Space" (one project), powered by LangGraph/LangChain agents on top of Google Gemini:
- Idea Generation — researches your problem, proposes multiple data-backed solutions, with sources.
- Story Agent — expands your chosen solution into user stories, acceptance criteria, and tech notes.
- Market Research — web search for customer feedback, industry trends, and competitor analysis.
- Email Agent — drafts stakeholder updates and sends via Gmail with delivery tracking.
- RICE Agent — breaks work into features and prioritizes with sortable RICE scoring.
- OKR Alignment — analyzes uploaded OKRs (PDF) and maps proposed work to org goals.
- Wireframe Agent — generates interactive HTML/CSS mockups with multi-page navigation.
- Jira Agent — creates tickets (descriptions, AC, labels, assignees) based on RICE.
Plus a context-aware AI assistant that knows your project history and a market research panel (competitors, activity signals, trends). Tech stack: LangGraph, LangChain, Google Gemini, Tavily/Serper search, Next.js 16 (App Router), React 19/TypeScript, Tailwind, MongoDB/Mongoose, Auth0, Gmail API, Jira Cloud API, Reddit API, Zod.
- Prereqs: Docker, VS Code + the "Dev Containers" extension.
- Open this folder in VS Code → "Reopen in Container" when prompted. The devcontainer
(
.devcontainer/devcontainer.json) uses Docker Compose (docker-compose.ymlplus a devcontainer-onlydocker-compose.extend.yml) to give you a shell with the full source tree bind-mounted and devDependencies installed, and starts a bundledmongo:7.0service alongside the app. cp .env.example .envand fill in values (see table below).- Run:
→ open http://localhost:3000
npx @devcontainers/cli up --workspace-folder . npx @devcontainers/cli exec --workspace-folder . npm run build
npm install --legacy-peer-deps
cp .env.example .env # fill in values, pointing MONGODB_URI at your own Mongo
npm run dev--legacy-peer-deps is required: @langchain/community declares a non-optional
peer dependency on @browserbasehq/stagehand, which pins dotenv ^16.x; this
app's own direct dotenv dependency is ^17.x. This is an upstream
langchainjs-community packaging issue, not a problem with this app's own
dependency graph.
cp .env.example .env # fill in values; MONGODB_URI can stay as the mongo:// default
docker compose up --buildThis builds the app image (multi-stage: npm ci + next build in a build stage,
then a minimal runtime stage that copies only the Next.js standalone output and
runs node server.js) and starts it alongside a pinned mongo:7.0 container with a
named volume for data. The app is reachable at http://localhost:3000.
The two agent-tool modules that construct LLM/search clients at import time
(app/api/agents/search/tools.ts, app/api/agents/ideaAgent/*) mean next build
needs some value for GOOGLE_API_KEY/TAVILY_API_KEY to succeed even though the
build doesn't call those APIs. The Dockerfile supplies build-only placeholder
values via ARG (not ENV), so they never persist into the final image — real
values are always supplied at docker run/docker compose up time via .env.
npm run dev— Next.js dev servernpm run build— production build (output: standalone)npm start— serve a production buildnpm run lint— ESLint
Copy .env.example to .env and fill in real values. .env is gitignored; never
commit real secrets. On startup (instrumentation.ts), the app validates the
required variables and exits with a clear error listing exactly what's missing
if any are unset — it does not fail silently or deep inside a request handler.
| Variable | Required | Purpose | Where to get it |
|---|---|---|---|
MONGODB_URI |
Yes | lib/mongodb.ts |
In the devcontainer/compose setup this points at the bundled mongo service (mongodb://mongo:27017/autopm). |
GOOGLE_API_KEY |
Yes | Nearly every LangChain/LangGraph agent | Get one at https://aistudio.google.com/app/apikey |
AUTH0_DOMAIN |
Yes | lib/auth0.ts, middleware.ts |
From an Auth0 "Regular Web Application". |
AUTH0_CLIENT_ID |
Yes | same | |
AUTH0_CLIENT_SECRET |
Yes | same | |
AUTH0_SECRET |
Yes | same | Encrypts the session cookie. Generate with openssl rand -hex 32. |
APP_BASE_URL |
Yes | Auth0 callback URLs, Jira/Google/Reddit OAuth redirects | e.g. http://localhost:3000. |
AUTH0_HOOK_SECRET |
Yes | app/api/auth/hook/route.ts |
Shared secret required on the x-auth0-hook-secret header of every call to POST /api/auth/hook. Set the same value here and in the Auth0 Action/Rule that calls this webhook post-login. Generate with openssl rand -hex 32. |
GOOGLE_CLIENT_ID |
Optional | Gmail/Google Drive integration authorize flow (app/api/integrations/google/*) |
|
JIRA_CLIENT_ID / JIRA_CLIENT_SECRET / JIRA_REDIRECT_URI |
Optional | Jira Cloud OAuth 2.0 (3LO) (app/api/integrations/jira/*) |
|
REDDIT_CLIENT_ID / REDDIT_CLIENT_SECRET / REDDIT_REDIRECT_URI |
Optional | Reddit OAuth + research subgraph (app/api/integrations/reddit/*, lib/research/config.ts) |
|
REDDIT_USER_AGENT |
Optional | same | Defaults to ProductManagerCopilot/1.0. |
TAVILY_API_KEY / SERPER_API_KEY |
Optional (at least one) | Market research agent web search (app/api/agents/search/tools.ts, app/api/agents/ideaAgent/tools/internetSearch.ts) |
Not required to build or start the app — only to run a search. |
WEB_SEARCH_PROVIDER |
Optional | same | tavily (default) or serper. |
REQUEST_TIMEOUT_MS / MAX_RETRIES |
Optional | Research subgraph HTTP tuning (lib/research/config.ts) |
Default 30000 / 3. |
The eight vars marked Required are hard-gated at startup; the app will not serve any request without them. The rest gate individual integrations — the app still builds and starts without them, but those specific features won't work.
There is no automated test suite in this repo (no test runner configured, no
test script in package.json). Verification for this pass was limited to:
npm run build(and, in the container,next buildvia the Dockerfile'sbuildstage) completing successfully.- Startup environment validation: removing any of the 8 required vars from
.envmakes the container print a clear "Missing required environment variables: ..." message and exit(1) instead of serving traffic. - Hook-flow curls against
POST /api/auth/hookwith the real compose Mongo:- No
x-auth0-hook-secretheader →401 - Wrong secret →
401 - Correct secret (matching
AUTH0_HOOK_SECRET) →200, and a real user document is written to themongoservice.
- No
Build the production image: docker build -t autopm .
Run it: docker run --env-file .env -p 3000:3000 autopm
This container runs on any host (Fly.io, Render, a VPS with Docker) — see
DEPLOYMENT.md in the Projects root for the full walkthrough.
Auth0 login itself, Gemini-powered agent runs, Gmail sending, Jira ticket creation, Google Drive, and Reddit research all require live third-party credentials/OAuth apps and were not exercised end-to-end in this pass — only code-level review plus the build/startup/hook checks above. If you configure real values for the optional vars, those integrations should work, but that has not been independently verified here.