<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / IWorkflowConverter

# Interface: IWorkflowConverter\<TInput, TOutput\>

Workflow Converter Interface

Core interface for converting between different workflow representations.
All workflow converters must implement this interface.

## Type parameters

| Name      | Type                                     | Description               |
| :-------- | :--------------------------------------- | :------------------------ |
| `TInput`  | extends [`IWorkflowData`](IWorkflowData) | Input workflow data type  |
| `TOutput` | extends [`IWorkflowData`](IWorkflowData) | Output workflow data type |

## Table of contents

### Properties

- [name](IWorkflowConverter#name)
- [version](IWorkflowConverter#version)
- [sourceFormat](IWorkflowConverter#sourceformat)
- [targetFormat](IWorkflowConverter#targetformat)

### Methods

- [convert](IWorkflowConverter#convert)
- [validateInput](IWorkflowConverter#validateinput)
- [validateOutput](IWorkflowConverter#validateoutput)
- [canConvert](IWorkflowConverter#canconvert)
- [getStats](IWorkflowConverter#getstats)
- [resetStats](IWorkflowConverter#resetstats)

## Properties

### name

• `Readonly` **name**: `string`

Converter name for identification

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:146](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L146)

---

### version

• `Readonly` **version**: `string`

Converter version

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:149](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L149)

---

### sourceFormat

• `Readonly` **sourceFormat**: `string`

Source format that this converter accepts

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:152](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L152)

---

### targetFormat

• `Readonly` **targetFormat**: `string`

Target format that this converter produces

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:155](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L155)

## Methods

### convert

▸ **convert**(`input`, `options?`): `Promise`\<[`IWorkflowConversionResult`](IWorkflowConversionResult)\<`TOutput`\>\>

Convert workflow data from input format to output format

#### Parameters

| Name       | Type                                                       | Description         |
| :--------- | :--------------------------------------------------------- | :------------------ |
| `input`    | `TInput`                                                   | Input workflow data |
| `options?` | [`IWorkflowConversionOptions`](IWorkflowConversionOptions) | Conversion options  |

#### Returns

`Promise`\<[`IWorkflowConversionResult`](IWorkflowConversionResult)\<`TOutput`\>\>

Promise resolving to conversion result

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:164](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L164)

---

### validateInput

▸ **validateInput**(`input`): `Promise`\<\{ `isValid`: `boolean` ; `errors`: `string`[] ; `warnings`: `string`[] }\>

Validate input data before conversion

#### Parameters

| Name    | Type     | Description         |
| :------ | :------- | :------------------ |
| `input` | `TInput` | Input workflow data |

#### Returns

`Promise`\<\{ `isValid`: `boolean` ; `errors`: `string`[] ; `warnings`: `string`[] }\>

Promise resolving to validation result

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:172](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L172)

---

### validateOutput

▸ **validateOutput**(`output`): `Promise`\<\{ `isValid`: `boolean` ; `errors`: `string`[] ; `warnings`: `string`[] }\>

Validate output data after conversion

#### Parameters

| Name     | Type      | Description          |
| :------- | :-------- | :------------------- |
| `output` | `TOutput` | Output workflow data |

#### Returns

`Promise`\<\{ `isValid`: `boolean` ; `errors`: `string`[] ; `warnings`: `string`[] }\>

Promise resolving to validation result

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:184](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L184)

---

### canConvert

▸ **canConvert**(`input`): input is TInput

Check if this converter supports the given input format

#### Parameters

| Name    | Type                             | Description         |
| :------ | :------------------------------- | :------------------ |
| `input` | [`IWorkflowData`](IWorkflowData) | Input data to check |

#### Returns

input is TInput

True if converter can handle this input

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:196](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L196)

---

### getStats

▸ **getStats**(): `Object`

Get conversion statistics and metrics

#### Returns

`Object`

Converter performance metrics

| Name                    | Type     |
| :---------------------- | :------- |
| `totalConversions`      | `number` |
| `successfulConversions` | `number` |
| `failedConversions`     | `number` |
| `averageProcessingTime` | `number` |
| `lastConversionAt?`     | `Date`   |

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:203](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L203)

---

### resetStats

▸ **resetStats**(): `void`

Reset converter statistics

#### Returns

`void`

#### Defined in

[packages/agents/src/interfaces/workflow-converter.ts:214](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/workflow-converter.ts#L214)
