# createClassicAiPlugin

Creates an AI plugin from host model/workspace ports. Installing it does not provide a model service or persistent sessions.

Creates an AI plugin from host model/workspace ports. Installing it does not provide a model service or persistent sessions.

`@quirekit/classic-ai` · **Commercial**

## Editor compatibility
Layer：**Classic product integration**
| Editor | Status | Assembly and boundaries |
| --- | --- | --- |
| Classic | Supported | Install this Classic product plugin in createClassicEditor plugins. Supply its required models, host ports and services as documented below. |
| Block | Unsupported | Block does not consume Classic product contributions, plugins or paginated assembly. Use shared capabilities and Block adapters instead of copying this entry's Classic configuration. |

“Supported” means the product assembly above exists; interaction, host services and file formats retain their own conditions. See [status and integration rules](/en/plugins/compatibility). Licensing is shown separately.

## Installation

The current `@quirekit/classic-ai` manifest is private. This site uses workspace source; external projects need the relevant distribution package rather than assuming public npm availability.

This entry is a commercial component. Obtain distribution access and authorization first; installation commands require that distribution source.

Install the product plugin in createClassicEditor plugins rather than Core extensions. Required host ports are listed below.

```ts
import { createClassicAiPlugin } from '@quirekit/classic-ai'
```

Use compatible versions available from your distribution source. This site uses the Alpha workspace. License labels come from package metadata; see [support and licensing](/en/support).

## Integration by editor

These snippets use an existing host element named element. The host owns container sizing and persistence; call instance.destroy() on teardown. Avoid duplicating preset capabilities and supply required host ports before installation.

### Classic

Install this Classic product plugin in createClassicEditor plugins. Supply its required models, host ports and services as documented below.

```ts
import { createClassicEditor } from '@quirekit/classic-editor'
import '@quirekit/classic-editor/styles.css'
import { createClassicWordDefaultDocument } from '@quirekit/classic-docx'
import { createClassicWordPreset } from '@quirekit/classic-docx'
import '@quirekit/classic-docx/styles.css'
import { createClassicAiPlugin } from '@quirekit/classic-ai'

const instance = createClassicEditor({
  element,
  preset: createClassicWordPreset(),
  document: createClassicWordDefaultDocument(),
  plugins: [createClassicAiPlugin()],
})
```

### Block

Block does not consume Classic product contributions, plugins or paginated assembly. Use shared capabilities and Block adapters instead of copying this entry's Classic configuration.

## Configuration

Pass these fields to the factory options. Required ports come from the host. undefined means no explicit option; documented factory fallbacks apply.

### primaryModel

Initially selected model.

Type：`AiChatModelDescriptor | undefined`

Default：`undefined`

### availableModels

Other configured model profiles.

Type：`readonly AiChatModelDescriptor[] | undefined`

Default：`undefined`

### modelSelectionStore

Selected model preference authority.

Type：`AiChatModelSelectionStore | undefined`

Default：`undefined`

### authorizationModeStore

Write policy preference authority.

Type：`AiChatAuthorizationModeStore | undefined`

Default：`undefined`

### createResponder

Application responder factory, instantiated for each editor attachment.

Type：`(() => AiChatResponder) | undefined`

Default：`undefined`

### resolveAgentRuntime

Model runtime resolver for the first-party Pi responder.

Type：`QuireAiRuntimeResolver | undefined`

Default：`undefined`

### providerStatus

Safe visible connection state.

Type：`AiChatProviderStatus | undefined`

Default：`undefined`

### providerSettings

Connection settings entry.

Type：`AiChatProviderSettingsAction | undefined`

Default：`undefined`

### title

Visible workspace title.

Type：`string | undefined`

Default：`undefined`

### defaultOpen

Open the sidebar after mounting.

Type：`false | true | undefined`

Default：`undefined`

### diagnostics

Shows raw review differences for developers.

Type：`false | true | undefined`

Default：`undefined`

### openSkillLibrary

Opens the skill library dialog from the workspace header.

Type：`(() => void) | undefined`

Default：`undefined`

### skills

Skills the assistant may read and follow; refreshed when the workspace is created.

Type：`QuireAiSkillLibrary | undefined`

Default：`undefined`

### workflowHints

Tells the assistant which tool and operation suit common requests; default true.
Off leaves the choice to the model, from the tool descriptions alone.

Type：`false | true | undefined`

Default：`undefined`

## Commands and runtime

This entry declares no directly enumerable commands. Children supply bundle commands; product plugins use contributions or document services.

createResponder and resolveAgentRuntime are mutually exclusive and throw TypeError when combined. Missing model connections use the disconnected responder.

## Next steps

Return to [all plugins](/en/plugins), or read [configuration](/en/plugins/configuration) to distinguish options, attributes and commands.

Continue with [Classic quick start](/en/classic/quick-start) and [configuration/lifetime](/en/classic/configuration). See [product plugin development](/en/build/product-plugin) for your own UI and services.
