Skip to main content
Suppose you run a support product. You write one template for a support assistant. Each customer gets a workspace made from that template. When someone opens chat to ask about an order, your server identifies both the customer who owns the order and the person asking. The Platform runs the agent and calls your order lookup with that customer’s identity.

Create the workspace once per customer

Call workspaces.create on your server with the template and a stable external_ref. Repeating the call with that reference retrieves the customer’s workspace. Keep its ID alongside your customer record. Pass their IANA time_zone when creating it so schedules such as “Monday at 9” run on their clock. The default is UTC. For example, this server-side call uses the template created by the quickstart in a project named my-app. Substitute a customer ID from your authenticated session and your promoted template slug.
Use workspace.id when making subsequent API calls for this customer.

Roll out a template change

Pushing a template creates an immutable version. A workspace that tracks the template slug takes the promoted version on its next run. A workspace created with a version such as support@3 stays on that version. For tracking workspaces, promoting an earlier version rolls the change back.

Follow a run

A message starts work on the server. Closing the chat leaves the run active, and the chat can reattach when the person returns. A proposed action goes through policy before execution. If it needs approval, the Platform saves the action and ends the run. A later run can execute the approved input. Read the action’s receipt when you need to know what happened. The hosted engine keeps agent state in Postgres and holds a lease while a run is executing. A waiting approval or an idle agent can therefore persist across requests and deployments. Your application remains responsible for sign-in, permissions on its own records and how results reach its customers. Platform architecture · Template specification