Skip to Content
DevelopDevelop an application on Golem

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 rust

Create an application by selecting a template:

golem new my-app --template <template-name> cd my-app

In 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:component

See 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 build

From 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 --plan

Use --full-diff when you also want unchanged entries in the displayed deployment and environment-setup diff.

Deploy the application

golem deploy

Deployments 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:

FlagEffect on existing agentsTypical use
--update-agents autoUpdates 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 manualUpdates agents in place through a snapshot-based migration that your code implements. State is preserved.Breaking changes with a migration
--redeploy-agentsDeletes 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
--resetDeletes 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:

TopicGuide
Outgoing HTTP requestsHTTP client
Durability controlsDurability
Retry policiesRetries
Atomic regions and compensationTransactions
Waiting for people and external eventsPromises and Webhooks
Calling other agentsAgent to agent communication
Files and embedded databasesAgent filesystem and Embedded databases
Model providersUsing AI providers
Tools and their security modelTool authoring and Tool security model
AuthorityCards reference and Configuration and secrets
Parallel workForking agents