Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: [master, main]
pull_request:

permissions:
contents: read

jobs:
backend:
name: Backend
runs-on: ubuntu-latest
defaults:
run:
working-directory: dash/backend
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: dash/backend/go.mod
cache: true

- name: Run Go tests
run: go test ./...

- name: Check Go formatting
run: test -z "$(gofmt -l .)"

frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: dash/frontend
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: dash/frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Local configuration and secrets
.env
.env.*
!.env.example
*.key
*.pem
*.p12

# Runtime state and generated data
*.db
*.db-*
*.sqlite
*.sqlite3
dash/backend/data/workspaces/

# Build output and dependencies
node_modules/
dist/
coverage/
dash/backend/apollo-dash*

# Local tooling and OS files
.claude/
.playwright-mcp/
.DS_Store
90 changes: 88 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,88 @@
# apollo
Self-hosted AI workforce platform for building and operating autonomous agent companies with organization management, tasks, memory, MCP tools, schedules, governance, and audit logs.
# AgentHQ

AgentHQ is a self-hosted dashboard for building and operating AI companies. It combines a Go backend with a React frontend for agent organization, tasks, memory, MCP tools, schedules, governance, and audit history.

## Project layout

```text
dash/
├── backend/ Go API, SQLite persistence, workers, and static file server
└── frontend/ React + Vite dashboard
```

## Requirements

- Go 1.25.6 or newer
- Node.js 20 or newer
- npm

## Local development

1. Create local backend configuration:

```bash
cp dash/backend/.env.example dash/backend/.env
```

Set `DASHBOARD_PASSWORD` and add an `OPENROUTER_API_KEY` if you want to use hosted models. Keep `.env` local; it is ignored by Git.

2. Install frontend dependencies and build the dashboard:

```bash
cd dash/frontend
npm ci
npm run build
```

3. Start the backend:

```bash
cd dash/backend
go run .
```

The dashboard is available at `http://localhost:4000`.

For frontend hot reload, run `npm run dev` in `dash/frontend` and keep the backend running on port 4000. The Vite proxy forwards `/api` and `/ws` requests to the backend.

## Verification

Run the same checks used by CI:

```bash
cd dash/backend
go test ./...

cd ../frontend
npm run lint
npm run build
```

## Production build

`dash/backend/build.sh` cross-compiles Linux AMD64 and ARM64 backend binaries with Zig, then builds the frontend. Install Zig first:

```bash
brew install zig
cd dash/backend
./build.sh
```

The generated binaries, frontend bundle, database, runtime workspace, and credentials are intentionally excluded from version control.

## Configuration

The main backend settings are documented in `dash/backend/.env.example`:

- `PORT` — HTTP port, default `4000`
- `DASHBOARD_PASSWORD` — admin password for protected routes
- `OPENROUTER_API_KEY` — hosted model and embedding access
- `OPENAI_API_KEY` — optional OpenAI-compatible fallback
- `RESEND_API_KEY` and `APP_URL` — optional email notifications
- `VULTA_API_KEY` and `VULTA_WEBHOOK_SECRET` — optional billing integration
- `AGENTHQ_WORKSPACE_ROOT` — optional override for workspace storage
- `OLLAMA_API_URL` — optional local Ollama-compatible endpoint
- `APOLLO_DEBUG_SYSTEM_LOG` — optional verbose model prompt logging
- `CONTEXTPLUS_EMBED_TRACKER` — optional embedding tracking toggle

Never commit real credentials, private keys, SQLite databases, or built binaries.
70 changes: 70 additions & 0 deletions dash/backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# AgentHQ backend environment template
#
# Copy this file to .env for local development:
# cp .env.example .env
#
# Never commit .env or paste real credentials into this file. Use your
# deployment platform's secret manager in production.

# -----------------------------------------------------------------------------
# Server and authentication
# -----------------------------------------------------------------------------

# HTTP listen port. Defaults to 4000.
PORT=4000

# Required for admin access and API Basic Auth fallback.
# Generate a strong value with: openssl rand -base64 32
DASHBOARD_PASSWORD=replace-with-a-strong-random-password

# Public application URL used in email links. Leave commented for the built-in
# default, or set your local/deployed URL explicitly.
# APP_URL=http://localhost:4000

# -----------------------------------------------------------------------------
# AI providers
# -----------------------------------------------------------------------------

# Recommended hosted provider. Required for OpenRouter-backed chat, agents, and
# embeddings unless a user-level key or local Ollama provider is configured.
OPENROUTER_API_KEY=replace-with-your-openrouter-api-key

# Optional OpenAI-compatible fallback for embeddings and AI features.
# OPENAI_API_KEY=replace-with-your-openai-api-key

# Optional local Ollama-compatible endpoint. The application defaults to
# http://localhost:11434 when this is not set.
# OLLAMA_API_URL=http://localhost:11434

# -----------------------------------------------------------------------------
# Workspace and local storage
# -----------------------------------------------------------------------------

# Optional persistent workspace location. Defaults to ./data/workspaces.
# Use an absolute path for production deployments.
# AGENTHQ_WORKSPACE_ROOT=/var/lib/agenthq/workspaces

# Legacy alias accepted by workspace tools. Prefer AGENTHQ_WORKSPACE_ROOT.
# APOLLO_WORKSPACE_ROOT=/var/lib/agenthq/workspaces

# -----------------------------------------------------------------------------
# Optional integrations
# -----------------------------------------------------------------------------

# Resend email delivery. Leave unset to disable email notifications.
# RESEND_API_KEY=replace-with-your-resend-api-key

# Vulta billing API and webhook signing secret. Leave unset to disable billing.
# VULTA_API_KEY=replace-with-your-vulta-api-key
# VULTA_WEBHOOK_SECRET=replace-with-your-vulta-webhook-secret

# -----------------------------------------------------------------------------
# Diagnostics and indexing
# -----------------------------------------------------------------------------

# Include verbose model prompts in the system log panel. Keep disabled in
# production because prompts can contain sensitive workspace data.
APOLLO_DEBUG_SYSTEM_LOG=false

# ContextPlus embedding tracking is enabled by default. Set false to disable it.
# CONTEXTPLUS_EMBED_TRACKER=false
Loading
Loading