Sanity Library Reference Docs
    Preparing search index...

    Variable useAgentTransformConst Alpha

    useAgentTransform: () => (
        options: AgentTransformOptions,
    ) => Subscribable<unknown> = ...

    Transforms an existing document or selected fields using Sanity Agent Actions.

    • Accepts instruction and instructionParams (constants, fields, documents, GROQ queries).
    • Can write to the same or a different targetDocument (create/edit), and target specific paths.
    • Supports per-path image transform instructions and image description operations.
    • Optional temperature, async, noWrite, conditionalPaths.

    Returns a stable callback that triggers the action and yields a Subscribable stream.

    Type declaration