moyai README

The project's README from github.com/BerriAI/moyai. As one markdown file: README.md.

Moyai

Moyai, an open source cloud agent

A self-hosted coding agent for background work. Give it a task from your browser or Slack; it edits code, runs tests, and opens a pull request for review. Send corrections while it works or resume with saved files and conversation history.

Search sessions by title, original request, or words inside saved user and assistant messages. Matching excerpts appear in the sidebar, including agent conversations and side chats. Search covers older sessions beyond the recent list and follows your selected My sessions/All sessions view. Archived sessions remain recoverable by asking Moyai in chat.

Ask “What is this session’s ID?” or send /session-id in web chat or Slack thread chat to get the current Moyai session ID directly. These standalone requests use no model calls, tool searches, or sandbox startup, and leave active work alone. Web replies are saved in the conversation; Slack replies use the same durable control-message delivery as status. Requests with attachments or additional work continue through the agent normally.

Harnesses

Supported harnesses: Claude Agent SDK, Codex, Hermes, OpenCode, Deep Agents, and Tool Loop

New sessions default to the native Claude Agent SDK with prompt caching enabled. You can pick a different harness for each session: Hermes, Claude Agent SDK, Codex, OpenCode, Deep Agents, or Tool Loop. Every harness runs in the same isolated workspace with the same tools and permissions. See supported combinations and custom harnesses.

Models and providers

Models and providers through LiteLLM: OpenAI, Anthropic, Google, Bedrock, Fireworks, xAI, Mistral, DeepSeek, Moonshot, and 100+ more

Moyai uses LiteLLM for inference, so it can run on any of the 100+ providers LiteLLM supports. Point it at your LiteLLM gateway, switch models between messages, and spend is tracked per teammate. Provider keys stay on the server, and the sandbox never sees them.

See it in action

moyai

Before vs after: 79% cheaper

We moved our internal coding agent from Devin to Moyai. Same work, same 31 days: $101,872 on Devin vs about $21,700 on Moyai

Before: Devin, $101,872 in 31 days

Devin billing dashboard showing $101,872.24 spent between Aug 30 and Sep 29

After: Moyai, about $700 a day

Running total over the same 31 days: Devin reaches $101,872 while Moyai reaches $21,700, saving $80,172

Read the full story in the launch post: Moyai is now open source

Getting started

Choose Modal or Substrate for agent sandboxes in Settings → Runtime. Modal is the default. If you already run Substrate, follow the linked setup to connect your cluster.

This setup runs Moyai on Modal, using GPT-6 Astra + the Claude Agent SDK harness through LiteLLM. You can choose another model or harness.

You'll need Git, Python 3.12+, uv, a Modal account, and a LiteLLM gateway with GPT-6 Astra enabled. Commands use a macOS/Linux shell; Windows users can use WSL.

1. Install

git clone https://github.com/BerriAI/moyai.git
cd moyai
uv sync --frozen
cp .env.example .env
chmod 600 .env

2. Add your credentials

Log in to Modal:

uv run modal token new

Open ~/.modal.toml in a private editor window. Copy your workspace's token_id and token_secret into .env, then fill in the model settings:

MODAL_TOKEN_ID=<your Modal token_id>
MODAL_TOKEN_SECRET=<your Modal token_secret>
LITELLM_API_BASE=https://your-gateway.example.com/v1
LITELLM_API_KEY=<your LiteLLM gateway key>
AGENT_MODEL=openai/gpt-6-astra
SESSION_TITLES_ENABLED=false

Ask your gateway administrator for the URL and a key with access to openai/gpt-6-astra through the Messages API. Leave the other settings unchanged for now, and keep .env out of Git and chat.

3. Deploy and sign in

Deployment starts billed compute. Use a fresh Modal workspace; redeploying an existing installation interrupts its active tasks.

uv run python deploy_modal.py

Open the printed Workspace URL. Sign in with WORKSPACE_PASSWORD from .env, which the script generates for you. It also sets up HTTPS and the required secrets. Keep this .env for future deployments.

4. Run your first task

Start a new session. Under Context & tools, choose Cloud session and leave the repository empty. Select Claude Agent SDK in the harness picker and GPT-6 Astra in the model picker, then send:

Create /workspace/hello.py that prints Hello from Moyai, run it, and show me the output.

The first run may take several minutes to build the agent image. Check Activity for the command output and Files for hello.py.

Next: connect your GitHub repository to work on your code and open PRs. Add Slack, Linear, or Notion when you need them.

To stop compute charges, stop the web app and remaining sandboxes in the Modal dashboard. Closing your browser leaves them running.

Documentation

moyai (BerriAI/moyai)

Searching Database…

266 ·GitHub
这是什么?Moyai 是一个自托管的、面向后台工作的编程代理:从浏览器或 Slack 给它一个任务,它就会修改代码、运行测试,并开一个拉取请求供你审阅。
它是托管服务,还是我自己运行的东西?它是一个由你自行部署的自托管 Web 应用,部署在 Modal(默认)或你自己的 Substrate 集群上,而不是托管式 SaaS 产品。
怎么让它跑起来?安装 Git、Python 3.12+ 和 uv,克隆并运行安装程序,把你的 Modal 令牌和 LiteLLM 网关设置复制进 .env,然后部署到 Modal,并使用生成的工作区密码登录。
部署之前需要哪些账号?你需要一个 Modal 账号和一个已启用模型的 LiteLLM 网关(默认指南使用 GPT-6 Astra),本地还要有 Git、Python 3.12+ 和 uv。
部署时有什么要注意的坑?部署会立即开始产生计费计算,而且在已有安装之上重新部署会中断它当前正在运行的任务;Windows 用户需要 WSL,因为命令都假定 macOS/Linux shell。
我的服务商 API 密钥会到哪里去?服务商密钥只保存在 Moyai 服务器本身;代理实际修改代码和执行命令的隔离沙箱永远接触不到它们。
一个会话可以选用哪些编程代理运行框架?每个会话都可以跑在 Hermes、Claude Agent SDK、Codex、OpenCode、Deep Agents 或 Tool Loop 上,都在同一个隔离工作区里使用相同的工具和权限。新会话默认使用启用了提示词缓存的 Claude Agent SDK。
Moyai 比 Devin 便宜多少?BerriAI 把内部编程代理从 Devin 迁到了 Moyai,同样一个月的工作量从约 101,872 美元降到约 21,700 美元——便宜了约 79%。
能中断或恢复正在运行的任务吗?你可以在代理工作时给它发送纠正意见,也可以稍后恢复某个会话,连同它保存的文件和完整对话历史。
能搜索过去的代理会话吗?可以——搜索覆盖会话标题、原始请求以及已保存消息中的词语,无论较新还是较早的会话,匹配的摘录都会显示在侧边栏中。
What are similar projects?open-swe, orca, qm, pstack-claude, useagent, openrig, ordewell, Raven
Creator
BerriAI
Size
61.5 MB
Stars
266
Updated
CommitOct 18
Age
18d
Commits · 90 Days