Skip to main content
The safe default for an interactive agent is:
Connect to https://app.uselamina.ai/mcp/agent/v2. Lamina can select and stitch apps, atomic models, and composition steps behind a seven-tool task-level contract.

Guarantees

No generation before approval

lamina_plan stores an immutable plan but never dispatches creative generation. Execution requires the exact plan fingerprint, explicit user approval, and a positive maxCredits.

Bounded and retry-safe

lamina_execute enforces the approved credit ceiling. Its idempotency key makes an exact retry return the original run and rejects changed requests using the same key.
An unknown estimate is null, not zero. Execute unknown-cost work only after the user sees the warning and approves allowUnknownCost: true.

The Loop

1

Read credits and brand context

Call lamina_credits. For brand-sensitive requests, call lamina_brand_context and preserve the returned brandProfileId. Empty brand fields are unconfigured, not an invitation to invent them.
2

Plan the outcome

Call lamina_plan with the brief, known asset URLs, modality/platform, and optional constraints. Use preferredPath only when the user has a real routing preference.
3

Resolve questions

If status is needs_clarification, ask questions[] and plan again. For an awaiting_approval plan, collect requiredInputs[] answers for execution without rebuilding the plan.
4

Approve

Show the stored steps, expected outputs, warnings, and estimated credits. Obtain explicit approval for both the frozen plan and the maximum spend.
5

Execute

Call lamina_execute with the unchanged planId, planFingerprint, required inputs, finite maxCredits, and an idempotency key.
6

Monitor

Call lamina_status with the returned run ID. A waiting call is capped at 25 seconds; repeat it when timedOut: true or the snapshot is still non-terminal.
7

Deliver or cancel

On completion, return durable URLs from outputs[]. If the user stops the work, call lamina_cancel and report its actual state rather than claiming a request was already cancelled.

Multi-Step Workflows

Describe the full outcome in one plan:
Lamina freezes cross-step references in the plan and resolves them server-side. The agent should not copy an earlier output URL into a later step or rediscover tools after approval.

Local Assets

Call lamina_upload_asset to issue an uploadUrl and assetUrl. PUT the bytes to the signed URL before using assetUrl. If the agent environment cannot upload bytes, ask for a public URL.

Normalized Run Lifecycle

The v2 lamina_status and lamina_cancel tools work across:
  • v2 pipeline runs
  • advanced app-workflow runs
  • atomic image and video runs
  • narrated-video compose runs
Preserve every returned runId exactly. Completed v2 status entries use outputs[].url.

Advanced Post-Processing

The advanced endpoint at https://app.uselamina.ai/mcp/agent exposes the full 30-tool surface. Use it only when the user explicitly needs a lower-level action such as:
  • lamina_brand_score for a completed image-producing workflow, atomic, or pipeline run
  • lamina_brand_feedback to record approve/reject feedback on a workflow run
  • lamina_refine_to_brand for bounded refinement of a rerunnable workflow image
  • lamina_topup to create a Stripe-hosted checkout URL
Brand scoring does not support video-only, compose-only, or output-less runs. Refinement does not support arbitrary atomic, compose, or pipeline runs. Never collect card details in chat.

REST and Headless Workers

The /v1 REST creation API remains suitable for server-owned integrations and unattended workers. Its documented headless creation, webhook, and outputs[].value contracts are separate from v2 MCP. Do not mix REST response shapes with v2’s normalized MCP status.

Minimal Interactive Run

See Agent Integration Patterns for endpoint selection and Agent Recipes for detailed examples.