# Repository Briefing: langgenius/mosoo
> Source: https://repoforai.com/repo/langgenius/mosoo (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/langgenius/mosoo
- **Official Docs / Website**: https://mosoo.ai
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: TypeScript
- **License**: Apache-2.0
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 16/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 167 ★ total (+0 24h / +1 7d) · 29 forks
- **Topics**: `agent-api`, `agent-runtime`, `agent-sandbox`, `agents-api`, `claude-agent-sdk`, `codex`, `codex-api`, `openai-codex`, `opencode`, `pi-agent`, `pi-coding-agent`
- **When to Use**: Best for: Application teams embedding coding agents and needing sandboxed execution, resumable workspaces, event streaming, and artifact retrieval without building those facilities for each harness. Skip if: You need a stable public API today, a turnkey production deployment outside Cloudflare, or a lightweight direct integration with one harness and infrastructure you already operate.

## Overview
```text
### Architecture & Core Mechanics
Mosoo sits between an application backend and four Agent harnesses: OpenAI Codex, Claude Agent SDK, OpenCode, and Pi. A backend uses a Project API key and supplies Agent configuration, input, and optional files to start a turn. The API exposes the durable Session as a Thread. Each Session has its own sandbox, and follow-up turns reuse its working directory and native conversation state. The application retains its UI, business logic, and end-user authentication.

The TypeScript repository is organized around `apps/` and `pkgs/` and uses Bun. Its service stack combines Cloudflare Workers, Durable Objects, D1, R2, and Containers. A reusable Agent preset packages the harness, model, instructions, Skills, MCP servers, and Environment. That unifies how applications submit work without making the underlying harnesses interchangeable.

### Key Capabilities & Differentiators
The Thread API covers turn submission, status tracking, event streaming, and artifact retrieval. Mosoo stores input files and outputs and records usage, so the calling backend does not need to build these features separately for each harness. `/api/v2` accepts inline configuration or a saved Agent; `/api/v1` requires a published Agent and runs its live version. Model-provider credentials are supplied at the Project level.

Model compatibility depends on both the harness and the endpoint protocol. The v0.5.1 alpha adds catalog models and custom endpoints to Pi across OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Google Gemini. OpenCode selects the matching provider adapter, while Codex remains Responses-only. Validate the exact harness and endpoint pairing before exposing it as a selectable model in your application.

### Trade-offs & Limitations
Compared with direct harness integration, Mosoo gives the backend a common contract for isolation, session continuation, events, and files. That is useful when several products need the same execution facilities or when one product offers multiple harnesses. If the application already owns those facilities and only needs one harness, an extra service introduces more deployment dependencies and failure modes without necessarily simplifying the integration.

The main operational constraints are the Cloudflare-oriented stack, separate model credentials, and alpha API churn. A common Thread API does not imply interchangeable native session state or identical model and tool behavior across harnesses. For production adoption, pin the revision you deploy, test representative turns and follow-ups per harness, and review the configured Skills, MCP servers, and provider endpoints as separate trust boundaries.

### Hardware & Deployment Guide
Use `cloud.mosoo.ai` to evaluate the hosted console, or clone with `git clone --recurse-submodules https://github.com/langgenius/mosoo.git` for local development. The local path requires Bun `>=1.4.0-canary.1`, `just`, and a Docker-compatible daemon. `just setup` prepares dependencies, submodules, `apps/api/.dev.vars`, Git hooks, and local D1. `just dev` serves the console on port 5173 and the API on 8787; `GET /api/health` is a basic liveness check, not a sandbox or provider check.

The local Docker setup is a development path, not a production topology: production planning needs to account for the Cloudflare services and reachable model endpoints. Size sandbox compute and file storage by workload and concurrency rather than model VRAM. The alpha release history shows Pi entering durable Sessions in v0.5.0, expanded provider-protocol support in v0.5.1, and removal of retired feature code in v0.7.0, which was deployed to the hosted service.
```

## Key Capabilities
```text
- Session contract: The Thread API resumes a durable Session with its workspace and native conversation state intact across turns.
- Execution isolation: Each Session runs in its own sandbox; event streaming and artifact downloads let the application observe work and retrieve outputs.
- API versions: `/api/v2` accepts inline configuration or a saved Agent; `/api/v1` runs the live version of a published Agent.
- Model protocols: Pi supports custom Chat Completions, Responses, Anthropic Messages, and Gemini endpoints; Codex remains Responses-only.
- Credential boundary: Model credentials belong to the Project, while end-user authentication remains in the application.
- Runtime stack: Cloudflare Workers, Durable Objects, D1, R2, and Containers underpin the service; local Agent sandboxes require a Docker-compatible daemon.
```

## Quick Start / Clone
```bash
git clone --recurse-submodules https://github.com/langgenius/mosoo.git
cd mosoo
just setup   # dependencies, submodules, apps/api/.dev.vars, Git hooks, local D1
just dev     # console on http://localhost:5173, API on http://localhost:8787
```
