Unfour
All guides

AI Operations Without Unrestricted Production Access

AI does not need unrestricted production access to help with operations. Put fixed tasks into reviewed scripts or Flow runbooks, use restricted MCP tools to gather evidence for unfamiliar problems, and ask AI to prepare plans and scripts for high-risk changes. A human reviews the exact targets and effects before executing in the target environment.

This guide is for developers turning a useful test-environment investigation into a repeatable operating procedure. Unfour supplies workspace-scoped API, SSH, Database, and Flow tools; your team supplies the approval and deployment process. The practical sequence is: explore in test, capture a known procedure, review its resource bindings, then execute deliberately.

Choose the execution boundary before choosing the tool

Known, repeatable tasks

A health check, a bounded log query, or a documented maintenance procedure should not need fresh AI judgment on every run. Keep an existing reviewed script, or assemble saved resources into a Flow with explicit inputs and conditions.

Unfamiliar problems

Use permitted MCP tools to collect a narrow set of runtime facts. Let AI compare evidence and propose the next check. An inconclusive result is a reason to investigate further, not permission to change data.

High-risk changes

For a schema migration, bulk correction, service restart, or deployment, ask for a proposal and reviewable script. Keep execution with an authorized operator using the team’s existing change process.

These categories can coexist in one incident. AI can explain a failure and prepare a repair without possessing the credentials or tool access needed to apply that repair to production. Keep production credentials out of the agent’s other shells and connectors too: Unfour MCP policy only governs calls through Unfour MCP.

Prepare a test workspace with a real permission boundary

Create or select a test workspace and verify the actual API host, SSH host/account, database endpoint, and database/schema. Use test data and least-privilege service accounts. A workspace named “test” can still contain a production URL or connection; its label is not network isolation.

  • Workspace type, variable environment, and MCP policy are separate settings. With Auto policy, DEV resolves to full_access, TEST to guarded, and PROD to read_only. An explicit policy overrides that mapping; inspect the effective policy rather than relying on the badge.
  • For evidence collection, start with read_only where the required tools are permitted. It permits supported read operations, including restricted SSH diagnostics; it is not an arbitrary read-only shell. Use independent account privileges to limit database and SSH access.
  • If you need MCP to save or run a Flow in test, choose a policy that permits those actions. Guarded applies confirmation to operations identified by the relevant handlers; it does not mean every write waits for a human. Do not relax production policy to run this workflow.
  • Bound query rows, log time windows, output volume, and request repetition. Review returned logs and data before sharing them with a model; masking cannot identify every secret in arbitrary text.

Example: investigate a stalled worker in test

Consider an illustrative job-processing service: the API is healthy, but test jobs remain pending. First define the expected behavior, such as a known test job reaching its completed state within the team’s normal processing window. A successful health endpoint alone cannot establish that the worker processed the job.

  1. 1. Test evidence
  2. 2. Hypothesis
  3. 3. Reviewed test change
  4. 4. Repeat checks
  5. 5. Save Flow
  6. 6. Human handoff
  1. Capture a baseline

    Send the saved GET health/status request through permitted MCP tools. Record the resolved host, status, relevant response fields, time window, and test job identifier. Do not repeatedly submit new jobs just to produce a signal.

  2. Compare server and database evidence

    Read a bounded worker log excerpt and use a focused read-only query to inspect the test job’s state or a small aggregate of pending jobs. Confirm all three resources belong to the same test deployment. Ask AI to distinguish observed facts, hypotheses, and missing evidence; correlation is your investigation, not an automatic Unfour feature.

  3. Propose a falsifiable explanation

    Suppose logs suggest the worker is using an outdated queue setting. Ask for the exact configuration evidence that would confirm this and for a bounded change proposal. Do not infer the root cause solely from a growing pending count; a slow downstream dependency could produce the same symptom.

  4. Review a test change and repeat the checks

    Have an operator review and apply the test configuration change through the normal process. Re-run the same API, log, and database checks with equivalent inputs. Confirm job completion and check for duplicate processing or new errors. Record what remains untested, especially differences in production topology, load, and permissions.

Turn confirmed checks into a reusable Flow

