You'll need the following accounts:
Required:
- OpenRouter - AI model provider
- OpenAI - Content moderation
- E2B - Sandbox environment for secure code execution in agent mode
- Convex - Database and backend
- WorkOS - Authentication and user management
- Trigger.dev - Required durable runtime for agent tasks
Optional:
- Amazon S3 - File storage (alternative to Convex storage)
- Perplexity - Web search functionality
- Jina AI - Web URL content retrieval
- Redis - Stream resumption
- Upstash Redis - Rate limiting
- PostHog - Analytics
- Stripe - Payment processing
git clone https://github.com/hackerai-tech/hackerai.gitcd hackeraipnpm installpnpm run setupThis runs both Next.js and Convex dev servers:
pnpm run devOr run them separately in two terminals:
pnpm run dev:next
pnpm run dev:convexAgent mode runs the agent loop on a Trigger.dev task. To use the agent locally:
-
Create a project at https://cloud.trigger.dev and copy your dev secret key (
tr_dev_…) into.env.localasTRIGGER_SECRET_KEY. -
In the Trigger.dev dashboard → your project → Environment Variables, add the env vars the task needs to run (these live on the worker, not on Vercel):
NEXT_PUBLIC_CONVEX_URL,CONVEX_SERVICE_ROLE_KEY,OPENROUTER_API_KEY,OPENAI_API_KEY,E2B_API_KEY, plus any keys you use (PERPLEXITY_API_KEY,JINA_API_KEY, S3, etc.). -
Start the worker in a third terminal:
npx trigger.dev@latest dev