d4ncboz/museai

★ 113⑂ 6

High-performance OpenAI-compatible API gateway and bridge for muse.ai personal AI agents, ready for 9Router multi-model integration.

About d4ncboz/museai

d4ncboz/museai is an open-source project on GitHub, mainly written in Python. High-performance OpenAI-compatible API gateway and bridge for muse.ai personal AI agents, ready for 9Router multi-model integration. It currently holds 113 stars and 6 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #99 with 0 new stars today.

GitHub Repository Details

Repository d4ncboz/museai · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

Muse AI

OpenAI-compatible API gateway for muse.ai personal workspaces, featuring native 9Router integration.

https://github.com/d4ncboz/museai/blob/HEAD/Python https://github.com/d4ncboz/museai/blob/HEAD/FastAPI https://github.com/d4ncboz/museai/blob/HEAD/OpenAI Compatible https://github.com/d4ncboz/museai/blob/HEAD/9Router Ready https://github.com/d4ncboz/museai/blob/HEAD/License

---

Architecture

OpenAI SDK / 9Router / Web Client
              │
              ▼ HTTP (Bearer Token)
       ┌──────────────┐
       │   Muse AI    │ FastAPI Proxy (Port 18610)
       └──────┬───────┘
              │ Chrome DevTools Protocol (CDP over WebSocket)
              ▼
       ┌──────────────┐
       │   Chromium   │ Headless Browser (Isolated Context per Account)
       └──────┬───────┘
              │ HTTPS / WSS (hatch_sess + hatch_gw + datr)
              ▼
          muse.ai

---

Technical Highlights

---

Quickstart

1. Installation

Requires Python 3.10+ and a local Chromium or Google Chrome binary.

git clone https://github.com/d4ncboz/museai.git
cd museai

python3 -m venv .venv source .venv/bin/activate pip install -e '.[dev]'

2. Configuration

Copy the example environment configuration:

cp .env.example .env

Default settings in .env:

MUSEAI_DRIVER=browser
MUSEAI_HOST=127.0.0.1
MUSEAI_PORT=18610
MUSEAI_API_KEY=sk-museai-local-key
MUSEAI_ADMIN_KEY=sk-museai-admin-key
MUSEAI_POOL_STRATEGY=affinity
MUSEAI_KEEPALIVE_ENABLED=true

(Note: Chrome executable is auto-detected on macOS /Applications/Google Chrome.app and Linux /usr/bin/chromium. Set MUSEAI_CHROMIUM_PATH if using a custom path).

3. Run the Service

python -m museai

The server binds to http://127.0.0.1:18610.

---

Authentication & Account Setup

1. Account Registration

An active muse.ai account is required. If you do not have an account yet, follow the step-by-step registration guide here:

2. Export Session Cookies

Export your session cookies from an active muse.ai browser session (DevTools F12 ──> Application ──> Cookies ──> https://muse.ai):

Import via Admin API

curl -X POST http://127.0.0.1:18610/admin/accounts \
  -H "Authorization: Bearer sk-museai-admin-key" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "primary-account",
    "cookies": {
      "hatch_sess": "...",
      "hatch_gw": "...",
      "hatch_native_auth_device": "...",
      "hatch_vml": "...",
      "datr": "..."
    }
  }'

Alternatively, use the helper script to convert raw Netscape / DevTools JSON exports:

python scripts/extract_cookies.py exported_cookies.txt --label primary-account --out account.json
curl -X POST http://127.0.0.1:18610/admin/accounts \
  -H "Authorization: Bearer sk-museai-admin-key" \
  -H "Content-Type: application/json" \
  -d @account.json

---

9Router Multi-Model Gateway Hook

To register museai into a local 9Router instance:

python scripts/connect_9router.py --port 18610 --api-key sk-museai-local-key --prefix muse

Call the model through 9Router immediately:

curl -s -X POST http://127.0.0.1:20128/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "muse/muse-chat",
    "messages": [{"role": "user", "content": "ping"}]
  }'

Available model IDs routed by 9Router:

---

API Usage

Streaming Chat Completion (curl)

curl -N -X POST http://127.0.0.1:18610/v1/chat/completions \
  -H "Authorization: Bearer sk-museai-local-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "muse-chat",
    "messages": [
      {"role": "system", "content": "You are a concise engineering assistant."},
      {"role": "user", "content": "Explain raft consensus in two sentences."}
    ],
    "stream": true
  }'

Python SDK (openai)

from openai import OpenAI

client = OpenAI( base_url="http://127.0.0.1:18610/v1", api_key="sk-museai-local-key" )

response = client.chat.completions.create( model="muse-chat", messages=[{"role": "user", "content": "Write a thread-safe singleton in Python"}], stream=False )

print(response.choices[0].message.content)

---

Endpoints

| Method | Route | Description | |---|---|---| | GET | /healthz · /readyz | Service liveness and driver readiness checks | | GET | /v1/models | OpenAI-compliant model catalog and alias mapping | | POST | /v1/chat/completions | Multi-turn chat (streaming SSE & buffered JSON) | | POST | /v1/images/generations | Text-to-image synthesis | | POST | /v1/videos | Asynchronous video generation task dispatch | | GET | /v1/videos/{id} | Task status polling | | GET/POST | /admin/accounts | Account pool CRUD and session renewal | | GET | /admin/status | Real-time driver stats, tabs, and pool health |

---

Development & Testing

# Run unit tests (MockDriver, zero external network calls)
pytest

Code style & linting

ruff check . ruff format .

See AGENTS.md for machine-readable architecture contracts, protocol framing, and contribution guidelines.

---

License

MIT © 2026 D4NNBOZ

GitHub Stars & Activity

113Stars
6Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars113
Forks6
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Daily boardrank #99 · ▲ 0 stars

Related AI Projects

1

Panniantong / Agent-Reach

Python★ 88,395⑂ 7,785▲ 683 stars
→
2

ComposioHQ / awesome-claude-skills

Python★ 76,358⑂ 8,919▲ 80 stars
→
3

microsoft / VibeVoice

Python★ 54,602⑂ 6,138▲ 36 stars
→
4

ayghri / i-have-adhd

Python★ 52,899⑂ 3,046▲ 277 stars
→
5

PostHog / posthog

Python★ 40,105⑂ 3,463▲ 40 stars
→
6

google / skills

Python★ 20,694⑂ 1,718▲ 78 stars
→
7

NVIDIA / SkillSpector

Python★ 19,080⑂ 1,662▲ 167 stars
→
8

Tracer-Cloud / opensre

Python★ 11,343⑂ 1,660▲ 23 stars
→

More AI Rankings