Develop an application on Golem
A Golem application contains one or more WebAssembly components, their agents and tools, and optional HTTP or MCP API deployments. The application manifest keeps these parts and their environments in one deployable definition.
Create an application
The primary development tool is the Golem CLI. List the current templates, optionally filtered by language:
golem templates
golem templates rustCreate an application by selecting a template:
golem new my-app --template <template-name>
cd my-appIn non-interactive use, provide at least one --template. The template determines the language and generates a component name when you do not pass --component-name.
Add another component from the application directory:
golem new . --template <template-name> --component-name my:componentSee Defining components and the language-specific SDK pages for implementation guidance.
Build and deploy
Build locally
Build every selected component from the application manifest:
golem buildFrom a component directory, manifest discovery selects that component. You can also select components explicitly with positional names, for example golem build my:component my:other-component.
Review a deployment
Preview the deployment without staging or applying changes:
golem deploy --planUse --full-diff when you also want unchanged entries in the displayed deployment and environment-setup diff.
Deploy the application
golem deployDeployments reconcile the application manifest as one application-level operation. Changed source is built automatically. Existing agents remain on their current component revision unless you explicitly request an update, redeployment, or reset.
Choose what happens to existing agents
By default, golem deploy activates the new component revisions and leaves existing agents on their current revision with their current state. To change existing agents during a deployment, pass one of these mutually exclusive flags:
| Flag | Effect on existing agents | Typical use |
|---|---|---|
--update-agents auto | Updates agents in place. Golem starts from the latest eligible periodic snapshot, or replays retained history when none is available. State is preserved. | Compatible code changes in shared or production environments |
--update-agents manual | Updates agents in place through a snapshot-based migration that your code implements. State is preserved. | Breaking changes with a migration |
--redeploy-agents | Deletes every agent and recreates it with the same name, environment variables, and configuration on the new revision. State is lost. | Development, when the agent list matters but state does not |
--reset | Deletes all agents and the environment (HTTP and MCP deployments, retry policies, plugins), then deploys from scratch. | A clean slate in local development or CI |
See Deployment for environment selection, Updating agents for the update model, and the Redeploying existing agents and Updating running agents guides.
Expose an API
Define HTTP endpoints in agent code, then configure HTTP and MCP deployments in golem.yaml using httpApi.deployments and mcp.deployments. golem deploy deploys them alongside the application’s components, so you do not need a separate manual delete-and-recreate cycle for each version.
Start with Defining custom APIs, then see the application manifest reference for the deployment fields.
Direct invocation remains available when an application does not need a public endpoint. See Invoke and Agent communication.
Next steps
Topics most applications need after their first deployment:
| Topic | Guide |
|---|---|
| Outgoing HTTP requests | HTTP client |
| Durability controls | Durability |
| Retry policies | Retries |
| Atomic regions and compensation | Transactions |
| Waiting for people and external events | Promises and Webhooks |
| Calling other agents | Agent to agent communication |
| Files and embedded databases | Agent filesystem and Embedded databases |
| Model providers | Using AI providers |
| Tools and their security model | Tool authoring and Tool security model |
| Authority | Cards reference and Configuration and secrets |
| Parallel work | Forking agents |