Zephyr is a local-first AI sidekick with a primary React control room backed by a FastAPI bridge over the shared Python runtime. The browser UI is the default interface now; the CLI remains available as the explicit fallback/operator surface.
- Primary interface:
run.batorrun-hybrid.bat, which start the React control room and FastAPI backend together. - Fallback interface:
run-cli.bat, which starts the terminal CLI on the same shared runtime stack. - Shared runtime:
core/app_runtime.py, reused by the CLI, backend services, and verification workflows. - Backend bridge:
backend/api/routes/, which exposes status, runtime, sessions, chat, missions, and command-center inspection. - Frontend views:
Chat,Command Center,Posture, andActivity.
graph TD
User([User]) --> React[React Control Room]
User -. fallback .-> CLI[CLI Operator Surface]
subgraph Frontend
React --> Chat[Chat]
React --> CommandCenter[Command Center]
React --> Posture[Posture]
React --> Activity[Activity]
end
React <--> API[FastAPI Hybrid API]
CLI <--> Runtime[Shared AppRuntime]
API <--> Runtime
Runtime --> Memory[Memory Manager / SQLite History]
Runtime --> Tools[Tool Engine / Skills / MCP]
Runtime --> LLM[LLM Router]
Runtime --> Search[Background Search Runtime]
Runtime --> Agency[Mission Orchestrator]
Tools --> Sandbox[Sandbox Backend]
- Streaming chat over Server-Sent Events through
/api/chat/stream. - Streaming mission progress through
/api/missions/stream. - Progressive runtime reload and prepare activity through
/api/runtime/reload/streamand/api/runtime/prepare/stream. - Session restore from browser
sessionStorageplus persisted message history through/api/sessions. - Browser-native command-center coverage for
/skills,/memory,/mcp,/verify,/help,/reload,/prepare,/session, and/mission. - Privacy posture and runtime trust visibility surfaced in the
Postureview. - Startup guidance, runtime metrics, execution mode, and preparation output surfaced in the
Activityview. - Browser confirmation for sensitive tool usage when
REQUIRE_CONFIRMATION=true. - Shared runtime preparation for sandbox assets, embedding-model cache, and provider-specific local assets.
- Optional MCP and Claude-Mem subprocess integrations when enabled in the environment.
Zephyr/
├── backend/ FastAPI bridge, schemas, and backend services
├── frontend/ React + Vite control room
├── core/ Shared runtime, orchestration, memory, search, and tooling
├── skills/ Built-in and dynamic skill packages
├── knowledge/ Durable memory and persona assets
├── data/ Scenarios, SQLite DB, keyword index, and vector store
├── config.py Central runtime configuration
├── main.py CLI entry point
├── setup.bat Interactive setup flow
├── run.bat Primary launcher
├── run-hybrid.bat Explicit hybrid launcher
├── run-cli.bat CLI fallback launcher
├── verify_command_center_inventory.py
└── verify_hybrid_workflow.py
Prerequisites:
- Python 3.11+
- Node.js 18+ with npm for the primary React interface
- One configured inference backend such as Ollama, OpenRouter, or LlamaCPP
Recommended setup:
setup.bat
run.batsetup.bat creates or reuses venv, installs Python dependencies, installs frontend dependencies when npm is available, and can generate .env interactively.
Manual setup:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
npm run install:frontend
copy .env.example .envAfter copying .env.example, set your provider and provider-specific settings, then start the primary interface:
run.batrun.bat delegates to run-hybrid.bat, which starts FastAPI on http://127.0.0.1:8000 and React on http://127.0.0.1:5173.
To start the CLI fallback instead:
run-cli.batIf startup guidance reports missing local assets, use the Prepare Runtime action in the Activity view or run /prepare in the CLI.
npm run dev:hybrid: watcher-driven hybrid development usingpython -m backend.dev_serverplus Vite.npm run dev:hybrid:stable: stable no-reload backend plus Vite.npm run verify:command-center: focused regression check for command-center inventory stability.npm run verify:hybrid: frontend build plus launcher wiring, watcher-driven launch smoke, stable launch smoke, command-center inventory regression, runtime action stream regression, and mission stream regression.
GET /api/system/healthGET /api/system/statusPOST /api/runtime/reloadPOST /api/runtime/reload/streamPOST /api/runtime/preparePOST /api/runtime/prepare/streamPOST /api/sessionsGET /api/sessions/{session_id}/messagesPOST /api/chat/turnPOST /api/chat/streamPOST /api/missions/turnPOST /api/missions/streamGET /api/command-center/overviewPOST /api/command-center/mcp/applyPOST /api/command-center/mcp/refreshPOST /api/command-center/verify
The full documentation set now lives under Docs/, and Docs/DASHBOARD.md maps those endpoints onto the current React control room.
The repository includes .env.example with the main runtime settings. The most important switches are:
LLM_PROVIDERto chooseollama,openrouter, orllamacpp- provider-specific model and connection settings
REQUIRE_CONFIRMATIONto require browser confirmation before sensitive tool use in chat or mission requestsMCP_ENABLEDandEXTERNAL_SUBPROCESS_INTEGRATIONS_ENABLEDfor external tool loadingSEARCH_DIR,SANDBOX_BACKEND, and embedding-model settings for local runtime behavior
MCP server tools are opt-in. A server only becomes active when all of the following are true:
MCP_ENABLED=trueEXTERNAL_SUBPROCESS_INTEGRATIONS_ENABLED=true- at least one MCP server resolves to a non-empty command
The runtime supports three MCP configuration styles:
MCP_SERVERS_JSONwith a JSON array of server objects- single-server variables such as
MCP_SERVER_COMMAND - indexed server variables such as
MCP_SERVER_1_COMMAND,MCP_SERVER_2_COMMAND, and so on
Supported per-server fields are:
namecommandargsenvorenv_jsoncwdtool_prefixconnect_timeout_secondsdiscovery_timeout_secondstool_timeout_secondsmax_retriesretry_backoff_seconds
Example .env fragment:
MCP_ENABLED=true
EXTERNAL_SUBPROCESS_INTEGRATIONS_ENABLED=true
MCP_SERVERS_JSON=[{"name":"archive","command":"python","args":["-m","archive_mcp"],"tool_prefix":"mcp","connect_timeout_seconds":10,"discovery_timeout_seconds":15,"tool_timeout_seconds":30,"max_retries":2,"retry_backoff_seconds":0.5}]- Use the
Guided MCP Setupblock in the webCommand Centerwhen you want the browser to build, save, and apply.envconfiguration for one or more MCP servers. Remote MCP URLs are translated into the stdio launcher format the runtime already supports. - Use
/mcpin the CLI or theCommand CenterMCP panel in the web app to inspect server state, cached tool inventory, discovery freshness, last successful connection time, degraded reason, and the latest MCP execution results. - The Command Center walkthrough can save either single-server keys, indexed
MCP_SERVER_1_*keys, orMCP_SERVERS_JSON, then refresh the live MCP runtime without a full process restart. - Use
/mcp refreshin the CLI orRefresh MCPin the webCommand Centerto re-run MCP discovery without reloading the full runtime or local skill catalog. - If a refresh fails after a previous successful discovery, the runtime keeps showing the last successful cached inventory while surfacing the current error state. This keeps operator visibility stable, but the cached tool list is not proof that the server is currently healthy.
- If MCP servers do not appear at all, check
MCP_ENABLED,EXTERNAL_SUBPROCESS_INTEGRATIONS_ENABLED, and the resolved command path first. Packaged mode intentionally defaults external subprocess integrations off. - If a server stays in
error, inspect the reportedlast_error_kind,last_error_tool_name, and recent MCP result history to decide whether the issue is configuration, transport, or tool execution. - If discovery or execution is timing out, tune
MCP_SERVER_CONNECT_TIMEOUT_SECONDS,MCP_SERVER_DISCOVERY_TIMEOUT_SECONDS,MCP_SERVER_TOOL_TIMEOUT_SECONDS,MCP_SERVER_MAX_RETRIES, andMCP_SERVER_RETRY_BACKOFF_SECONDS, or the indexed equivalents for a specific server. - If a server refresh fails but the underlying tool becomes healthy again, the next successful discovery refresh or tool call will restore normal ready/connected behavior without requiring a full app restart.
Zephyr is built for extensibility.
- Create a new directory in
skills/such asskills/my-new-skill/. - Implement the skill logic in a Python module.
- Reload the runtime with
/reloadin the CLI orReload toolsin the web interface.
See Docs/CONTRIBUTING.md for the contribution workflow.
Some files and directories are created locally at runtime and are intentionally ignored by git, including:
.envdata/zephyr.dbdata/vector_store/data/keyword_index/logs/backups/temp_core/knowledge/memories.mdknowledge/brain/timeline.logknowledge/brain/truth.mdknowledge/brain/entities/- downloaded local model assets under
LLM/
Docs/README.mdfor the centralized documentation indexDocs/glossary.mdfor shared runtime and product terminologyDocs/HYBRID_MIGRATION_STATUS.mdfor the migration and parity recordDocs/DASHBOARD.mdfor the current control-room map
- Archive and MCP integrations are optional and stay disabled unless configured.
- Sandbox verification can use Docker when available, or a process-isolated fallback when Docker is unavailable.
- The web interface uses router-managed browser paths such as
/chatand/command-center.