Open-source Grok Bot alternative with a virtual machine that bots can use
OpenAI-compatible structured tools
This recipe exercises the shared chat-completions runtime through a real isolated harness. It uses an offline loopback provider and a synthetic stdio MCP server that can write exactly one file in the fixture's disposable home. It needs no provider account, API key, browser, or desktop access.
Run the permanent acceptance test:
pnpm exec vitest run server/openai-tools.e2e.test.ts
server/openai-tools.e2e.test.ts launches its own server with
launchVerificationServer, then uses runControlOmb with the launcher's exact
URL for new-bot, set-model, send, wait, messages, and interrupt.
Configuration and approval go through the fixture's existing HTTP routes;
approval uses /api/bots/ID/respond. The fixture explicitly enables each MCP
server after adding it, following the normal disabled-on-create behavior.
The control CLI does not provide an
approval verb.
The assertions prove:
- Tool schemas reach the provider, and arguments fragmented across streaming events form one structured call.
waitreportsneeds-userbefore any file exists. Allowing the pending card creates the expected file, returns a result correlated with the assistant call ID, and produces a second provider response before settling.- Denial returns a tool result and lets the model explain it, while the turn remains failed and the file remains absent.
- Interrupting while awaiting approval dismisses the card, records an
unsuccessful tool result, and produces no file and no continuation. The
existing control
settledstatus means the interrupted conversation is idle; the tool result carries the unsuccessful operation outcome. - Text that resembles a call stays text, ordinary responses settle, and neither causes execution.
- An explicitly tools-disabled connection sends no
tools, starts no MCP process, and completes direct and room conversations against a provider fixture that rejects tool schemas. Its preview also omits tool guidance. - Saved memory remains in direct, room, and preview prompts without promising native filesystem tools that API drivers do not provide.
The test prints evidencePath, next to the fixture's retained server log.
The JSON records the control commands, wait states, bounded messages, file
existence, and provider request counts. It does not retain the provider's
headers, MCP environment, or configuration payloads. The launcher stops its
own child and removes its disposable data on exit.
Driver contract tests cover the three shared adapters, protocol errors, non-streaming responses, tool errors, and lifecycle edge cases:
pnpm exec vitest run server/drivers/openai-chat-tools.test.ts server/workspace.test.ts
OpenAI-compatible and Cerebras turns recover explicit unfinished action announcements with at most three nudges per turn. Each nudge must be followed by tool progress before another is allowed; otherwise the turn fails as incomplete rather than reporting success. The detector also recognizes a clear first-person action promise in the last paragraph of an explanation, while leaving questions, quoted examples, "let me know" closings and ordinary final reports alone. Denials and pending tool failures take precedence over announcement recovery. Earlier tool results stay in the conversation, and the nudge asks the model not to repeat an operation that may already have taken effect; whether a call runs is still decided by the turn's permissions.
One turn stops after 64 model steps, or 200 tool calls in total (each reply may carry up to 32). The stop says so in one line with one next action: the steps so far already ran, so ask only for what's left (retrying the whole task would repeat them). A batch that would pass 200 runs none of its calls. There is no per-bot or per-thread setting for either number.
A turn whose MCP servers offer more than the 128 tools a request may carry
lists whole servers in turn order and reaches the rest through the
mcp_search_tools / mcp_describe_tool / mcp_call_tool directory, whose
three tools count toward the limit; no server is skipped for it. The bot's
last budget is read at GET /api/bots/ID/tool-budget. The driver tests
cover it with real stdio servers:
pnpm exec vitest run server/drivers/chat-mcp-tools.test.ts server/drivers/openai-chat-tools.test.ts
The harness proves the OpenAI-compatible adapter and the shared execution path. It does not establish that every third-party model supports tools, or that live Grok and MiniMax services accept a particular schema. Model support and service-specific limits remain separate from the implemented protocol.
Computer and browser screenshots
The OpenAI-compatible driver opts into structured image input and mounts the
harness-provided localComputer and browser stdio descriptors. It does not
discover or grant a desktop itself. Host, VM, VPS, Boat and room routing
continue to use the harness's existing ownership and permission gates. A Boat
cloud computer arrives in the same localComputer slot as every other
computer (harness-mcp-proxy computer), so the selected API model is kept, as
it is for every engine with computer tools.
MCP images become bounded inline image parts. Tool results retain their call IDs; only after the full tool-result batch is appended does a separate image message carry labelled screenshots. Image data is not copied into text tool previews. Computer-enabled MCP transports accept frames up to 32 MiB for screenshots; ordinary text-only transports retain their 2 MiB limit. Each image is bounded to 20 MiB, with 32 MiB of encoded images retained across the whole turn, including user attachments. Exceeding the turn budget stops without replaying an operation. Remote image/computer connections require HTTPS; local loopback HTTP is allowed. Image-bearing completion requests do not follow redirects. Custom text MCP servers retain their 2 MiB transport cap even in computer-enabled sessions. PNG, JPEG, WebP and GIF are accepted; invalid base64/MIME results fail instead of being reported as successful screenshots.
Native unsigned-number formats and root composition constraints are validated locally. For computer-enabled requests, root composition constraints appear in the description rather than the outgoing parameter root, preserving the full original validator before execution.
The driver contract tests exercise real loopback HTTP and stdio MCP processes: input-image encoding, computer/browser screenshot delivery, call-ID ordering, approval denial with no side effect, malformed images and a screenshot larger than the ordinary text frame limit. They do not use real desktop access or paid inference, and do not establish vision/tool support for every provider model.
Boat cloud computer
pnpm exec vitest run server/cloud-computer-tools.test.ts server/harness-mcp-proxy.test.ts server/openai-boat.e2e.test.ts server/hosted-desktop.e2e.test.ts
tests an owned loopback Boat/API fixture. It covers direct chats, group member
turns and cloud routines retaining the selected model, screenshots arriving as
image parts, and human control blocking an approved action. The tool tests
cover each advertised action, invalid arguments (checked against the
advertised schema before anything reaches the Boat), expired turn
capabilities and in-flight cancellation without replay. The hosted-desktop
fixture runs the same tools for a Claude bot and proves Boat's own runner is
never asked.
pnpm exec vitest run server/cloud-computer-lazy.e2e.test.ts server/cloud-computer-slow-start.e2e.test.ts server/computer-selection.test.ts server/room-turn-end.test.ts server/boat-wait-ready.test.ts src/components/ComputerPanel.lazy.test.ts
proves a cloud computer starts only when the bot uses it. Against a loopback
relay that counts every request, a plain chat ("hi") on Works on: Cloud
computer, in a bot's chat or a room, makes no relay call; choosing Cloud
computer or opening the Computer panel creates and wakes nothing; the first
computer call creates the computer once (or wakes a sleeping one, waiting for
the wake), with one progress line in the chat. A signed-out engine fails with
the usual sign-in row and a Tool selection without the computer is refused,
both with no relay call. A relay that accepts a readiness poll and never
answers ends the wait inside its budget. select_computer counts the cloud
computer a turn starts on its first call as already selected, so the request
is not restarted or pinned. A start the relay refuses is reported with its
cause: in a room, once, under the member's name; on a cloud routine, as the
run's error. A first start slower than one call's wait answers "still
starting" and a later call works with one create; a start that stalls ends at
the start budget with one row.
Model screenshots use native resolution and a separate file from panel frames. Every action rechecks the harness control gate. Commands run with an isolated environment; the Boat credential stays in the harness, and the agent process holds only a turn-scoped capability that ends with the turn. Tests use synthetic image bytes, not a paid Boat account or real desktop input.
Text-only model connections
Tool support is enabled by default for these three API drivers. For a model or endpoint that supports only ordinary chat, disable tools explicitly on its provider instance using the existing instance settings route:
PATCH /api/instances/ID
Content-Type: application/json
{"tools": false}
Use the exact instance ID from pnpm control:omb models --url URL, and direct
the request only to that explicitly selected server. The route accepts this
setting for OpenAI-compatible, Grok API, and MiniMax API instances, refuses
changes while the instance is busy, and stores config.tools on that instance.
Set tools back to true to enable discovery and execution. This affects all
bots using the instance; use separate configured instances for models with
different tool support. Configured MCP tools are never silently disabled.
An otherwise plain turn initially offers the built-in question tool; only an
explicit unsupported-tools HTTP 400/422 rejection permits one retry without
that optional tool. Authentication, schema and network failures do not trigger
this downgrade, nor does a response after any tool call. The next turn offers
questions again. No fallback replays a requested operation without its tools.
When a provider refuses a tool call (Groq's tool_use_failed, mid-stream or
as HTTP 400: a tool the model was not given, or arguments that miss the
schema), nothing ran, so the same request is sent again, up to three attempts
in all, each shown as a retrying row. Once answer text has streamed the refusal
ends the turn instead, so one reply never joins two attempts. A turn that runs
out of attempts says in plain words what happened and what to do next,
followed by the provider's message. With no earlier tool call in the turn,
nothing ran and the chat's Retry sends it again; after earlier calls ran, it
asks only for what's left, since a Retry of the whole request would repeat
them. A resend never repeats an earlier call: its result is already in the
request.
Each refusal's full error object, failed_generation included, is written to
the thread's redacted native log (native/THREAD.ndjson in the data
directory), next to the tool names every request offered.
A conversation's requests only grow at the end
A provider reuses only the unchanged start of a request: OpenAI, OpenRouter and DeepSeek bill it as cached input, and llama.cpp skips reading it again. A hybrid model (Qwen3.5 and 3.6, Granite 4) reuses nothing once anything before the end has changed, so a change near the start costs a full re-read, minutes for a 40k-token prompt on a local GPU. So within a conversation each request is the previous one with new messages added at the end:
- Earlier turns go again exactly as sent: the user message with its context note and automatic recall, every tool call and result, the final reply. Screenshots of earlier turns become a one-line note.
- The history is not trimmed to a fixed size each turn. Compaction folds it when it nears the model's window; past the replay bound, old messages go in batches of half the bound, so the start holds still between batches.
- A local server's refusal of an oversized request reports its real window
(llama.cpp's
n_ctx), which compaction then times its folds by. - The tool list holds still. Most templates (Qwen3.6 among them) render it first, so a change there costs the whole prompt. A model on this computer or network waits for every MCP server before a turn's first request. On a hosted model a server still starting joins that turn once, and the bot's later turns wait for it.
- A model on this computer or network is asked to keep earlier turns'
thinking in the prompt (
chat_template_kwargs.preserve_thinking), which Qwen3.6's template otherwise drops at every new message.
The start changes only when the conversation itself changes: an edit or rewind, a compaction, another model, new bot instructions, an app restart.
Every request's native log line says how much of the previous request it
repeats, as repeats: { messages, of, tools }. Start the app with
OPENMAUS_LOG_CHAT_REQUESTS=1 to log each request's full messages and tools
too (secrets redacted, images left out), to see where two requests differ.
pnpm exec vitest run server/openai-prefix.e2e.test.ts server/drivers/openai-chat-prefix.test.ts
The end-to-end test sends eight tool-using turns to a fake provider through the isolated harness, past the old 24 KB history bound, and checks that each request starts with all of the one before.
Cloud routine readiness uses the executing bot’s selected runner (including a thread’s model override at dispatch), rather than any available cloud engine. The probe checks the bot-owned or inherited team Boat without provisioning or waking it. Dispatch repeats the check so a removed key or unavailable Boat fails the run before model execution. Explicit Cloud still permits creating/waking the bot’s own Boat; a missing assigned team computer requires explicit repair.
Run pnpm exec vitest run server/routine-requests.test.ts server/openai-boat.e2e.test.ts
for target selection and the isolated direct/group/scheduled bridge fixture,
including credentials removed after scheduling and a Boat outage at dispatch.
The fixture also holds the Boat readiness response: the execution stays busy,
wait cannot report it settled, and Stop prevents dispatch when the response
arrives. Readiness is part of generation-owned setup, not an untracked wait
before turn admission.