Once the investigation is repeatable, save its stable checks rather than replaying the whole conversation. In this example, build a diagnostic Flow from a saved API status request, a saved SSH Task for bounded worker logs, and a Database query. Keep the restart or configuration repair as a separately reviewed operation so a diagnostic rerun does not repeat a mutation.

  1. Name the inputs and targets

    Declare only the inputs the procedure needs, such as a trusted test job identifier or bounded time window. Select the saved request, SSH Task and explicit SSH connection, and Database connection. Review SQL, catalog/schema, task commands, and input substitution before saving.

  2. Encode the checks you can justify

    Use Condition for a defined comparison of inputs or earlier results. Use Wait Until only when a bounded polling check is appropriate: an API GET/HEAD probe or read-only Database probe, with success/failure conditions and a timeout. Database probes require a read-only connection; SSH is not a Wait Until probe.

  3. Test success and failure paths

    Run in test with known inputs, inspect step outcomes and polling attempts, and deliberately exercise missing resources, a failing condition, and a timeout where practical. Check branch destinations: a Condition choosing a branch is not itself proof of application correctness. A successful run only says the defined steps completed under their configured rules.

Flow editing and execution are free core capabilities. Flow is a local runbook, not an LLM/Agent workflow or a general script runner. API steps reject saved request scripts and multipart bodies; keep an unsuitable existing script in its normal reviewed execution process rather than assuming Flow can run it unchanged.

Changing variables does not rebind every resource

A Flow belongs to a workspace and refers to saved resources there. A variable environment changes the values used by supported substitutions; it is not a deployment target map. Before adapting a tested procedure, inspect every endpoint and resource binding independently.

Desktop and MCP environment selection differ

Opening the desktop Run or Run again dialog initializes its selection from the workspace’s active variable environment, or Workspace-only if none is active. Review that selection; later title-bar changes do not replace an initialized choice. MCP run with omitted or null environmentId means Workspace-only, not the desktop’s active environment.

API requests keep their saved request identity

The selected Flow environment participates in resolving API variables. A parameterized URL can therefore resolve to a different host, while a hardcoded URL remains unchanged unless explicitly overridden. Inspect the resolved URL, authentication, headers, and body, not just the environment name.

SSH keeps an explicit connection

A Flow SSH action references a saved Task and an explicit connection ID. Opt-in workspaceDefaults can supply task input defaults from workspace variables plus the selected environment; this does not switch the SSH connection. Review the host, account, command, and parameters together.

Database keeps its connection and SQL context

A Database action uses the saved connection referenced by its resource ID, plus its SQL and optional catalog/schema. Selecting a variable environment does not automatically choose the corresponding production database.

For a separate target workspace, prepare the needed resources and a definition whose references resolve there. Review the adapted definition again; changing the workspace or selecting an environment is not automatic promotion of a tested Flow. Existing resource validation can catch missing or changed resources, but cannot prove that a reachable host is the intended one or that several services form an atomic transaction.

Hand over an executable proposal, then let a human run it

For production, ask AI to produce a concrete change package: the evidence and uncertainty, proposed script or Flow definition, exact targets, preconditions, expected effects, checks after execution, and recovery procedure. A reviewer should be able to evaluate the change without reconstructing the chat.

  • Review the saved definition and referenced request, Task, and connection settings together. Record the intended revision, environment, runtime inputs, affected services or rows, and the operator responsible. Re-review if those inputs or dependencies change.
  • For mutations, specify idempotency and partial-failure behavior, a backup or recovery prerequisite where needed, a stop condition, and the exact rollback action. Neither a rollback paragraph nor a cancel button makes a destructive change reversible.
  • Have the authorized operator verify the target and execute through the desktop Flow Run confirmation or the team’s normal script/deployment process. MCP policy is not a universal desktop lock; manual execution remains subject to the operator’s credentials and organizational authorization.
  • Compare the outcome with the predeclared success criteria and retain the relevant run history and change record. If a timeout or cancellation leaves the remote result uncertain, inspect the target before retrying. Cancellation does not undo completed effects.

Other MCP tools have their own risk checks, and full_access can bypass guarded confirmations. Do not infer that every high-risk tool call will prompt. When production policy blocks Flow, keep it in place and use only permitted individual diagnostics, or have an operator provide reviewed evidence.

What this workflow provides today

Unfour provides the runtime tools, user-defined Flow steps, execution checks, and local run history used here. The investigation, choice of success criteria, review, and production handoff remain human-directed. Test results are evidence for a proposal, not certification that it is safe for production.

Automatic conversation-to-Flow generation, business-level validation, environment-aware resource promotion, and unattended safe deployment are not provided by this workflow. Treat them as possible future designs, not released capabilities or a delivery commitment. Flow V1 has no scheduler, webhook triggers, parallel steps, sub-flows, or LLM/Agent nodes.

Start with one reviewed test procedure

Prepare a test workspace, collect bounded evidence, and save only the checks you understand and can review.