AI Actions provides ready-to-use AI operations for SuperDoc. Run natural-language commands to find, replace, insert tracked changes, and add comments while preserving the formatting of the content being edited—including heading levels and paragraph styles. Works with OpenAI, Anthropic, or custom providers. Includes the AI Planner for multi-step workflows and lower-level utilities for advanced use cases.Documentation Index
Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Quick start
What it does
AI Actions is SuperDoc’s high-level AI offering. It provides pre-built operations for common document automation tasks: UseinsertTrackedChange when edits should be reviewed (e.g. legal or branding updates); use replace for final text changes.
- AI-powered search, rewrites, and summaries
- Tracked changes and comments created by an AI assistant
- Bulk edits and repetitive automation
- Multi-provider support (OpenAI, Anthropic, custom)
Capabilities
- Natural-language operations - Find, replace, highlight, and manipulate content using plain English
- Formatting-safe edits - Keeps existing Word headings, custom styles, and document structure intact while modifying text
- Tracked changes & comments - AI-generated edits attributed to your configured AI user
- Summaries & completions - Generate summaries or free-form content with streaming support
- Provider-agnostic - Works with OpenAI, Anthropic, custom HTTP gateways, or custom providers
- Lifecycle hooks - Real-time callbacks for streaming, errors, and readiness
- AI Planner - Multi-step AI workflows with planning and execution capabilities
- Advanced utilities - Lower-level exports for custom implementations and tool management
Lifecycle & readiness
waitUntilReady, so explicit checks are only required when guarding UI or retry flows.
Error handling
enableLogging: true. The package will emit parsing and traversal issues to console.error.
Advanced exports
The package exports additional utilities for advanced use cases:Provider factory
AI Planner
For multi-step AI workflows with planning capabilities:Service classes
For custom implementations, you can use the lower-level service classes:AIActionsService- Core service class that provides AI-powered document actionsEditorAdapter- Adapter for SuperDoc editor operations, encapsulating editor-specific API calls
Tool utilities
Utilities for working with AI tools:Type exports
The package exports TypeScript types including:AIPlannerConfig,AIPlannerExecutionResult,AIPlan- Planner typesAIToolActions,SelectionRange,SelectionSnapshot- Tool and selection typesAIProviderInput,OpenAIProviderConfig,AnthropicProviderConfig,HttpProviderConfig- Provider configuration typesPlannerContextSnapshot,BuilderPlanResult- Advanced workflow types
Documentation
- Configuration - Provider setup and configuration options
- Methods - Instance methods and AI actions
- Hooks - Lifecycle and streaming callbacks

