Multi-agent orchestration supports data analysis and resume generation, with other features under development. The goal is to create intelligent agents that work 24/7.
- Node.js 20+
- pnpm 9+
git clone https://github.com/Waterkyuu/refract.git
cd refract
pnpm installCreate a .env.local file in the root directory:
# Zhipu AI (Required)
ZHIPU_API_KEY=your_zhipu_api_key
# E2B Sandbox (Required)
E2B_API_KEY=your_e2b_api_key
# Model (Optional, defaults to glm-4-flash)
GLM_MODLE=glm-4-flash
# Neon Auth (Required for authentication)
NEON_AUTH_BASE_URL=your_neon_auth_url
NEON_AUTH_COOKIE_SECRET=your_cookie_secret
# Cloudflare R2 (Required for file upload)
CLOUDFLARE_ACCOUNT_ID=your_account_id
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
NPM_REGISTRY = "https://registry.npmmirror.com"pnpm devOpen http://localhost:3000 to see the app.
pnpm build
pnpm startBuild and run with Docker Compose:
docker compose up -d --buildIf you keep environment variables in a local file, you can pass them in when starting Compose:
docker compose --env-file .env.local up -d --buildOr build and run the image directly:
docker build -t refract .
docker run -d -p 3000:3000 --env-file .env.local --name refract refractIf authentication works locally but fails on your deployed Vercel domain with an error like {"code":"INVALID_ORIGIN","message":"Invalid origin"}, your Neon Auth project is rejecting the site origin.
Add every deployed app origin to your Neon Auth / Better Auth trusted origins configuration, for example:
http://localhost:3000
https://fire-wave-agent.vercel.appYou should also make sure the same production domain is allowed in any OAuth provider callback or redirect settings you use.
| Command | Description |
|---|---|
pnpm dev |
Start dev server with Turbopack |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm check:write |
Lint & format code |
pnpm test |
Run unit tests |
pnpm test:e2e |
Run E2E tests |
MIT
