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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.8.0 (2026-06-02)

### Added
- Vite-built embedded web console served through the Worker `ASSETS` binding, including text chat, conversation history, health summary, and a voice panel using `@cloudflare/voice/react`. (aegis-oss#40)
- `AegisVoiceAdapter` standalone Worker export and Agents SDK `/agents/aegis-voice-adapter/operator` routing for Cloudflare-native voice calls. (aegis-oss#40)
- Built `public/` SPA assets in the package so a fresh checkout can deploy a working console without a private Stackbilt UI dependency. (aegis-oss#40)

### Changed
- `npm run deploy` and `npm run dev` now build the embedded UI before invoking Wrangler, and `wrangler.toml.example` includes `ASSETS`, `CHAT_SESSION`, `AegisVoiceAdapter`, `DB`, and `AI` bindings.
- The browser console uses Workers AI for its base chat path and treats Claude/Groq keys as optional executor upgrades.

### Fixed
- `/agents/*` voice routes now enforce the same `AEGIS_TOKEN` via bearer header, cookie, or query token before reaching the Agents SDK router.
- HTTP message routes skip Groq title generation when `GROQ_API_KEY` is unset.

## 0.7.0 (2026-06-02)

### Added
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ npx wrangler d1 execute my-agent --file=schema.sql

# Set secrets
npx wrangler secret put AEGIS_TOKEN # Random bearer token for auth
npx wrangler secret put ANTHROPIC_API_KEY # Claude API key
npx wrangler secret put GROQ_API_KEY # Groq key (free tier available)

# Deploy
npx wrangler deploy
npm run deploy
```

Visit `https://your-worker.workers.dev` and authenticate with your AEGIS_TOKEN.
Visit `https://your-worker.workers.dev` and authenticate with your AEGIS_TOKEN. The embedded console uses Workers AI for the base chat and voice path; Claude and Groq keys are optional executor upgrades.

Talk to the same deployment from a terminal:

Expand Down
32 changes: 31 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,28 @@ Set via `npx wrangler secret put <NAME>`:
| Secret | Required | Purpose |
|--------|----------|---------|
| `AEGIS_TOKEN` | Yes | Bearer token for chat UI auth |
| `ANTHROPIC_API_KEY` | Yes | Claude API key |
| `ANTHROPIC_API_KEY` | No | Claude executor API key |
| `GROQ_API_KEY` | No | Groq API key for fast classification |
| `GITHUB_TOKEN` | No | GitHub PAT for repo access |
| `BRAVE_API_KEY` | No | Brave Search API key |
| `RESEND_API_KEY` | No | Resend API key for email |

Base chat and voice operation use the Cloudflare Workers AI binding configured in `wrangler.toml`.

## Embedded web console

Standalone deployments serve the Vite-built web console from `web/public/` through the `ASSETS` binding:

```toml
[assets]
directory = "./public"
binding = "ASSETS"
not_found_handling = "single-page-application"
run_worker_first = ["/api/*", "/health", "/agents/*"]
```

`npm run build:ui` builds `src/ui/` into `public/`. `npm run deploy` and `npm run dev` run that build before Wrangler starts.

## Service bindings (optional)

Configure in `wrangler.toml` for inter-Worker communication:
Expand Down Expand Up @@ -198,3 +214,17 @@ Fresh databases created from `schema.sql` include the required `conversations.us
ALTER TABLE conversations ADD COLUMN user_id TEXT NOT NULL DEFAULT 'operator';
CREATE INDEX IF NOT EXISTS idx_conversations_user_updated ON conversations(user_id, updated_at);
```

## Voice Durable Object

The browser voice UI uses `@cloudflare/voice/react` and connects through the Agents SDK path `/agents/aegis-voice-adapter/operator`. Configure the matching Durable Object binding:

```toml
[[durable_objects.bindings]]
name = "AegisVoiceAdapter"
class_name = "AegisVoiceAdapter"

[[migrations]]
tag = "v2-aegis-voice-adapter"
new_sqlite_classes = ["AegisVoiceAdapter"]
```
21 changes: 11 additions & 10 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Deploy your own AEGIS agent on Cloudflare Workers in under 10 minutes.

- [Node.js](https://nodejs.org/) 18+
- A [Cloudflare](https://cloudflare.com) account (free tier works)
- An [Anthropic](https://console.anthropic.com) API key (for Claude)
- Optional: [Groq](https://console.groq.com) API key (free tier available, used for fast classification)
- Workers AI enabled in your Cloudflare account
- Optional: external model keys for Claude or Groq if you want those executors

## 1. Clone and install

Expand Down Expand Up @@ -37,7 +37,10 @@ npx wrangler d1 create my-agent

This prints a `database_id` — paste it into `wrangler.toml` under `[[d1_databases]]`.

The example Wrangler config also includes the `CHAT_SESSION` Durable Object binding and SQLite-backed migration required by `/chat/ws`.
The example Wrangler config also includes:
- the `ASSETS` binding for the Vite-built web console in `public/`
- the `CHAT_SESSION` Durable Object binding required by `/chat/ws`
- the `AegisVoiceAdapter` Durable Object binding required by the browser voice call flow

Then run the schema migration:

Expand All @@ -56,16 +59,16 @@ Edit `config.ts` to set your name, persona traits, and which integrations to ena

## 5. Set secrets

At minimum, you need an auth token and an AI model key:
At minimum, you need an auth token:

```bash
npx wrangler secret put AEGIS_TOKEN # A random bearer token you'll use to authenticate
npx wrangler secret put ANTHROPIC_API_KEY # Your Claude API key
```

Optional secrets for additional capabilities:

```bash
npx wrangler secret put ANTHROPIC_API_KEY # Claude executors
npx wrangler secret put GROQ_API_KEY # Fast classification (Llama 3.3 70B)
npx wrangler secret put GITHUB_TOKEN # Repository scanning, issue management
npx wrangler secret put BRAVE_API_KEY # Web research
Expand All @@ -75,10 +78,10 @@ npx wrangler secret put RESEND_API_KEY # Email notifications
## 6. Deploy

```bash
npx wrangler deploy
npm run deploy
```

Your agent is now live at `https://your-worker-name.your-subdomain.workers.dev`.
The deploy script builds the embedded SPA into `public/` and then runs `wrangler deploy`. Your agent is now live at `https://your-worker-name.your-subdomain.workers.dev`.

## 7. Authenticate

Expand All @@ -102,12 +105,10 @@ For local development without deploying:
# Create a .dev.vars file with your secrets
cat > ../.dev.vars << 'EOF'
AEGIS_TOKEN=test-token
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...
EOF

# Run locally
npx wrangler dev
npm run dev
```

## Next steps
Expand Down
4 changes: 2 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Push a semver tag from `main`:

```bash
git tag v0.7.0
git push origin v0.7.0
git tag v0.8.0
git push origin v0.8.0
```

The workflow installs dependencies, runs typecheck/tests, then publishes `web/package.json` to npm.
Expand Down
83 changes: 78 additions & 5 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackbilt/aegis-core",
"version": "0.7.0",
"version": "0.8.0",
"description": "Persistent AI agent framework for Cloudflare Workers. Multi-tier memory, autonomous goals, dreaming cycles, MCP native.",
"license": "Apache-2.0",
"publishConfig": {
Expand Down Expand Up @@ -80,8 +80,9 @@
"./kernel/patterns": "./src/kernel/patterns.ts"
},
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy",
"dev": "npm run build:ui && wrangler dev",
"deploy": "npm run build:ui && wrangler deploy",
"build:ui": "vite build --config vite.ui.config.ts",
"d1:create": "wrangler d1 create aegis-web",
"d1:migrate": "wrangler d1 execute aegis-web --file=schema.sql",
"d1:migrate:local": "wrangler d1 execute aegis-web --file=schema.sql --local",
Expand All @@ -96,10 +97,15 @@
"@stackbilt/llm-providers": "^1.6.4",
"agents": "^0.12.3",
"hono": "^4.12.12",
"partysocket": "^1.1.19",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"zod": "^4.4.3"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241218.0",
"@types/react": "^19.2.16",
"@types/react-dom": "^19.2.3",
"typescript": "^5.7.3",
"vite": "^8.0.5",
"vitest": "^4.0.18",
Expand All @@ -108,6 +114,10 @@
"files": [
"cli/**/*.mjs",
"src/**/*.ts",
"src/**/*.tsx",
"src/ui/**/*.css",
"src/ui/**/*.html",
"public/**/*",
"schema.sql"
],
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions web/public/assets/index-CQHn03rW.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions web/public/assets/index-CTKpNJEr.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions web/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#101317" />
<title>AEGIS</title>
<script type="module" crossorigin src="/assets/index-CTKpNJEr.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CQHn03rW.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
Loading