> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Function: definePlugin()

> Generated from the public TypeScript API.

```ts theme={null}
function definePlugin<T>(spec): InlinePluginSpec;
```

Validate and normalize an inline session plugin.

## Type Parameters

### T

`T` *extends*
\| [`InlinePluginSpec`](../interfaces/InlinePluginSpec)
\| `Omit`\<[`InlinePluginSpec`](../interfaces/InlinePluginSpec), `"type"`>

## Parameters

### spec

`T`

Named bundle of capabilities.

## Returns

[`InlinePluginSpec`](../interfaces/InlinePluginSpec)

An inline plugin descriptor.

## Throws

Invalid or conflicting component definitions.

## Example

```ts theme={null}
const definition = definePlugin({ name: "editorial", skills: [skill] })
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.