Mohammad Ausaf Logo Image
Mohammad Ausaf

MIRO

The creative agent I build at Galleri5, inside G5 AI Studio. Give it a brief and it plans, generates and edits image, video and audio work, then checks what it made.

an agent for creative production


MIRO is the agent inside G5 AI Studio, which Galleri5 runs on Azure in partnership with Microsoft. People describe what they want in plain language. MIRO plans the work, picks the right models, and generates and edits images, video and audio across 50+ tools, while the person stays in charge of anything that costs money.

It does more than generate. It builds working apps inside the chat, like review boards and production trackers, checks what it actually rendered before it answers, and keeps track of approvals, so editing a step someone already approved flags everything built on top of it.

MIRO makes 300K+ tool calls a month. I build MIRO, and I built the infrastructure it runs on from an empty repo.

Stack
Python
FastAPI
MongoDB
Redis (Lua)
Hermes Agent
MCP
OpenTelemetry
Daytona
Azure
What I Built
Agent loop
Steering
Compaction
In-chat apps
Evals
Safety gate
Sandbox
Gateway
Scheduling
Metering
How a turn works

brief, plan, act, check

Every turn follows the same loop. The person stays in charge of anything that costs money, and the agent checks its own work before it answers.

Stage 01
brief
Works out what is being asked and which playbook fits it, from a growing library.
Stage 02
plan
Lays out the steps and the models for each one. Anything that costs credits waits for a person to say yes.
Stage 03
act
Calls its tools: generates and edits media, builds apps in the chat, and runs code in a sandbox when it needs to.
Stage 04
check
Looks at what it actually made before answering, tracks what has been approved, and keeps going or hands back.

long turns that hold up


Creative work does not fit in a quick chat reply. A turn can run for minutes while video renders, and in that time people change their minds, the context fills up, and generations fail after someone approved them. I designed MIRO's turns for that.

steer without stopping
People can redirect a running turn without cancelling it, and the message reaches the turn on whichever replica is running it.
resume, never spend
The agent can pick work back up on its own, but it can never authorise spending by itself.
compact, don't stall
A turn that outgrows its context compacts instead of getting stuck.
wake on failure
If an approved generation fails, the agent wakes up to deal with it instead of leaving the person waiting.
Result
Turn completion went from about 95% to 99% between October and November.

apps the agent builds for you


For production work, a chat reply is not enough. MIRO builds interactive apps right in the conversation: review boards to compare and approve shots, and production trackers that follow a plan step by step.

Before it answers, it looks at what the app actually rendered, so a broken screen gets caught by the agent instead of the person. Approvals are tracked across the work, so changing an approved step flags everything that was built on it.

measuring quality, not guessing


Every turn is traced end to end, including the reason any tool call failed, and the tracing is designed so it can never break a turn. LLM judges label each traced turn's outcome and failure cause, so problems show up as numbers instead of anecdotes.

The content-safety check runs on a 600+ case eval suite that gates every push. Tuning it halved false positives, from about 8% to under 4%, while it still catches 98%+ of unsafe cases. Playbook selection has its own eval too.

a sandbox for agent-written code


Agents write code to do real work: process media, build documents, make charts. That code is untrusted by default. I built the sandbox it runs in from scratch, and it now handles 80K+ runs a month.

isolation first
A fresh sandbox for every request, with outbound network access blocked and failing closed, plus SSRF checks on anything fetched.
abuse screening
Screening that resists prompt injection, and that passed an internal red-team suite without blocking legitimate work.

I also prototyped a lighter runtime (an unpacked root filesystem under bubblewrap with minimal capabilities) that cut cold start from 37 to 48 seconds down to 17.

what it runs on


Every job MIRO starts goes through the inference gateway I built from an empty repo: 190K+ jobs a month, 990K+ since launch, routed to 170+ model endpoints across fal, Replicate, Google, self-hosted H100s and others.

fair scheduling
One tenant's burst or one provider's rate limit cannot starve everyone else: deficit weighted round robin, concurrency caps at four levels, and leases so a crashed worker gives its capacity back on its own.
crash-safe intake
A restart never drops an accepted job. It grew out of a GPU dispatcher I wrote that lost 0 of 10,000 jobs under load test.
billing that matches cost
Charges settle on actual output and compute time, and the gateway never re-dispatches a job that may still be running, so one expensive generation is not paid for twice.
operations
A control plane ops uses to drain or cap failing providers, design docs and incident write-ups, and on-call for all of it.

the canvas planner


Before MIRO, I built AI Studio's canvas planner. It turned a brief into a plan of image, video and audio steps that people could see, edit, approve and run, and it checked every plan before anything was spent. A lot of what MIRO does well, like checking its work before showing it, started there.

Built with AI Studio Production content generated using this platform.