Skip to content

Waterkyuu/refract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fire Wave Agent

English | 中文

Deploy with Vercel

An autonomous AI agent web application that controls a computer — similar to OpenAI Operator. Powered by Zhipu AI models and E2B sandboxes, it provides a real-time Ubuntu desktop environment with browser automation, web search, shell command execution, and Python code interpretation.

⚠️ Note: that many features are still incomplete; this project is currently just a demo.

Features

  • Desktop Sandbox — Creates an E2B Desktop Sandbox running Ubuntu with a browser, streamed via VNC in real time
  • Browser Automation — The agent can navigate URLs, search the web via Google, and interact with web pages autonomously
  • Code Interpreter — Executes Python code in an isolated Jupyter notebook sandbox with persistent variables
  • Real-time VNC Viewer — Watch the agent operate a browser/desktop live in a resizable panel
  • Chat Interface — Full conversational chat with reasoning blocks, tool call status indicators, and multi-step agent execution
  • File Upload — Chunked file upload supporting PDF, DOCX, MD, TXT with progress tracking
  • Authentication — Login via Email OTP, Google, GitHub, or Vercel OAuth
  • Chat Session Management — Sidebar with grouped chat history, search (Ctrl+K), rename, and delete
  • Responsive Design — Split panel layout on desktop, bottom sheet on mobile

Getting Started

Prerequisites

  • Node.js 20+
  • pnpm 9+

Installation

git clone https://github.com/Waterkyuu/agent-dashboard.git
cd agent-dashboard
pnpm install

Environment Variables

Create 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"

Development

pnpm dev

Open http://localhost:3000 to see the app.

Build

pnpm build
pnpm start

Docker

Build and run with Docker Compose:

docker compose up -d --build

If you keep environment variables in a local file, you can pass them in when starting Compose:

docker compose --env-file .env.local up -d --build

Or build and run the image directly:

docker build -t fire-wave-agent .
docker run -d -p 3000:3000 --env-file .env.local --name fire-wave-agent fire-wave-agent

Authentication on Vercel

If 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.app

You should also make sure the same production domain is allowed in any OAuth provider callback or redirect settings you use.

Scripts

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

Architecture

User Input --> Home Page (/) --> /chat/[id]
                                    |
                     +--------------+---------------+
                     |                              |
                Chat Panel (30%)             VNC Panel (70%)
                - MessageArea                - E2B VNC stream
                - InputField                - Live status badge
                - DebugPanel
                     |
                POST /api/chat
                - Zhipu AI (GLM-4-flash)
                - 5 Tools:
                  * createSandbox
                  * codeInterpreter
                  * executeShell
                  * navigateBrowser
                  * searchWeb

License

Private

About

Agent Helper, like operator, help you operate computer and help you complete your work. (Beta)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages