Build a Gumloop-style agent builder
~25 min TypeScript PythonWhat you’re building: A no-code surface where people build and run agents.
Primitives you’ll use: Sandbox, Agent and harness, Postgres, Deployment (App Engine)
Agent prompt
Start with your coding agent
Choose what you are building. The brief names the product it is modelled on, maps it onto MIOSA, and lists the exact commands. Copy it into OSA, Claude Code, Codex, or Cursor.
Template coming soon1 What are you building?
Leave it empty and your agent will propose 3 names, pick one, and use it for resources, the domain and branding.
3 Configure
Reference product
Gumloop, by Gumloop (https://www.gumloop.com): a no-code agent-builder surface where people assemble flows of AI nodes and run them.
How it works: A canvas of nodes (prompts, tools, data, logic) is wired into a flow; the platform runs the flow for the user and returns structured output, with reusable flows and credentials.
Key capabilities:
A visual canvas of AI and tool nodes
Flows that run on a schedule or on demand
Structured output from each run
Shared flows and stored credentials
Build an app LIKE Gumloop. It is not affiliated with Gumloop: do not copy its name, branding or assets. Open https://www.gumloop.com first, confirm the capabilities above, and note anything this brief missed.
How it maps onto MIOSA
The builder UI and the flow runner -> a MIOSA sandbox per flow run, from your control plane
Each step of a flow -> agent runs (`miosa prompt`, client.runs) streaming events that call the model and the tools you allow
Flows, versions and credentials -> managed Postgres (`DATABASE_URL`) for definitions; secrets through the Secrets API
Serving the builder to your users -> a MIOSA deployment (`miosa deploy create`), immutable and versioned
Goal
Build an app like Gumloop on MIOSA, as a multi-tenant product sold to my customers. Each customer is isolated in its own workspace; I meter usage and bill them.
Product name: propose 3 product names, pick one, and use it for resource names, the domain and branding. Until you pick, <product-name> stands for it in the commands below.
Scale: a prototype.
Set up
npm i -g @miosa/cli
miosa login && miosa whoami
miosa api-key create <product-name>-key --preset agent
export MIOSA_API_KEY="msk_u_..."
miosa org
miosa connections add models # your own model provider key
Resources
Sandbox: the agent's isolated Linux workspace
miosa create <product-name>-box --wait
Agents and harnesses: what a run can use
miosa agent harnesses
Managed Postgres
miosa api POST /databases -d '{"name":"<product-name>-db","engine":"postgresql"}'
Deployment: a stable, versioned URL
miosa deploy create --from-sandbox <product-name>-box --name <product-name> --wait
Data and storage
Flows are the product: keep the node graph, its versions, its owner and its run history in Postgres. The data a flow touches lives in your users' own systems, reached through connections they authorise.
Auth and tenancy
Your organization is the platform; customers never get a MIOSA account, they sign into YOUR product. One workspace per customer, created as they onboard, isolates their machines, runs and data.
miosa workspace create <product-name>-customer-1
Tag every machine and run with the customer id in `metadata`, and never query across customers. Meter usage per customer with GET /api/v1/usage and set who pays with PUT /api/v1/bill-to (/docs/platform/usage-and-billing).
Agent loop
Harness: OSA is MIOSA's own harness and works with any model provider you connect, including your own model.
Model: Anthropic (Claude). Calls use my own provider key (`miosa connections add models`); MIOSA platform keys are never used.
Sessions: one chat per project or conversation, so the agent keeps its context. The first `miosa prompt` on a computer uses `--new-chat` (a chat id is printed); every later turn passes `--chat <chat-id>`. `--reuse chat` keeps one new machine per chat so files persist.
Streaming: follow a run with `miosa run follow <run-id>` or client.runs.streamEvents(run.id), and steer or stop it with `miosa run steer` and `miosa run interrupt`.
The canvas is yours; the run is the harness. Your runner walks the graph and dispatches each AI or tool node as a run inside the flow sandbox, so node code is isolated exactly like any other agent.
Steps
1. Create the flow runner: a sandbox per flow run so each user's run is isolated and cannot see another user's data.
miosa create <product-name>-box --template agent-node --wait
Check: The sandbox is running and one flow run leaves no state behind for the next.
2. Store flows and their versions in Postgres: the node graph as JSON, the owner, the schedule and the last result.
miosa api POST /databases -d '{"name":"<product-name>-flows","engine":"postgresql"}'
Check: A saved flow can be reloaded and re-run from its stored JSON.
3. Define the node types your canvas offers (prompt, model call, tool call, branch, loop, human approval) and execute them in order in the sandbox.
miosa prompt --sandbox <product-name>-box --harness osa --model <anthropic-model-id> --chat <chat-id> "Run the node graph for flow <id>; return the structured output of the final node"
Check: A two-node flow runs end to end and returns structured output.
4. Keep per-user connections as secrets, not in the flow: a node refers to a connection by name and the runner resolves it at run time.
miosa connections add models
Check: A flow that uses a connection runs without the key ever appearing in the flow definition.
5. Run flows on demand, on a schedule, or from a webhook, and record each run with its inputs, output and errors.
miosa schedule
miosa run follow <run-id>
Check: A scheduled flow fires, a failed run is retried without duplicating its side effects, and every run is listed.
6. Publish the builder and its API.
miosa deploy create --from-sandbox <product-name>-box --name <product-name> --dir /workspace --port 3000 --run-command "npm start" --wait
Check: The public_url serves the canvas and a saved flow runs from it.
Limits and costs
Cap nodes per flow and runs per user; a canvas invites runaway loops, so give every run `--max-time` and a step budget.
Set `idle_timeout_sec` so idle flow sandboxes pause, and reuse one warm sandbox per active user.
Treat each connection as a secret: the flow stores a name, the runner resolves the value.
Prototype: keep it to one machine at the default size, skip replicas and custom hostnames you do not need, and delete everything when you are done.
Acceptance checks
A user builds a flow on the canvas, runs it, and reads a structured result.
A scheduled run fires and is recorded with its output.
One user's flow cannot reach another user's data or connections.
Each customer is isolated in its own workspace and usage is metered against them.
Everything it created can be deleted with nothing left running.
What your choices added
- Build a product. a workspace per customer, per-customer metering and bill-to
- Agent suggests a name. proposes 3 product names and picks one; commands use <product-name>
- Harness: OSA. dispatches with `miosa prompt --harness osa`
- Model: Anthropic. your own provider key
- Prototype. one small machine, no extras, easy to delete
- Postgres. already part of this guide
What you're building
a no-code agent-builder surface where people assemble flows of AI nodes and run them Modelled on Gumloop, by Gumloop.
A canvas of nodes (prompts, tools, data, logic) is wired into a flow; the platform runs the flow for the user and returns structured output, with reusable flows and credentials.
Primitives you'll use: Sandbox · Agent and harness · Postgres · Deployment (App Engine)
- A visual canvas of AI and tool nodes
- Flows that run on a schedule or on demand
- Structured output from each run
- Shared flows and stored credentials
Source: www.gumloop.com. Gumloop is a trademark of its owner; this guide is not affiliated with or endorsed by them.
What you need on MIOSA
Each row is one thing to create before you start. The number matches the step that uses it.
- Organization and API key Scopes every call; a workspace key is all a worker needs.
miosa api-key create app-key --preset agentDocs - Sandbox The isolated Linux workspace the agent writes code and runs commands in.
miosa create app-box --template nextjs --waitDocs - Postgres Managed relational data, injected as DATABASE_URL in the machine and in production.
miosa api POST /databases -d '{"name":"app-db","engine":"postgresql"}'Docs - A workspace per customer Isolates each customer’s machines, deployments, and data as they onboard.
miosa workspace create customer-1Docs - Branding and white-label Your name and slug on previews, deployments, and the desktop; customers never see MIOSA.
miosa orgDocs - Usage metering and bill-to Usage per customer, and which account pays for new machines.
miosa org billDocs - Agent and harness Turns a prompt into work: pick the harness and model a run uses.
miosa agent harnessesDocs - Deployment (App Engine) Publishes the app to an immutable, versioned URL with rollback.
miosa deploy create --from-sandbox app-box --name app --waitDocs
Architecture
How it maps onto MIOSA
The builder UI and the flow runner -> a MIOSA sandbox per flow run, from your control plane
Each step of a flow -> agent runs (`miosa prompt`, client.runs) streaming events that call the model and the tools you allow
Flows, versions and credentials -> managed Postgres (`DATABASE_URL`) for definitions; secrets through the Secrets API
Serving the builder to your users -> a MIOSA deployment (`miosa deploy create`), immutable and versioned
Data and storage
Flows are the product: keep the node graph, its versions, its owner and its run history in Postgres. The data a flow touches lives in your users' own systems, reached through connections they authorise.
Auth and tenancy
Your organization is the platform; customers never get a MIOSA account, they sign into YOUR product. One workspace per customer, created as they onboard, isolates their machines, runs and data.
miosa workspace create gumloop-customer-1Tag every machine and run with the customer id in `metadata`, and never query across customers. Meter usage per customer with GET /api/v1/usage and set who pays with PUT /api/v1/bill-to (/docs/platform/usage-and-billing).
Agent loop
Harness: OSA is MIOSA's own harness and works with any model provider you connect, including your own model.
Model: Anthropic (Claude). Calls use my own provider key (`miosa connections add models`); MIOSA platform keys are never used.
Sessions: one chat per project or conversation, so the agent keeps its context. The first `miosa prompt` on a computer uses `--new-chat` (a chat id is printed); every later turn passes `--chat <chat-id>`. `--reuse chat` keeps one new machine per chat so files persist.
Streaming: follow a run with `miosa run follow <run-id>` or client.runs.streamEvents(run.id), and steer or stop it with `miosa run steer` and `miosa run interrupt`.
The canvas is yours; the run is the harness. Your runner walks the graph and dispatches each AI or tool node as a run inside the flow sandbox, so node code is isolated exactly like any other agent.
Steps
Create the flow runner: a sandbox per flow run so each user's run is isolated and cannot see another user's data.
miosa create gumloop-box --template agent-node --waitCheck: The sandbox is running and one flow run leaves no state behind for the next.
Store flows and their versions in Postgres: the node graph as JSON, the owner, the schedule and the last result.
miosa api POST /databases -d '{"name":"gumloop-flows","engine":"postgresql"}'Check: A saved flow can be reloaded and re-run from its stored JSON.
Define the node types your canvas offers (prompt, model call, tool call, branch, loop, human approval) and execute them in order in the sandbox.
miosa prompt --sandbox gumloop-box --harness osa --model <anthropic-model-id> --chat <chat-id> "Run the node graph for flow <id>; return the structured output of the final node"Check: A two-node flow runs end to end and returns structured output.
Keep per-user connections as secrets, not in the flow: a node refers to a connection by name and the runner resolves it at run time.
miosa connections add modelsCheck: A flow that uses a connection runs without the key ever appearing in the flow definition.
Run flows on demand, on a schedule, or from a webhook, and record each run with its inputs, output and errors.
miosa schedulemiosa run follow <run-id>Check: A scheduled flow fires, a failed run is retried without duplicating its side effects, and every run is listed.
Publish the builder and its API.
miosa deploy create --from-sandbox gumloop-box --name gumloop --dir /workspace --port 3000 --run-command "npm start" --waitCheck: The public_url serves the canvas and a saved flow runs from it.
Limits and costs
Cap nodes per flow and runs per user; a canvas invites runaway loops, so give every run `--max-time` and a step budget.
Set `idle_timeout_sec` so idle flow sandboxes pause, and reuse one warm sandbox per active user.
Treat each connection as a secret: the flow stores a name, the runner resolves the value.
Prototype: keep it to one machine at the default size, skip replicas and custom hostnames you do not need, and delete everything when you are done.
Acceptance checks
A user builds a flow on the canvas, runs it, and reads a structured result.
A scheduled run fires and is recorded with its output.
One user's flow cannot reach another user's data or connections.
Each customer is isolated in its own workspace and usage is metered against them.
Everything it created can be deleted with nothing left running.