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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/BRANCH_PROTECTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ cd control-plane
go build ./...

# Test cross-compilation
GOOS=linux GOARCH=amd64 go build ./cmd/brain-server
GOOS=darwin GOARCH=amd64 go build ./cmd/brain-server
GOOS=windows GOARCH=amd64 go build ./cmd/brain-server
GOOS=linux GOARCH=amd64 go build ./cmd/haxen-server
GOOS=darwin GOARCH=amd64 go build ./cmd/haxen-server
GOOS=windows GOARCH=amd64 go build ./cmd/haxen-server
```

### Docker Build Failures
```bash
# Test Docker build locally
docker build -f deployments/docker/Dockerfile.control-plane -t brain-control-plane:test .
docker run --rm brain-control-plane:test --help
docker build -f deployments/docker/Dockerfile.control-plane -t haxen-control-plane:test .
docker run --rm haxen-control-plane:test --help
```

## Emergency Merges
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature Request
about: Suggest an idea for Brain
about: Suggest an idea for Haxen
labels: enhancement
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Question
about: Ask a question about using Brain
about: Ask a question about using Haxen
labels: question
---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/control-plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
working-directory: control-plane
run: |
echo "Building for ${GOOS}/${GOARCH}"
go build -o /tmp/brain-server-${GOOS}-${GOARCH} ./cmd/brain-server
go build -o /tmp/haxen-server-${GOOS}-${GOARCH} ./cmd/haxen-server

# Summary job that depends on all critical checks
required-checks:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
context: .
file: deployments/docker/Dockerfile.control-plane
load: true
tags: brain-control-plane:test
tags: haxen-control-plane:test

- name: Smoke test control plane image
run: docker run --rm brain-control-plane:test --help
run: docker run --rm haxen-control-plane:test --help

# Summary job that depends on all critical checks
required-checks:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
OWNER: ${{ github.repository_owner }}
run: |
owner="$(echo "${OWNER}" | tr '[:upper:]' '[:lower:]')"
image="ghcr.io/${owner}/brain-control-plane"
image="ghcr.io/${owner}/haxen-control-plane"
if [ "${EVENT_NAME}" = "push" ]; then
tag="${REF_NAME}"
else
Expand Down
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
project_name: brain-control-plane
project_name: haxen-control-plane

before:
hooks:
- npm --prefix control-plane/web/client ci
- npm --prefix control-plane/web/client run build

builds:
- id: brain-control-plane
- id: haxen-control-plane
dir: control-plane
main: ./cmd/server
binary: brain-server
binary: haxen-server
env:
- CGO_ENABLED=0
goos:
Expand All @@ -26,9 +26,9 @@ builds:
- -s -w

archives:
- id: brain-control-plane
- id: haxen-control-plane
builds:
- brain-control-plane
- haxen-control-plane
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Our Pledge

We as members, contributors, and leaders pledge to make participation in the Brain project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
We as members, contributors, and leaders pledge to make participation in the Haxen project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Brain Monorepo
# Haxen Monorepo

Brain is an open-source platform for building, deploying, and operating production-grade AI agents. This repository brings together the control plane, language-specific SDKs, deployment assets, and documentation required to run Brain in your own environment.
Haxen is an open-source platform for building, deploying, and operating production-grade AI agents. This repository brings together the control plane, language-specific SDKs, deployment assets, and documentation required to run Haxen in your own environment.

## Repository Layout

Expand All @@ -17,8 +17,8 @@ Brain is an open-source platform for building, deploying, and operating producti
## Quick Start

```bash
git clone https://github.com/your-org/brain.git
cd brain
git clone https://github.com/your-org/haxen.git
cd haxen
./scripts/install.sh # install Go, Python, and JS dependencies
./scripts/build-all.sh # build control plane and SDKs
./scripts/test-all.sh # run repository-wide test suites
Expand Down Expand Up @@ -57,5 +57,5 @@ We welcome issues and pull requests! Please review:

## License

Brain is licensed under the Apache 2.0 License. See `LICENSE` for details.
Haxen is licensed under the Apache 2.0 License. See `LICENSE` for details.

