Metadata-Version: 2.3
Name: mh-local
Version: 0.1.0a5
Summary: Minimal Harness Client — pure local Agent assistant
Requires-Dist: uvicorn[standard]>=0.30.0
Requires-Dist: mh-gateway>=0.1.0a6
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# mh-local

A self-contained local Agent assistant powered by [minimal-harness](https://github.com/J0ey1iu/minimal-harness). It bundles a FastAPI backend with a built-in Vue 3 SPA frontend — no database, no external service dependencies.

Latest version: **0.1.0a1**

## Features

- **No cloud required** — runs entirely on localhost, single-user
- **Built-in web UI** — chat interface with agent, scene, tool, and LLM provider management
- **No database** — file-based sessions and registries under `~/.config/mh-local/`
- **Auto-discovery** — automatically creates a workspace scene from the current directory

## Quick start

```bash
uv add mh-local
uv run mh-local
```

Your browser will open automatically to `http://127.0.0.1:<port>`.

On first run, you'll be prompted to configure an LLM provider (API key, base URL) via the web UI's Provider management page.

## Usage

After starting, mh-local serves a full-featured chat UI at the local URL with:

- **Chat** — converse with AI agents with streaming responses
- **Manage Agents** — view and configure built-in agents (General Assistant, Code Reviewer, Writer)
- **Manage Tools** — inspect available tools (bash, handoff, discover_agents, and more)
- **Manage Scenes** — workspace management for different projects
- **Manage Providers** — configure LLM providers (OpenAI, Anthropic, etc.)

## How it works

```
mh-local
  ├── FastAPI app (mh_gateway-based) — serves API + static files
  ├── Vue 3 SPA — chat UI served at /
  ├── File-based stores:
  │   ├── sessions/ — conversation history
  │   ├── providers.json — LLM provider config
  │   └── registry.json — agents, tools, scenes
  └── Local auth — auto-grants admin access
```

## Configuration

All configuration is done through the web UI. Persistent data lives at:

| Path | Contents |
|------|----------|
| `~/.config/mh-local/providers.json` | LLM provider credentials |
| `~/.config/mh-local/registry.json` | Agent/tool/scene registrations |
| `~/.config/mh-local/sessions/` | Chat session files |
| `~/.config/mh-local/logs/` | Runtime logs |

## Development

```bash
# Build frontend (SPA + component UMD bundles)
powershell scripts/build-mh-local-frontend.ps1   # Windows
bash scripts/build-mh-local-frontend.sh           # Linux/macOS

# Run
uv run mh-local
```
