A dedicated web interface for Scout, a production-ready AI agent with transparent ethical reasoning.
ScoutGUI provides a Next.js 15-based frontend for interacting with Scout, featuring:
- Real-time reasoning visualization via Server-Sent Events (SSE)
- Full transparency into decision-making processes
- OAuth authentication (Google, Discord)
- Environmental impact tracking
- Billing integration for production usage
- apps/agui – Next.js 15 frontend using the CIRIS SDK
- docker/ – Dockerfiles for local development (optional)
- scripts/ – Development and deployment scripts
- Node.js 18+ and pnpm
- Access to Scout API (via Cloudflare)
-
Install dependencies:
cd apps/agui pnpm install -
Copy environment configuration:
cp .env.example .env.local
-
Update
.env.localwith your Scout API URL:NEXT_PUBLIC_SCOUT_API_URL=https://your-scout-api-url.com
-
Set up git hooks (recommended):
./.githooks/setup.sh
This installs pre-commit hooks that run type checking, tests, and build validation before each commit.
-
Run development server:
pnpm dev
The interface will be available at http://localhost:3000
Key configuration variables:
NEXT_PUBLIC_SCOUT_API_URL– Scout agent API base URL (accessed through Cloudflare)NEXT_PUBLIC_API_BASE_URL– Alias for Scout API URLNEXT_PUBLIC_SCOUT_API_PORT– API port (default: 8080, for local development)
See .env.example for complete configuration options.
ScoutGUI is configured for deployment to Cloudflare Pages using Wrangler.
- Wrangler CLI installed globally
- Cloudflare account with Pages enabled
- Scout API endpoint configured at
scoutapilb.ciris.ai
-
Install Wrangler globally (if not already installed):
npm install -g wrangler
-
Authenticate with Cloudflare:
wrangler login
-
Navigate to the app directory:
cd apps/agui
Build the Next.js app for Cloudflare Pages:
npm run pages:buildThis command:
- Runs Next.js build with static export
- Uses
@cloudflare/next-on-pagesadapter - Outputs to
.vercel/output/staticdirectory
Deploy to Cloudflare Pages:
npm run pages:deployThis will build and deploy your application. The first deployment will create a new Pages project.
Configure environment variables in the Cloudflare dashboard:
-
Go to your Cloudflare Pages project
-
Navigate to Settings → Environment variables
-
Add the following variables:
Production:
NEXT_PUBLIC_SCOUT_API_URL=https://scoutapilb.ciris.aiNEXT_PUBLIC_API_BASE_URL=https://scoutapilb.ciris.aiNEXT_PUBLIC_SCOUT_API_PORT=8080NEXT_PUBLIC_OAUTH_CLIENT_ID= (your OAuth client ID)NEXT_PUBLIC_OAUTH_REDIRECT_URI=https://yourdomain.com/oauth/scout/google/callback
Preview (optional): Set the same variables for preview deployments if needed.
Update your OAuth provider settings with the production callback URLs:
- Google OAuth:
https://yourdomain.com/oauth/scout/google/callback - Discord OAuth:
https://yourdomain.com/oauth/scout/discord/callback
Replace yourdomain.com with your actual Cloudflare Pages domain.
- In Cloudflare Pages dashboard, go to your project
- Navigate to Custom domains
- Add your domain (e.g.,
scout.ciris.ai) - Update DNS records as instructed
- Update OAuth redirect URIs to match your custom domain
Test the Cloudflare Pages build locally:
npm run previewThis builds the app and serves it using Wrangler's local development server.
For automatic deployments:
- Connect your GitHub repository to Cloudflare Pages
- Configure build settings:
- Build command:
cd apps/agui && npm install && npm run pages:build - Build output directory:
apps/agui/.vercel/output/static - Root directory:
/
- Build command:
- Set environment variables in the Cloudflare dashboard
- Every push to your main branch will trigger a deployment
Build failures:
- Ensure all dependencies are installed:
pnpm install - Check that
output: 'export'is set innext.config.js - Verify environment variables are set correctly
OAuth callback errors:
- Verify redirect URIs match exactly in OAuth provider settings
- Check that callback URLs use HTTPS in production
- Ensure environment variables are set in Cloudflare dashboard
API connection issues:
- Confirm
NEXT_PUBLIC_SCOUT_API_URLpoints tohttps://scoutapilb.ciris.ai - Check CORS settings on the Scout API
- Verify the API is accessible from your deployment
- Interactive Chat: Communicate with Scout in natural language
- Reasoning Transparency: See each thought processed through Scout's decision-making pipeline
- View Modes: Toggle between Basic (simplified) and Detailed (full pipeline) views
- Environmental Impact: Track carbon emissions and water usage for each interaction
- System monitoring and health checks
- User management and access control
- Audit trail viewing
- Runtime control and configuration
ScoutGUI is built as a single-agent interface (unlike multi-agent CIRISGUI):
- Hardcoded to connect to Scout agent only
- No agent selection or discovery
- Simplified authentication flow
- Direct API communication via Cloudflare
See LICENSE file for details.