Skip to content

Commit bcf6b11

Browse files
committed
✨ feat(console): replace Streamlit chat with React console, align API and core contracts
Introduce `apps/meeseeks_console/`, a React + Vite web frontend for task orchestration that connects through the REST API. Remove the obsolete Streamlit-based `apps/meeseeks_chat/` and all associated Docker, CI, and documentation references. Core orchestration changes: - Wire MCP tool scoping end-to-end: `context.mcp_tools[]` from the frontend now filters the tool schema via a new `filter_specs()` function in `tool_registry.py`, threaded through SessionRuntime → Orchestrator → ToolUseLoop. - Wire uploaded attachment content into the LLM system prompt via `ContextBuilder` (text files read from disk, capped per file/total). - Fix user steering: switch `AgentContext` from `asyncio.Queue`/`Event` to stdlib `queue.Queue`/`threading.Event` for cross-thread safety; wire `RunHandle` steering objects through the full call chain so `enqueue_message()` and `interrupt_step()` work. - Fix `summarize_session()` status mapping: `done_reason` values `canceled`, `error`, `max_steps_reached` now set the `status` field correctly instead of falling through to `completed`. - Extract reusable `filter_specs()` from `spawn_agent._filter_tool_specs` into `tool_registry` (DRY). API changes: - Pass `allowed_tools` from `context.mcp_tools` to `start_async()` and `run_sync()` for both async and legacy sync endpoints. - Add `POST /sessions/<id>/message` (user steering mid-session). - Add `POST /sessions/<id>/interrupt` (step interruption). - Add `GET /sessions/<id>/agents` (sub-agent tree from transcript). - Add CORS `after_request` hook for cross-origin frontend access. - Fix `Dockerfile.api` exposed port from 5123 to 5124. Console frontend: - Add `sub_agent` event rendering in logs (depth-indented start/stop). - Fix `StatusBadge` for `max_steps_reached` done reason. - Add `sendMessage` and `interruptStep` API client functions. - Enable text input while session is running (steering messages). - Add sub-agent count indicator in conversation timeline. Infrastructure: - Per-project Makefiles for console (npm), API (uv), and CLI (uv). - `docker/Dockerfile.console` (multi-stage node + nginx build). - `docker/nginx-console.conf` (reverse-proxy /api/ to backend). - `apps/meeseeks_api/docker-compose.yml` (full API + Console stack). - `apps/meeseeks_console/docker-compose.yml` (standalone console). - Docker CI updated to build `meeseeks-console` image instead of chat. - Dependabot entry added for console npm dependencies. Documentation: - All references to Streamlit, meeseeks_chat, Magic Patterns, and Codex Console branding removed across README, CLAUDE.md, docs/, pyproject.toml, mkdocs.yml, codecov.yml, conftest, build-install.sh, and AGENTS.md shim files. - Console introduced as a current feature in README (replacing the "What's Next" teaser) and docs/clients-web-api.md. - Rename `ChatConfig` fields from `streamlit_port`/`streamlit_address` to `port`/`address` for backward-compatible config parsing.
1 parent 69e14a2 commit bcf6b11

116 files changed

Lines changed: 13931 additions & 1026 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ updates:
9696
prefix-development: "⬆️"
9797
include: "scope"
9898

99-
- package-ecosystem: "pip"
100-
directory: "/apps/meeseeks_chat"
99+
- package-ecosystem: "npm"
100+
directory: "/apps/meeseeks_console"
101101
schedule:
102102
interval: "weekly"
103103
day: "monday"
104104
time: "09:00"
105105
timezone: "America/Los_Angeles"
106106
open-pull-requests-limit: 3
107107
groups:
108-
chat-python:
108+
console-npm:
109109
patterns:
110110
- "*"
111111
update-types:

.github/workflows/docker-buildx.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ jobs:
6060
type=raw,value=stable,enable=${{ steps.extract_version.outputs.release_type == 'stable' }}
6161
type=raw,value=dev,enable=${{ steps.extract_version.outputs.release_type == 'dev' }}
6262
63-
- name: Docker meta for meeseeks-chat
64-
id: meta_chat
63+
- name: Docker meta for meeseeks-console
64+
id: meta_console
6565
uses: docker/metadata-action@v5
6666
with:
67-
images: ghcr.io/bearlike/meeseeks-chat
67+
images: ghcr.io/bearlike/meeseeks-console
6868
tags: |
6969
type=raw,value=${{ steps.extract_version.outputs.version }}${{ steps.extract_version.outputs.release_type == 'dev' && '-dev' || '' }}
7070
type=raw,value=latest,enable=${{ steps.extract_version.outputs.release_type == 'latest' }}
@@ -106,15 +106,15 @@ jobs:
106106
tags: ${{ steps.meta_base.outputs.tags }}
107107
labels: ${{ steps.meta_base.outputs.labels }}
108108

