mongoui

AI workflows

Run database tasks with the AI Operator

Turn a database request into a validated, risk-labeled plan with explicit read, preview, and write approvals.

The AI Database Operator plans database work. It does not receive an unrestricted MongoDB shell. Every plan step must match a typed operation that mongoui already knows how to validate, preview, execute, and record.

mongoui AI Database Operator with a validated archive plan awaiting preview
Operator turns a request into a typed, risk-labeled plan with explicit preview and approval gates.

Start with the right scope

  1. Connect with Read only or Read & write access.
  2. Select a collection when the task is collection-specific. Leave the target empty for deployment inventory work.
  3. Open Operator.
  4. Choose Structure only or Masked shapes.
  5. Describe the result or database change you need, then choose Plan task.

Structure only sends no document values. Masked shapes locally converts up to three documents to type-preserving masks before provider egress. The unavailable Selected values control is reserved for a future per-request approval gate.

Review the validated plan

Each plan card shows:

  • the exact target and canonical typed operation;
  • a risk tier from 0 through 4;
  • whether the step is local, a read, a preview, or a write;
  • the MongoDB server-time budget;
  • the provider data scope.

The current catalog covers namespace, schema, index, storage, and capability inspection; find, count, aggregation, explain, optimization, and pipeline debugging; query and pipeline drafting; exports and comparisons; exact document mutations; guarded bulk updates and deletes; duplicate review; index creation and visibility; validation; collection creation; and view creation.

Unavailable operations are removed from the catalog. A read-only connection removes write tools below the renderer. Collection kinds and server capabilities narrow the catalog again before planning.

Reads and writes have different gates

Approved read cards can run in sequence when their dependencies are complete. The results are bounded and displayed as measured outcomes.

A write that supports a preview must first run that preview. The final button applies the exact reviewed change. Cleanup writes use the existing dry-run, fingerprint, freshness, Activity, and Undo machinery. Structural writes use the existing typed review workflow. Operator does not bypass either path.

If a write is dispatched but completion cannot be confirmed, mongoui marks the outcome unconfirmed and does not retry automatically. Inspect Activity and the live database before deciding what happened.

Continue once from measured evidence

When the initial plan contains only reads and every read succeeds, Plan next step can make one additional provider request. That request contains only the displayed, value-free measurements. Raw query results are excluded.

The provider can conclude the task or propose one final validated plan. This is useful for requests such as "inspect this collection and suggest the safest index" where the right action depends on measured schema or plan evidence.

Context changes expire approval

Changing the connection, namespace, provider, model, privacy mode, available catalog, or collection evidence makes pending cards stale. Submit the request again. A stale approval is not transferable to a new target, even when the text still looks right.

Configure and test the provider in AI provider setup. For a single find or aggregation draft, use natural-language queries instead.