MOTHERSHIP

[work] engineering craft

Giving Agents Hands.

How to make your software agent-native.

MCP, CLI, plugin, and API design treated as one artform. The rule: make the agent powerful without making its tool surface huge, and without putting engine code on the user's machine. Developed on Sacred Studio, our AI-native video tool, operated daily by human artists and AI directors. Now the discipline behind every Mothership deployment.

native to the harness you already run: Claude Code, Codex, Cursoragent-assisted ops over your core softwarelean middleware, tuned for agent speedMCP for intent, HTTP for bytes, CLI for sync

THE HARNESS · THE MIND

Codex, Claude Code, Cursor. Long context, skills, file tools. Ships with the user, improves monthly

THE SURFACE · THE HANDS

a small, constant cockpit of tools
action registry · schemas discovered on demand
local notebook · the agent's desk copy
HTTP data plane · bytes never ride the context
text is harness-native; anything paid or state-mutating is a typed action or async job

THE CANONICAL GRAPH · SERVER-OWNED

every write validated, drift-checked, rollbackable, receipted. No engine code on the user's machine

[01] the problem

A production graph is too risky for raw access.

Tool bloat. Context bloat. Hidden prompts. Setup rituals. Stalled polling.

Artists needed a creative director agent inside a real production tool: one that can read a project, reason about it, and act on it. But a production graph is far too risky to expose as raw database or API access, and building your own chat harness means racing the labs at their own game forever.

Two different agents touch a system like this. The engine agent builds it, inside the repo, with full source access. The director agent operates it, from the user's own workspace, and never sees the engine. This discipline is about the second one: what it gets to see, what it gets to touch, and what it can never break.

The first instinct is the obvious one: expose everything. One tool per endpoint, sync all state through the chat context, let the agent figure it out. We lived the failure modes so you don't have to. The surface grew toward 60 tools, and tool-picking accuracy measurably degrades past about 30; the agent spends its intelligence deciding what to press. Full project payloads rode along on every turn, drowning the reasoning budget in JSON. Every one of those failures shaped the architecture that replaced it.

[02] the cockpit

A cockpit, not a control room.

The agent carries a small, constant cockpit. Capability lives in a registry, discovered on demand.

The always-visible surface collapsed to nine tools: open a project, read state, run an action, start a job, check it. Underneath, an action registry: one typed action template instead of hundreds of bespoke tools, with rich schemas and examples living in files and OpenAPI, discovered on demand instead of riding in context on every call.

Agents are at their best reading and editing files, so the surface meets them there: a local notebook materialized into the workspace. Read-only state snapshots, editable scripts and storyboards, skills on disk. The agent works in its own element, then persists through typed applies. No engine code ever touches the artist's machine.

THE NAIVE ATTEMPT · 60 TOOLS IN CONTEXT, EVERY TURN

generate_character_looksapply_generate_character_lookslist_character_look_candidatesupload_cast_referenceplan_generate_storyboardapply_storyboard_promptapply_storyboard_prompts_bulklock_storyboardunlock_storyboardget_storyboard_statusplan_generate_videoapply_video_promptgenerate_environment_lookslist_reference_candidatesattach_director_sessionwrite_project_notebookwrite_project_artifactshydrate_project_workbenchget_project_packetresolve_projectapply_generate_environment_looksreview_storyboard_prompts…×60
Tool-picking accuracy degrades past ~30. The agent spends its intelligence deciding what to press, and full project payloads drown the rest.

THE COCKPIT · 9 TOOLS, A REGISTRY UNDERNEATH

open_project
get_project_state
get_shot_context
run_action ← one template, every capability
start_job · get_job
upload · sync · capture_issue
Rich schemas live in files and OpenAPI, discovered on demand. The agent carries 9 schemas per turn, not 60. Decision quality went up because the decision got smaller.

[03] the apply seam

Writes are earned, not assumed.

Zero LLM calls inside a tool. Every write drift-checked. Every apply rollbackable.