109-
- name: Build and push meeseeks-chat
109+
- name: Build and push meeseeks-console
110110
uses: docker/build-push-action@v5
111111
with:
112112
context: .
113-
file: docker/Dockerfile.chat
113+
file: docker/Dockerfile.console
114114
platforms: linux/amd64,linux/arm64
115115
push: ${{ github.event_name != 'pull_request' }}
116-
tags: ${{ steps.meta_chat.outputs.tags }}
117-
labels: ${{ steps.meta_chat.outputs.labels }}
116+
tags: ${{ steps.meta_console.outputs.tags }}
117+
labels: ${{ steps.meta_console.outputs.labels }}
118118
build-args: |
119119
BASE_IMAGE=ghcr.io/bearlike/meeseeks-base:${{ steps.extract_version.outputs.version }}${{ steps.extract_version.outputs.release_type == 'dev' && '-dev' || '' }}
120120

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ apps/meeseeks_cli/data/
154154
# Local config files (MCP/tool manifests, secrets)
155155
**/app.json
156156
**/*config.json
157+
!apps/meeseeks_console/tsconfig.json
158+
!apps/meeseeks_console/tsconfig.node.json
157159
configs/*.toml
158160
configs/*.yaml
159161
configs/*.yml

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Agents Guide - Personal Assistant (Meeseeks)
22

33
## What this codebase is
4-
Meeseeks is a multi-agent LLM personal assistant with an async sub-agent hypervisor. The core engine uses a single async `ToolUseLoop` that the LLM drives via native `bind_tools` / `tool_use`. Sub-agents are spawned via a `spawn_agent` tool, tracked by an `AgentHypervisor`, and cleaned up via structured concurrency. It ships multiple interfaces (CLI, chat UI, REST API, Home Assistant) that share the same core engine.
4+
Meeseeks is a multi-agent LLM personal assistant with an async sub-agent hypervisor. The core engine uses a single async `ToolUseLoop` that the LLM drives via native `bind_tools` / `tool_use`. Sub-agents are spawned via a `spawn_agent` tool, tracked by an `AgentHypervisor`, and cleaned up via structured concurrency. It ships multiple interfaces (CLI, web console, REST API, Home Assistant) that share the same core engine.
55

66
## Core entry points
77
- `packages/meeseeks_core/src/meeseeks_core/tool_use_loop.py`: async tool-use conversation loop (`ToolUseLoop`) — the core execution engine
@@ -16,7 +16,7 @@ Meeseeks is a multi-agent LLM personal assistant with an async sub-agent hypervi
1616
- `packages/meeseeks_core/src/meeseeks_core/session_store.py`: transcript storage, tags, and archive state
1717
- `packages/meeseeks_core/src/meeseeks_core/config.py`: `AppConfig` including `AgentConfig` (max_depth, max_concurrent, allowed_models, etc.)
1818
- `packages/meeseeks_tools/src/meeseeks_tools/`: tool implementations and integration glue
19-
- `apps/meeseeks_chat/src/meeseeks_chat/chat_master.py`: Streamlit UI
19+
- `apps/meeseeks_console/`: Web console (React + Vite, connects via REST API)
2020
- `apps/meeseeks_api/src/meeseeks_api/backend.py`: Flask API
2121
- `apps/meeseeks_cli/src/meeseeks_cli/cli_master.py`: terminal CLI with Rich Live agent display
2222
- `meeseeks_ha_conversation/`: Home Assistant integration
@@ -135,8 +135,8 @@ Official library/framework documentation and code examples.
135135
- Local dev uses `uv` with `configs/app.json` (and `configs/mcp.json` when using MCP).
136136
- Core-only install: `uv sync`.
137137
- Full dev install: `uv sync --all-extras --all-groups`.
138-
- Run interfaces from repo root with `uv run meeseeks`, `uv run meeseeks-api`, or `uv run meeseeks-chat`.
139-
- Dockerfiles live under `docker/` for base, chat, and API; Compose is supported when needed.
138+
- Run interfaces from repo root with `uv run meeseeks`, `uv run meeseeks-api`, or `cd apps/meeseeks_console && npm run dev`.
139+
- Dockerfiles live under `docker/` for base, console, and API; Compose is supported when needed.
140140

141141
## Linting & formatting
142142
- Primary linting uses `ruff` (root + subpackages). Auto-fix with `.venv/bin/ruff check --fix .`.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ bootstrap:
66
uv venv $(VENV)
77
uv pip install -e .[dev]
88
uv pip install -e packages/meeseeks_core -e packages/meeseeks_tools \
9-
-e apps/meeseeks_api -e apps/meeseeks_chat -e apps/meeseeks_cli \
9+
-e apps/meeseeks_api -e apps/meeseeks_cli \
1010
-e meeseeks_ha_conversation
1111

1212
lint:

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<a href="https://github.com/bearlike/Assistant/actions/workflows/docs.yml"><img alt="Docs" src="https://github.com/bearlike/Assistant/actions/workflows/docs.yml/badge.svg"></a>
99
<a href="https://codecov.io/gh/bearlike/Assistant"><img src="https://codecov.io/gh/bearlike/Assistant/graph/badge.svg?token=OJ2YUCIZ2I" alt="Codecov"></a>
1010
<a href="https://github.com/bearlike/Assistant/releases"><img src="https://img.shields.io/github/v/release/bearlike/Assistant" alt="GitHub Release"></a>
11-
<a href="https://github.com/bearlike/Assistant/pkgs/container/meeseeks-chat"><img src="https://img.shields.io/badge/ghcr.io-bearlike/meeseeks--chat:latest-blue?logo=docker&logoColor=white" alt="Docker Image"></a>
1211
<a href="https://github.com/bearlike/Assistant/pkgs/container/meeseeks-api"><img src="https://img.shields.io/badge/ghcr.io-bearlike/meeseeks--api:latest-blue?logo=docker&logoColor=white" alt="Docker Image"></a>
1312
</p>
1413

@@ -36,23 +35,21 @@ Meeseeks is an AI task agent assistant built on a single async tool-use loop dri
3635
<tr>
3736
<th>Answer questions and interpret sensor information</th>
3837
<th>Control devices and entities</th>
39-
<th>Web chat interface</th>
4038
</tr>
4139
<tr>
4240
<td align="center"><img src="docs/screenshot_ha_assist_1.png" alt="Screenshot" height="512px"></td>
4341
<td align="center"><img src="docs/screenshot_ha_assist_2.png" alt="Screenshot" height="512px"></td>
44-
<td align="center"><img src="docs/screenshot_chat_app_1.png" alt="Screenshot of Meeseks WebUI" height="512px"></td>
4542
</tr>
4643
</table>
4744

48-
## What's next (Meeseeks Console)
45+
## Meeseeks Console
4946

50-
We are upgrading the API backend to better support a task-orchestration frontend. Next up: finalize the API shape, then polish the frontend and ship the full console experience.
47+
The web console provides a task orchestration frontend backed by the REST API. It supports session management, real-time event polling, tool selection, and execution trace viewing.
5148

5249
<table align="center">
5350
<tr>
54-
<th>Task detail page (coming soon)</th>
55-
<th>Landing console (coming soon)</th>
51+
<th>Task detail page</th>
52+
<th>Console landing page</th>
5653
</tr>
5754
<tr>
5855
<td align="center"><img src="docs/meeseeks-console-02-tasks.jpg" alt="Meeseeks task detail page preview" height="512px"></td>
@@ -83,7 +80,7 @@ We are upgrading the API backend to better support a task-orchestration frontend
8380
- (✅) **Local file + shell tools:** Built-in Aider adapters for edit blocks, read files, list dirs, and shell commands (approval-gated). Edit blocks require strict SEARCH/REPLACE format; the tool returns format guidance on mismatches.
8481
- (✅) **Home Assistant:** Ships a Conversation integration for voice control and entity actions.
8582
- (✅) **REST API:** Exposes the assistant over HTTP for third-party integration.
86-
- (✅) **Web chat UI:** Streamlit interface with plans, tool input types, and responses.
83+
- (✅) **Web console:** Task orchestration frontend backed by the REST API (React + Vite).
8784
- (✅) **Terminal CLI:** Fast interactive shell with plan visibility and tool result cards.
8885

8986
## Safety and observability
@@ -100,7 +97,7 @@ Optional features that can be installed when needed.
10097
- **CLI layout adapts to terminal width.** Headers and tool result cards adjust to small and wide shells.
10198
- **Interactive CLI controls.** Use a model picker, MCP browser, session summary, and token budget commands.
10299
- **Inline approvals.** Rich-based approval prompts render with padded, dotted borders and clear after input.
103-
- **Unified experience.** Web, API, Home Assistant, and CLI interfaces share the same core engine to reduce duplicated maintenance.
100+
- **Unified experience.** Console, API, Home Assistant, and CLI interfaces share the same core engine to reduce duplicated maintenance.
104101
- **Shared session runtime.** The API exposes polling endpoints; the CLI runs the same runtime in-process for sync execution, cancellation, and summaries.
105102
- **Event payloads.** `action_plan` steps are `{title, description}`; `tool_result`/`permission` use `tool_id`, `operation`, and `tool_input`.
106103

@@ -109,7 +106,7 @@ Optional features that can be installed when needed.
109106
- `packages/meeseeks_core/`: orchestration loop, schemas, session storage, compaction, tool registry.
110107
- `packages/meeseeks_tools/`: tool implementations and integrations (including Home Assistant and MCP).
111108
- `apps/meeseeks_api/`: Flask REST API for programmatic access.
112-
- `apps/meeseeks_chat/`: Streamlit UI for interactive chat.
109+
- `apps/meeseeks_console/`: Web console for task orchestration (React + Vite).
113110
- `apps/meeseeks_cli/`: Terminal CLI frontend for interactive sessions.
114111
- `meeseeks_ha_conversation/`: Home Assistant integration that routes voice to the API.
115112
- `packages/meeseeks_core/src/meeseeks_core/prompts/`: planner prompts and tool instructions.
@@ -123,7 +120,7 @@ flowchart LR
123120
subgraph Clients["Clients / Interfaces"]
124121
User[User]
125122
CLI["CLI\n(apps/meeseeks_cli)"]
126-
Chat["Chat UI\n(apps/meeseeks_chat)"]
123+
Console["Console\n(apps/meeseeks_console)"]
127124
API["REST API\n(apps/meeseeks_api)"]
128125
HA["Home Assistant\n(meeseeks_ha_conversation)"]
129126
end
@@ -167,12 +164,12 @@ flowchart LR
167164
end
168165
169166
User --> CLI
170-
User --> Chat
167+
User --> Console
171168
User --> API
172169
HA --> API
173170
174171
CLI --> SessionRuntime
175-
Chat --> SessionRuntime
172+
Console --> API
176173
API --> SessionRuntime
177174
178175
SessionRuntime --> TaskMaster
@@ -235,7 +232,7 @@ Optional components:
235232
```bash
236233
uv sync --extra cli # CLI
237234
uv sync --extra api # REST API
238-
uv sync --extra chat # Streamlit UI
235+
cd apps/meeseeks_console && npm install # Web console
239236
uv sync --extra ha # Home Assistant integration
240237
```
241238

apps/meeseeks_api/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
This is a shim file for Codex/OpenAI agents.
1+
This is a shim file for external agents.
22

33
Read and follow [@CLAUDE.md](./CLAUDE.md) in this directory as the source of truth for project instructions.

apps/meeseeks_api/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.PHONY: install dev lint test
2+
3+
install: ## Install package in editable mode
4+
uv pip install -e .
5+
6+
dev: ## Start the API server
7+
uv run meeseeks-api
8+
9+
lint: ## Run ruff on source
10+
ruff check src/
11+
12+
test: ## Run tests
13+
uv run pytest tests/ -q

apps/meeseeks_api/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Meeseeks API Server
22
<p align="center">
3-
<a href="https://github.com/bearlike/Assistant/pkgs/container/meeseeks-chat"><img src="https://img.shields.io/badge/ghcr.io-bearlike/meeseeks&#x2212;api:latest-blue?style=for-the-badge&logo=docker&logoColor=white" alt="Docker Image"></a>
3+
<a href="https://github.com/bearlike/Assistant/pkgs/container/meeseeks-api"><img src="https://img.shields.io/badge/ghcr.io-bearlike/meeseeks&#x2212;api:latest-blue?style=for-the-badge&logo=docker&logoColor=white" alt="Docker Image"></a>
44
<a href="https://github.com/bearlike/Assistant/releases"><img src="https://img.shields.io/github/v/release/bearlike/Assistant?style=for-the-badge&" alt="GitHub Release"></a>
55
</p>
66

@@ -32,3 +32,17 @@ uv run meeseeks-api
3232
- `GET /api/share/{token}` fetch shared session data
3333

3434
[Link to GitHub Repository](https://github.com/bearlike/Assistant)
35+
36+
## Docker Compose
37+
38+
Deploy the API and console together:
39+
40+
```bash
41+
docker compose up --build
42+
```
43+
44+
This starts:
45+
- **API** on port 5124
46+
- **Console** on port 3000 (proxies `/api/` to the API container)
47+
48+
Set `MASTER_API_TOKEN` in the environment or `.env` file to override the default API key.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
services:
2+
api:
3+
build:
4+
context: ../..
5+
dockerfile: docker/Dockerfile.api
6+
ports:
7+
- "5124:5124"
8+
volumes:
9+
- ../../configs:/app/configs:ro
10+
- api-data:/app/data
11+
environment:
12+
- MASTER_API_TOKEN=${MASTER_API_TOKEN:-msk-strong-password}
13+
14+
console:
15+
build:
16+
context: ../..
17+
dockerfile: docker/Dockerfile.console
18+
ports:
19+
- "3000:3000"
20+
depends_on:
21+
- api
22+
23+
volumes:
24+
api-data:

0 commit comments

Comments
 (0)