> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formation.texturehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instance setup

> Configure shared Formation infrastructure before creating your first agent.

New owners of an empty Formation instance land at **Set up your Formation** after
creating the first administrator or signing in. The same check applies to a
direct visit to **Add an agent**. Existing instances with agents keep their
normal landing page; an owner can reopen the flow at `/setup/instance`. Agent
operators never enter the owner-only setup flow.

The instance and agent flows share the wizard frame, stepper and settings
editors. Setup progress is stored in the database, including explicit deferrals;
refreshing, signing in on another machine or visiting an instance settings
editor resumes the saved step. Credentials stay in their existing encrypted
settings stores and never enter the progress document or browser storage.

Saving inside a step is the decision for that step. When an editor on a step
saves successfully and the step is then ready (a usable AI provider, an
activated Temporal connection whose worker has connected, an enabled execution
environment, an available browser provider), the wizard records the review and
shows the next step by itself; there is no second **Continue** after a save. A
save that leaves the step unready, such as a Temporal connection saved but not
yet activated, stays put with its editor open. **Continue** remains for a step
that was already configured, and the **Provided by this deployment** summary
never continues on a save: saving there switches a service to the owner's own
account, and the summary reshapes itself around that instead.

## Services provided by the deployment

A deployment can supply some of the shared services itself: managed AI
inference, a Temporal connection, environment credentials for the selected
execution environment, or a managed web account. Those need no decision from
the owner, so the wizard folds every supplied service into one **Provided by
this deployment** step, placed where the first of them would have been, and
keeps individual steps only for the services the owner must set up. On a fully
managed instance the flow is therefore **Provided by this deployment → Ready
for agents**, and the next screen creates the first agent; a self-hosted
instance sees the full list below unchanged.

The summary lists each supplied service with a one-line status (**Ready**, or
**Not ready** while a supplied Temporal connection is still connecting or
managed AI credentials are missing) and a **Use my own …** link that opens the
same editor the service's own step uses, so any of them can be switched to the
owner's account without leaving the step. A service the owner switches, or one
the deployment stops supplying, returns to its own step. **Continue** records a
review for every service the summary stands for, so the server keeps one
checkpoint per service; when the server's next checkpoint is a folded service,
the wizard moves the checkpoint to the step it shows next so a reload resumes
there.

## Steps

1. **AI inference:** choose a provider (OpenRouter, Ramp Router, OpenAI or a
   compatible server, Anthropic, or Google for Gemini models) and save its key
   with **Save provider**. That is the whole step: models are
   not an instance setup decision, because every agent picks its own primary
   model when it is created. A saved, supported provider with a usable
   credential (or an OpenAI-compatible endpoint that needs no key) is what
   this step requires; no default model is. AI inference supplied by the
   deployment appears under **Provided by this deployment** instead; saving
   your own provider from there switches agents that inherit the instance
   configuration to it, and keeps the supplied service so you can return to
   it from **Settings → Models**. The instance encryption key must be
   configured.

   Default models stay optional. **Settings → Models** keeps the instance
   primary and fast models under an **Advanced** disclosure, as
   fallbacks for agents that name no model of their own; the disclosure opens
   by itself once either of them is saved. Saving a key from setup resends the
   stored defaults unchanged, so it never erases ones set in Settings.

   When the instance has a key but no default primary model, a new agent's
   wizard inherits the instance credential and goes straight to choosing that
   agent's models; it never asks for a second key. With a default primary set,
   the agent starts on it and can customize its models later.
