---
title: "Build agents and workflows as documents"
description: "Read an agent or workflow as one JSON document, change it, and put it back over MCP or REST."
url: https://docs.spinrun.ai/build
markdown_url: https://docs.spinrun.ai/build.md
---

# Build agents and workflows as documents

The Build surface lets an MCP client, a script or the CLI read an agent or a workflow as one JSON document, change it, and put it back. This section is the whole contract.

* [Endpoints](https://docs.spinrun.ai/build/endpoints.md): the two MCP endpoints and the REST twin.
* [Authorization](https://docs.spinrun.ai/build/authorization.md): why Build is OAuth-only.
* [Agent document](https://docs.spinrun.ai/build/agent-document.md) and [workflow document](https://docs.spinrun.ai/build/workflow-document.md): the contracts.
* [Concurrency](https://docs.spinrun.ai/build/concurrency.md): `updated_at` and `If-Match`.
* [Publishing](https://docs.spinrun.ai/build/publishing.md): who publishes, and what `applied` means.
* [Test runs](https://docs.spinrun.ai/build/test-runs.md): credits and polling.
* [Untrusted output](https://docs.spinrun.ai/build/untrusted-output.md): treat run output as data.

A document is at most 64 KiB of UTF-8; anything larger is refused with `413` before it is parsed.

## Related [#related]

* [Getting started](https://docs.spinrun.ai/getting-started.md)
* [CLI](https://docs.spinrun.ai/cli.md)
* [REST API](https://docs.spinrun.ai/api.md)