14 changes: 7 additions & 7 deletions control-plane/.env.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BRAIN_STORAGE_MODE="postgresql"
BRAIN_STORAGE_POSTGRES_URL="postgres://postgres@localhost:5432/testdb?sslmode=disable"
BRAIN_STORAGE_POSTGRES_MAX_CONNECTIONS="10"
BRAIN_STORAGE_POSTGRES_MAX_IDLE_CONNECTIONS="2"
BRAIN_STORAGE_POSTGRES_CONNECTION_TIMEOUT="30s"
BRAIN_STORAGE_POSTGRES_QUERY_TIMEOUT="30s"
BRAIN_STORAGE_POSTGRES_ENABLE_AUTO_MIGRATION="true"
HAXEN_STORAGE_MODE="postgresql"
HAXEN_STORAGE_POSTGRES_URL="postgres://postgres@localhost:5432/testdb?sslmode=disable"
HAXEN_STORAGE_POSTGRES_MAX_CONNECTIONS="10"
HAXEN_STORAGE_POSTGRES_MAX_IDLE_CONNECTIONS="2"
HAXEN_STORAGE_POSTGRES_CONNECTION_TIMEOUT="30s"
HAXEN_STORAGE_POSTGRES_QUERY_TIMEOUT="30s"
HAXEN_STORAGE_POSTGRES_ENABLE_AUTO_MIGRATION="true"
76 changes: 38 additions & 38 deletions control-plane/.env.example
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
# Brain Server Environment Variables
# Haxen Server Environment Variables
# Copy this file to .env and modify values as needed

# Core Brain Configuration
BRAIN_PORT=8080
BRAIN_MODE=local
BRAIN_CONFIG_FILE=./config/brain.yaml
# Core Haxen Configuration
HAXEN_PORT=8080
HAXEN_MODE=local
HAXEN_CONFIG_FILE=./config/haxen.yaml

# Database Configuration (for local mode)
BRAIN_STORAGE_LOCAL_DATABASE_PATH=./brain_local.db
BRAIN_STORAGE_LOCAL_KV_STORE_PATH=./brain_local.bolt
HAXEN_STORAGE_LOCAL_DATABASE_PATH=./haxen_local.db
HAXEN_STORAGE_LOCAL_KV_STORE_PATH=./haxen_local.bolt

# UI Configuration
BRAIN_UI_ENABLED=true
BRAIN_UI_MODE=embedded
BRAIN_UI_SOURCE_PATH=./web/client
BRAIN_UI_DIST_PATH=./web/client/dist
BRAIN_UI_DEV_PORT=5173
HAXEN_UI_ENABLED=true
HAXEN_UI_MODE=embedded
HAXEN_UI_SOURCE_PATH=./web/client
HAXEN_UI_DIST_PATH=./web/client/dist
HAXEN_UI_DEV_PORT=5173

# API Configuration
BRAIN_API_CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173,http://localhost:8080
BRAIN_API_CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
BRAIN_API_CORS_ALLOWED_HEADERS=Origin,Content-Type,Accept,Authorization,X-Requested-With
BRAIN_API_CORS_EXPOSED_HEADERS=Content-Length,X-Total-Count
BRAIN_API_CORS_ALLOW_CREDENTIALS=true
HAXEN_API_CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173,http://localhost:8080
HAXEN_API_CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
HAXEN_API_CORS_ALLOWED_HEADERS=Origin,Content-Type,Accept,Authorization,X-Requested-With
HAXEN_API_CORS_EXPOSED_HEADERS=Content-Length,X-Total-Count
HAXEN_API_CORS_ALLOW_CREDENTIALS=true

# Cloud Configuration (if using cloud mode)
# BRAIN_CLOUD_ENABLED=false
# BRAIN_CLOUD_API_KEY=your-api-key-here
# HAXEN_CLOUD_ENABLED=false
# HAXEN_CLOUD_API_KEY=your-api-key-here

# Storage Configuration
BRAIN_STORAGE_MODE=local

# PostgreSQL Storage Configuration (when BRAIN_STORAGE_MODE=postgresql)
# BRAIN_STORAGE_POSTGRES_URL=postgresql://user:password@localhost:5432/brain?sslmode=disable
# BRAIN_STORAGE_POSTGRES_MAX_CONNECTIONS=25
# BRAIN_STORAGE_POSTGRES_MAX_IDLE_CONNECTIONS=5
# BRAIN_STORAGE_POSTGRES_CONNECTION_TIMEOUT=30s
# BRAIN_STORAGE_POSTGRES_QUERY_TIMEOUT=30s
# BRAIN_STORAGE_POSTGRES_ENABLE_MEMORY_FALLBACK=true
# BRAIN_STORAGE_POSTGRES_ENABLE_DID_FALLBACK=true
# BRAIN_STORAGE_POSTGRES_ENABLE_VC_FALLBACK=true
# BRAIN_STORAGE_POSTGRES_ENABLE_AUTO_MIGRATION=true

# Cloud Storage Configuration (when BRAIN_STORAGE_MODE=cloud)
# BRAIN_STORAGE_CLOUD_POSTGRES_URL=postgresql://user:password@localhost:5432/brain
# BRAIN_STORAGE_CLOUD_REDIS_URL=redis://localhost:6379
# BRAIN_STORAGE_CLOUD_MAX_CONNECTIONS=50
# BRAIN_STORAGE_CLOUD_CONNECTION_POOL=true
# BRAIN_STORAGE_CLOUD_REPLICATION_MODE=async
HAXEN_STORAGE_MODE=local

