<!--
 ⚠️  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) / AbstractExecutor

# Class: AbstractExecutor

**`Fileoverview`**

Abstract Executor Base Class

🎯 ABSTRACT CLASS - DO NOT DEPEND ON CONCRETE IMPLEMENTATIONS

Provides shared execution helpers (retry, timeout, validation, logging) for all
executor implementations. Concrete executors should extend this class and inject
their own logger implementation if they need custom logging behavior.

**`Example`**

```typescript
export class MyCustomExecutor extends AbstractExecutor {
  async executeChat(request: IChatExecutionRequest): Promise\<AssistantMessage\> {
    return this.withRetry(() => this.performChat(request));
  }
}
```

## Hierarchy

- **`AbstractExecutor`**

  ↳ [`LocalExecutor`](LocalExecutor)

## Implements

- [`IExecutor`](../interfaces/IExecutor)

## Table of contents

### Constructors

- [constructor](AbstractExecutor#constructor)

### Properties

- [name](AbstractExecutor#name)
- [version](AbstractExecutor#version)

### Methods

- [executeChat](AbstractExecutor#executechat)
- [executeChatStream](AbstractExecutor#executechatstream)
- [supportsTools](AbstractExecutor#supportstools)
- [validateConfig](AbstractExecutor#validateconfig)
- [dispose](AbstractExecutor#dispose)

## Constructors

### constructor

• **new AbstractExecutor**(`logger?`): [`AbstractExecutor`](AbstractExecutor)

#### Parameters

| Name     | Type                                             | Default value             |
| :------- | :----------------------------------------------- | :------------------------ |
| `logger` | [`AbstractLogger`](../interfaces/AbstractLogger) | `DEFAULT_ABSTRACT_LOGGER` |

#### Returns

[`AbstractExecutor`](AbstractExecutor)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:35](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L35)

## Properties

### name

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

Get executor name/identifier

#### Implementation of

[IExecutor](../interfaces/IExecutor).[name](../interfaces/IExecutor#name)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:39](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L39)

---

### version

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

Get executor version

#### Implementation of

[IExecutor](../interfaces/IExecutor).[version](../interfaces/IExecutor#version)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:40](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L40)

## Methods

### executeChat

▸ **executeChat**(`request`): `Promise`\<[`IAssistantMessage`](../interfaces/IAssistantMessage)\>

Execute a chat completion request
Must be implemented by concrete executor classes

#### Parameters

| Name      | Type                                                           |
| :-------- | :------------------------------------------------------------- |
| `request` | [`IChatExecutionRequest`](../interfaces/IChatExecutionRequest) |

#### Returns

`Promise`\<[`IAssistantMessage`](../interfaces/IAssistantMessage)\>

#### Implementation of

[IExecutor](../interfaces/IExecutor).[executeChat](../interfaces/IExecutor#executechat)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:46](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L46)

---

### executeChatStream

▸ **executeChatStream**(`request`): `AsyncIterable`\<[`TUniversalMessage`](../modules#tuniversalmessage), `any`, `any`\>

Execute a streaming chat completion request
Optional - can be implemented by concrete executor classes

#### Parameters

| Name      | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `request` | [`IStreamExecutionRequest`](../interfaces/IStreamExecutionRequest) |

#### Returns

`AsyncIterable`\<[`TUniversalMessage`](../modules#tuniversalmessage), `any`, `any`\>

#### Implementation of

[IExecutor](../interfaces/IExecutor).[executeChatStream](../interfaces/IExecutor#executechatstream)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:52](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L52)

---

### supportsTools

▸ **supportsTools**(): `boolean`

Check if the executor supports tool calling
Default implementation returns false, can be overridden

#### Returns

`boolean`

#### Implementation of

[IExecutor](../interfaces/IExecutor).[supportsTools](../interfaces/IExecutor#supportstools)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:58](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L58)

---

### validateConfig

▸ **validateConfig**(): `boolean`

Validate executor configuration
Default implementation returns true, can be overridden

#### Returns

`boolean`

#### Implementation of

[IExecutor](../interfaces/IExecutor).[validateConfig](../interfaces/IExecutor#validateconfig)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:66](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L66)

---

### dispose

▸ **dispose**(): `Promise`\<`void`\>

Clean up resources when executor is no longer needed
Default implementation does nothing, can be overridden

#### Returns

`Promise`\<`void`\>

#### Implementation of

[IExecutor](../interfaces/IExecutor).[dispose](../interfaces/IExecutor#dispose)

#### Defined in

[packages/agents/src/abstracts/abstract-executor.ts:74](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-executor.ts#L74)
