Manual contents

The four primitives

This page explains what Managoat's four objects are, and why there are four of them. For the fields on each one, read the API reference. To build something with them, start with the guided tour.

The problem the four primitives divide up

To run a coding agent on a machine that is not yours, you must decide four things. Each of the four changes on its own schedule.

What the machine holds changes rarely. Python 3.12, a checkout of your repo, a setup script. You decide it once for a team, then leave it alone for months.

Which credentials the agent runs with changes constantly. A staging database URL today, a customer's API key tomorrow, a rotated token an hour from now.

How the agent behaves changes sometimes. Which model, which runtime, which skills, which MCP servers, and what its system prompt says.

What it does right now changes every few seconds.

Put all four in one object, and each credential rotation edits the machine image. Each prompt edits the credentials. Managoat divides them into four objects on purpose, and that division is the product.

Primitive Answers Changes
Environment what the machine holds rarely
Vault which credentials the run uses constantly
Agent how the agent behaves sometimes
Conversation what it does now continuously

How they compose

An Agent names an Environment. A Conversation runs an Agent. That Conversation can name a different Environment, and it can attach a Vault for that one run.

Three of the four are templates. They are rows that you write once and use many times. The fourth, the Conversation, is a run on a machine. The machine is the heavy work, and Managoat does it for you.

MANAGOAT / HOW A RUN WORKS Three templates. One machine. Configure once. Start a conversation. Come back to the same files. 1 · WRITE ONCE Reusable configuration 2 · AT LAUNCH One API call 3 · THE MACHINE Shared in a workspace, or a run’s own Agent Model, runtime, skills Environment Packages, repos, secrets Vault Secret overrides, per run Managoat 01 Build the machine 02 Merge secrets; vault wins 03 Start the agent’s runtime Ready for the first prompt Sandbox Config + credentials Placeholders for bound secrets Conversation One run, its own transcript Work → park → wake Next turn. Same machine. Same files. spawn Egress broker Only exit → GitHub, model APIs, yours Bound secrets Real values go to the broker HTTPS_PROXY Your setup is reusable. Runs share a workspace, or get their own.
Three templates, one machine. Agent, Environment and Vault are rows you write once. At launch Managoat builds the sandbox from the Environment, merges the secrets with the Vault winning, and starts the Agent's runtime. Each Conversation has a machine of its own, unless you launch several into one workspace, and its next turn lands on the machine the last one left. An idle machine parks, and the next turn wakes it. The fleet ceiling only refuses a new machine; it reclaims none. A bound secret's real value goes to the egress broker and the sandbox gets a placeholder, such as __github_token__; the sandbox reaches the internet only through the broker, which attaches the value. A secret with no binding enters the sandbox as an environment variable.

A Conversation starts. At that moment Managoat merges the Environment's secrets with the Vault's secrets. The Vault wins on a key collision. That one rule is what makes the division into four usable and not merely tidy. About vaults sets it out.

What happens next depends on the secret. Every sandbox reaches the internet through the egress broker. A bound secret does not enter the sandbox: the sandbox gets a placeholder, such as __github_token__, and the broker puts the real value on each request to the bound host. A secret with no binding enters the sandbox as an environment variable. Where a secret comes from follows one secret through both paths.

Why an API for this, when you can run an agent in a sandbox by hand? Because the templates outlive the run. The machine, the secrets and the agent are rows you can list, diff, share and launch from code. Because the identity and the machine are separate, so one Environment can run as you, as a bot user, or as a customer. And because a run is a thing with an id, a status, a transcript and an event stream. A webhook, a cron job or another agent can start one and follow it.

Substitution

Each string value in an Agent config takes a ${VAR} reference. Managoat resolves it from the merged environment and vault secrets at spawn time.

Syntax Result
${VAR} The value of VAR from the merged map
$$ A literal $

Substitution is recursive, so it works inside maps and lists. It is also fail-complete. Managoat reports each absent variable at once, and not one for each attempt.

What Managoat does not have

There is no fifth primitive. Three things look like one and are not.

A long-lived agent is not an object. It is a Conversation that you keep, by its id or by a channel_id of your own.

A sandbox is not an object you create. Managoat gives you one when a Conversation starts, one for each Conversation, and it ends with that Conversation. You can list sandboxes and read one. Read About sandboxes and the Sandboxes section of the API reference.

A workspace is a machine you keep. You create it from an Environment and a Vault, and then launch any number of Conversations into it, each in its own folder. It is something you create and delete, but it configures nothing: its Environment and Vault are two of the four, and the Agents that run there are a third. It changes only where a run happens. Every Conversation launched without one gets a workspace of its own, which is the sandbox above. Conversations in one workspace can read and influence each other, so it is also a choice to give up isolation. Read About workspaces.

Where to go next