# PostgreSQL Storage Configuration (when HAXEN_STORAGE_MODE=postgresql)
# HAXEN_STORAGE_POSTGRES_URL=postgresql://user:password@localhost:5432/haxen?sslmode=disable
# HAXEN_STORAGE_POSTGRES_MAX_CONNECTIONS=25
# HAXEN_STORAGE_POSTGRES_MAX_IDLE_CONNECTIONS=5
# HAXEN_STORAGE_POSTGRES_CONNECTION_TIMEOUT=30s
# HAXEN_STORAGE_POSTGRES_QUERY_TIMEOUT=30s
# HAXEN_STORAGE_POSTGRES_ENABLE_MEMORY_FALLBACK=true
# HAXEN_STORAGE_POSTGRES_ENABLE_DID_FALLBACK=true
# HAXEN_STORAGE_POSTGRES_ENABLE_VC_FALLBACK=true
# HAXEN_STORAGE_POSTGRES_ENABLE_AUTO_MIGRATION=true

# Cloud Storage Configuration (when HAXEN_STORAGE_MODE=cloud)
# HAXEN_STORAGE_CLOUD_POSTGRES_URL=postgresql://user:password@localhost:5432/haxen
# HAXEN_STORAGE_CLOUD_REDIS_URL=redis://localhost:6379
# HAXEN_STORAGE_CLOUD_MAX_CONNECTIONS=50
# HAXEN_STORAGE_CLOUD_CONNECTION_POOL=true
# HAXEN_STORAGE_CLOUD_REPLICATION_MODE=async

# Development/Debug
# GIN_MODE=debug
Expand Down
26 changes: 13 additions & 13 deletions control-plane/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Brain Control Plane
# Haxen Control Plane

The Brain control plane orchestrates agent workflows, manages verifiable credentials, serves the admin UI, and exposes REST/gRPC APIs consumed by the SDKs.
The Haxen control plane orchestrates agent workflows, manages verifiable credentials, serves the admin UI, and exposes REST/gRPC APIs consumed by the SDKs.

## Requirements

Expand All @@ -16,25 +16,25 @@ The Brain control plane orchestrates agent workflows, manages verifiable credent
go mod download
npm --prefix web/client install

# Run database migrations (requires BRAIN_DATABASE_URL)
goose -dir ./migrations postgres "$BRAIN_DATABASE_URL" up
# Run database migrations (requires HAXEN_DATABASE_URL)
goose -dir ./migrations postgres "$HAXEN_DATABASE_URL" up

# Start the control plane
BRAIN_DATABASE_URL=postgres://brain:brain@localhost:5432/brain?sslmode=disable \
BRAIN_REDIS_URL=redis://localhost:6379/0 \
HAXEN_DATABASE_URL=postgres://haxen:haxen@localhost:5432/haxen?sslmode=disable \
HAXEN_REDIS_URL=redis://localhost:6379/0 \
go run ./cmd/server
```

Visit `http://localhost:8080/ui/` to access the embedded admin UI.

## Configuration

Environment variables override `config/brain.yaml`. Common options:
Environment variables override `config/haxen.yaml`. Common options:

- `BRAIN_DATABASE_URL` – PostgreSQL DSN
- `BRAIN_REDIS_URL` – Redis connection string
- `BRAIN_HTTP_ADDR` – HTTP listen address (`0.0.0.0:8080` by default)
- `BRAIN_LOG_LEVEL` – log verbosity (`info`, `debug`, etc.)
- `HAXEN_DATABASE_URL` – PostgreSQL DSN
- `HAXEN_REDIS_URL` – Redis connection string
- `HAXEN_HTTP_ADDR` – HTTP listen address (`0.0.0.0:8080` by default)
- `HAXEN_LOG_LEVEL` – log verbosity (`info`, `debug`, etc.)

Sample config files live in `config/`.

Expand All @@ -53,8 +53,8 @@ Run the Go server alongside the UI so API calls resolve locally. During producti
Migrations use [Goose](https://github.com/pressly/goose):

```bash
BRAIN_DATABASE_URL=postgres://brain:brain@localhost:5432/brain?sslmode=disable \
goose -dir ./migrations postgres "$BRAIN_DATABASE_URL" status
HAXEN_DATABASE_URL=postgres://haxen:haxen@localhost:5432/haxen?sslmode=disable \
goose -dir ./migrations postgres "$HAXEN_DATABASE_URL" status
```

## Testing
Expand Down
Loading
Loading