Skip to main content

Templates

The template library is every instance's starting points for an app (a starter app, such as react-starter, that every app build starts from) or a workflow (a proven graph to customize), plus the workflow templates users save. Use this resource to list and read templates, start a workflow or an app from one (use), save your own workflows as templates, and share them.

Access it as client.templates on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.

Quick start​

from strongly import Strongly

client = Strongly()

# List (auto-paginates as you iterate) # filters: kind, source, q
for template in client.templates.list():
print(template.id)

Methods​

Core​

list​

list(*, kind: str | None = None, source: str | None = None, q: str | None = None) -> SyncPaginator[TemplateSummary]

List the templates you may use.

Parameters

  • kind (str | None, optional): Only app or only workflow templates.
  • source (str | None, optional): Only the platform's, or only users' saved (user) templates.
  • q (str | None, optional): Text in the name, description or tags.

create​

create(workflow_id: str, *, name: str | None = None, description: str | None = None, tags: Sequence[str] | None = None, guide: str | None = None) -> Template

Save one of your workflows (not an agent) as a template.

Its graph is copied; its environment variables by name only.

retrieve​

retrieve(template_id: str) -> Template

Get a template: its guide, its bindings and a workflow template's graph.

update​

update(template_id: str, *, name: str | None = None, description: str | None = None, tags: Sequence[str] | None = None, guide: str | None = None) -> Template

Change a template you saved (the platform's cannot be changed).

delete​

delete(template_id: str) -> None

Delete a template you saved (the platform's cannot be deleted).

Other​

add_member​

add_member(resource_id: str, *, user_id: str, role: str) -> Permissions

Share the resource with a user.

Parameters

  • resource_id (str): The resource's id.
  • user_id (str): The user to share it with.
  • role (str): "editor" (use and change it) or "user" (use it only; types without a use-only tier, such as knowledge bases, take "editor" only).

permissions​

permissions(resource_id: str) -> Permissions

Return who can reach the resource: its owner, members and their roles, and visibility.

Parameters

  • resource_id (str): The resource's id.

remove_member​

remove_member(resource_id: str, user_id: str) -> None

Stop sharing the resource with a user.

Parameters

  • resource_id (str): The resource's id.
  • user_id (str): The user to stop sharing it with.

set_visibility​

set_visibility(resource_id: str, visibility: str) -> Permissions

Make the resource public (every user can find and use it) or private.

Parameters

  • resource_id (str): The resource's id.
  • visibility (str): "public" or "private".

use​

use(template_id: str, *, name: str | None = None, description: str | None = None, tags: Sequence[str] | None = None, bindings: Mapping[str, Any] | None = None, environment_id: str | None = None, custom_resources: Mapping[str, str] | None = None, assistant: str | None = None, project_id: str | None = None) -> TemplateUse

Start from a template.

A workflow template makes a NEW draft workflow (workflow_id): bindings ({"<node id>.<setting>": value}) fill the choices it names (its bindings); one not given stays a placeholder to set in the node. An app template (e.g. platform-react-starter) makes a workspace on its starter app and a code session (session_id), with the workspace's size (environment_id or custom_resources) and a required name. Without project_id it makes a NEW project named name whose code is the starter app; with project_id (an existing project you can edit, on the Strongly filesystem) the starter app is added to that project's code in a new folder named after name (code_folder; a folder that exists is refused) and the workspace is made in that project.

A size is the whole workload: Strongly's helper services beside it (sign-in proxy, outbound proxy, data volume mounts, model cache upload, metrics) are taken out of it, never added on top (set 4 GB and the workload uses 4 GB in total). A size too small to hold them is refused naming them. A CPU, memory, GPU count or disk above the largest allowed machine's room for one workload raises APIError with status_code 400 naming the resource and both figures, and nothing is created or changed. Check client.compute.list_pools() allowed_sizes (max_cpu, max_memory_gib, max_disk_gib, max_gpus) before a large size.

Parameters

  • template_id (str): The template (from list).
  • name (str | None, optional): The new workflow's name (default: the template's); for an app template the new project's name, or with project_id the starter app's folder name.
  • bindings (Mapping[str, Any] | None, optional): A workflow template's choices, {"<node id>.<setting>": value}.
  • environment_id, custom_resources (optional): An app template's workspace size: an environment, or {cpu, memory, disk, gpu?}.
  • assistant (str | None, optional): An app template's coding assistant, claude-code (default) or codex.
  • project_id (str | None, optional): An app template: an existing project to start in, instead of a new one.