The split that makes the economics work: text is harness-native, media is tool-backed. If the task is reasoning or writing, the agent's own model authors it and persists through a typed apply; you never pay twice for text. If it costs money or mutates state, it goes through a typed action or an async job, where it can be validated, priced, and audited.

Every write carries a drift check, so if state changed between the agent's read and its write, the tool refuses rather than silently clobbering human work. Structured rejections become the agent's retry loop. And large files never flow through the mind: bytes travel the data plane as HTTP uploads that return asset IDs, while paid generation runs as asynchronous jobs a timeout cannot orphan.

run_action("apply_script", { baseFingerprint: "9f3a…" })

✗ drift_detected · project changed since your read

current: "b81c…" · yours: "9f3a…"

nothing was overwritten. re-read and retry.

get_project_state() → fresh read

run_action("apply_script", { baseFingerprint: "b81c…" })

✓ applied · 18 shots · rollback snapshot saved · event logged

The agent's native ground: files

A local notebook materialized into the workspace: state snapshots, editable scripts and storyboards, skills on disk. The agent works the way it's best at, reading and editing files, then persists through validated applies.

Bytes never flow through the mind

Intent travels over MCP. Files travel over HTTP and CLI: uploads return asset IDs, paid generation returns durable job IDs. A timeout can't orphan a render; a duplicate request gets refused mid-flight.

Harness-native, never a silo

CodexClaude CodeCursorown chat surfaceown agent runnerown permission UI
Every harness improvement, inherited for free. The moat is the domain truth underneath.

[04] harness-native

Harness-native, never siloed.

The harnesses improve monthly. Every deployment inherits it for free.

Built to be Codex, Claude Code, and Cursor native: a plugin that packages identity, skills, and connection, with OAuth onboarding measured in minutes. The moat is the domain truth underneath, and the agent can always inspect exactly what a worker model saw: dry runs before spend, composed-prompt receipts after, scoped working sets instead of whole-project dumps.

One more rule that only shipping teaches: what the agent reads is behavior, not documentation. Agents copy examples, so if an example shows a flag, that flag becomes the norm. When behavior changes, the runtime-facing guidance changes first, before any human doc.

THE MAP · WHAT RUNS WHERE
THE USER'S MACHINE

the harness

Codex, Claude Code, Cursor: the agent lives here

the plugin

skills + connection metadata, one install

the CLI

login and notebook sync

the notebook

state, payloads, drafts: a desk copy, never canonical
no engine code, no service keys, nothing to break
THE ACCESS LAYER

OAuth connect

browser auth, minutes to onboard

remote MCP

a small JSON control plane: read, act, start job

HTTP upload

media goes in, an asset ID comes out

sync API

changed files down to the notebook
small commands one way, bytes the other, never mixed
THE SERVER

action registry

every capability, typed, with schemas + examples

domain services

the graph, applies, prompt composers

async jobs

image, video, voice, render: start, hold the ID, keep working
every mutation validated, drift-checked, receipted here
CANONICAL STATE

the production graph

one truth for artists and agents

storage + audit

every event logged, every apply reversible

model providers

behind the server, never in the agent's hands
owned by the system, not by any session
THE WEB STUDIO · HUMAN REVIEW, BESIDE IT ALLhumans judge pixels and timelines · agents deep-link instead of describing

[05] the proof

The pattern has already left home.

An outside artist installed the plugin and operated the studio end to end, unassisted.

1outside artist: plugin install to production, unassisted
9cockpit tools, constant while the registry grows underneath
100%of writes validated server-side, drift-checked, rollbackable
0engine code on the artist's machine

At MAS Aqua, the same discipline shaped the build: the visual surface for the operators first, then that same tool wrapped as an agent surface. At Lahari, AI directors produce music videos inside the same studio the artists use. Different domains, one artform.

Making your software agent-native is a design discipline with real rules. We learned them by shipping. Now it is how we build everything.