2. **Temporal:** add, verify and activate a Temporal connection, then wait for
   its worker to connect. A deployment-supplied connection is saved, verified
   and activated by the runtime itself and appears under **Provided by this
   deployment**. Temporal is required for agent execution, so this step cannot
   be deferred and setup cannot finish until it is ready. See
   [Running Temporal](https://docs.formation.texturehq.com/runtime/temporal.md).
3. **Execution:** connect a Modal or Fly.io environment with the shared settings
   editor, then select an enabled environment. An environment whose
   credentials the deployment supplies, such as **Managed execution** (an
   [execution broker](https://docs.formation.texturehq.com/runtime/execution-broker-protocol.md)), is already enabled; while it is the selected environment it appears under
   **Provided by this deployment**. Unpinned agents resolve the saved instance default at
   workspace acquisition. An explicit agent pin wins. Disabling the selected
   environment clears the instance preference in the same transaction. If
   deployment changes remove a selected environment, unpinned agents return to
   the remaining enabled catalog order with a warning in the server log; an
   explicit unavailable agent pin remains an error.
4. **Web & browser:** review inherited provider access or connect Cloudflare
   for search, page reading and browser interaction. A browser account the
   deployment supplies appears under **Provided by this deployment**. Other
   providers and advanced per-capability settings remain available. Provider
   infrastructure can be inherited; website accounts, cookies and profiles
   remain agent-owned.
5. **Ready for agents:** review persisted configuration and deferrals, then
   enter agent creation. The new agent inherits inference, execution and web
   infrastructure; its identity, profile, tools and external accounts remain
   separate. The review says where Slack and the remaining instance settings
   live and links to **Settings** once; that link carries a marker so the
   settings page offers a way back to the review.

## Slack apps

Slack is not an instance setup step. The app configuration token that lets
Formation create a Slack app per agent is asked for just in time, on the first
agent's **Connect Slack** card, because that is the first moment there is an
agent to connect: an owner used to be asked for the token several steps before
any agent existed. The card explains where the token comes from (**Your App
Configuration Tokens** at [Slack apps](https://api.slack.com/apps); ask the
workspace administrator or IT team for access when needed), and a token that
connects continues straight into the automatic app setup. A workspace that
cannot issue configuration tokens can still create the app from a manifest
Formation prepares, one click away on the same card. Once provisioning is
connected, every later agent's card goes straight to the automatic setup.
Each agent still gets a distinct app and bot identity, and installation can
require Slack approval; the configuration token enables app provisioning, not
shared bot identity. **Settings → Slack** keeps the instance-wide editor for
connecting, replacing or disconnecting the token. See
[Slack automatic setup](https://docs.formation.texturehq.com/slack-automatic-setup.md).

## Instance preferences

There is no instance preferences step either. Operators, phone numbers,
workspace network policy (under **Agent runtimes**), tool discovery, memory,
observability, activity, security and deployment details (**About**) all keep
their defaults until an owner changes them under **Settings**, which the review
links to. A page of links into Settings was
where owners left setup and did not come back from.

Memory is not a setup step. A new instance starts with defaults that need no
decision: keyword (lexical) search in the instance's own PostgreSQL database,
which works without any provider key, and sensitive-memory protection on, so a
fast model flags credentials, personal details and confidential business
information as they are saved and keeps them from being shared beyond the
conversation they came from. Those defaults apply without a saved memory
setting. The first agent's wizard seeds one, once: semantic search when that
agent's model provider can embed with its own key and the instance's database
has the `vector` extension installed, and the keyword default otherwise
(including when that check cannot be completed). **Settings → Memory** changes
any of it, including adding an embedding provider for semantic recall. See
[memory backends](https://docs.formation.texturehq.com/runtime/memory-backends.md).

The dashboard offers **Set up later** for execution and web & browser. The
review spells out the consequences: code and commands need execution and
browser tasks need browser access. The built-in
[dashboard chat](https://docs.formation.texturehq.com/connectors/dashboard.md) works without Slack. Provider access being configured is not a
successful tool call; verify the first real reply and task after agent
creation.

## Operator API

Owner-authenticated routes:

* `GET /api/settings/onboarding` returns the current step, reviewed/deferred
  outcomes, completion time and whether empty-instance first-run guidance is
  required. Responses are not cached.
* `PUT /api/settings/onboarding` accepts a `step` (`ai`, `temporal`,
  `execution`, `web` or `review`) and an `outcome` (`reviewed`, `deferred` or
  `visit`). The **Provided by this deployment**
  summary is a dashboard presentation only: reviewing it sends one `reviewed`
  write per folded service, and the dashboard follows with a `visit` when the
  server's next checkpoint is itself a folded service. `ai`, `temporal` and `review` cannot be
  deferred. A checkpoint saved on a retired step (`memory`, `slack` or
  `defaults`, each of which sat between `web` and `review`) is read back as
  `review`, so an instance mid-setup resumes at the finish rather than
  restarting; outcomes recorded for retired steps are ignored, and finishing
  requires an outcome only for the live steps. Reviewing
  `temporal` or `review` returns `409 temporal_not_ready` until an active,
  verified Temporal connection has a connected worker. Reviewing `ai` or `review` returns `412 master_key_missing`
  without an instance encryption key, and `409 setup_incomplete` without a saved,
  supported provider and a usable credential. A default primary model is not
  required: after a key-only `PUT /api/settings/models` (blank `primary`
  and `fast`), a `PUT /api/settings/onboarding` with
  `{"step":"ai","outcome":"reviewed"}` succeeds. Saving models does not
  record that outcome itself; the dashboard sends the onboarding write after a
  successful save. Finishing (`review`) also requires
  `temporal` reviewed and a recorded outcome for every preceding step. A
  transaction advisory lock preserves checkpoints from concurrent tabs.
* `PUT /api/settings/runtime-default` accepts an enabled backend name, or an
  empty backend to restore catalog fallback order. Agent-specific pins retain
  precedence. `GET /api/settings` reports the saved default and catalog order.

This is a dashboard guidance flow, not an extra security grant or an API
provisioning gate. Existing infrastructure settings remain independently usable
by deployment automation. No live provider or payment acceptance is implied by
a recorded review.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.