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

# Interface: LimitsPluginOptions

Limits plugin configuration

## Hierarchy

- [`IPluginOptions`](IPluginOptions)

  ↳ **`LimitsPluginOptions`**

## Table of contents

### Properties

- [enabled](LimitsPluginOptions#enabled)
- [category](LimitsPluginOptions#category)
- [priority](LimitsPluginOptions#priority)
- [moduleEvents](LimitsPluginOptions#moduleevents)
- [subscribeToAllModuleEvents](LimitsPluginOptions#subscribetoallmoduleevents)
- [strategy](LimitsPluginOptions#strategy)
- [maxTokens](LimitsPluginOptions#maxtokens)
- [maxRequests](LimitsPluginOptions#maxrequests)
- [timeWindow](LimitsPluginOptions#timewindow)
- [maxCost](LimitsPluginOptions#maxcost)
- [tokenCostPer1000](LimitsPluginOptions#tokencostper1000)
- [refillRate](LimitsPluginOptions#refillrate)
- [bucketSize](LimitsPluginOptions#bucketsize)
- [costCalculator](LimitsPluginOptions#costcalculator)

## Properties

### enabled

• `Optional` **enabled**: `boolean`

Whether the plugin is enabled

#### Inherited from

[IPluginOptions](IPluginOptions).[enabled](IPluginOptions#enabled)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:126](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L126)

---

### category

• `Optional` **category**: [`PluginCategory`](../enums/PluginCategory)

Plugin category for classification

#### Inherited from

[IPluginOptions](IPluginOptions).[category](IPluginOptions#category)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:128](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L128)

---

### priority

• `Optional` **priority**: `number`

Plugin priority for execution order

#### Inherited from

[IPluginOptions](IPluginOptions).[priority](IPluginOptions#priority)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:130](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L130)

---

### moduleEvents

• `Optional` **moduleEvents**: [`EventType`](../modules#eventtype)[]

Events to subscribe to from modules

#### Inherited from

[IPluginOptions](IPluginOptions).[moduleEvents](IPluginOptions#moduleevents)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:132](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L132)

---

### subscribeToAllModuleEvents

• `Optional` **subscribeToAllModuleEvents**: `boolean`

Whether to subscribe to all module events

#### Inherited from

[IPluginOptions](IPluginOptions).[subscribeToAllModuleEvents](IPluginOptions#subscribetoallmoduleevents)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:134](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L134)

---

### strategy

• **strategy**: [`LimitsStrategy`](../modules#limitsstrategy)

Rate limiting strategy

#### Defined in

[packages/agents/src/plugins/limits/types.ts:13](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L13)

---

### maxTokens

• `Optional` **maxTokens**: `number`

Maximum tokens per time window

#### Defined in

[packages/agents/src/plugins/limits/types.ts:15](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L15)

---

### maxRequests

• `Optional` **maxRequests**: `number`

Maximum requests per time window

#### Defined in

[packages/agents/src/plugins/limits/types.ts:17](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L17)

---

### timeWindow

• `Optional` **timeWindow**: `number`

Time window in milliseconds

#### Defined in

[packages/agents/src/plugins/limits/types.ts:19](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L19)

---

### maxCost

• `Optional` **maxCost**: `number`

Maximum cost per time window (in USD)

#### Defined in

[packages/agents/src/plugins/limits/types.ts:21](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L21)

---

### tokenCostPer1000

• `Optional` **tokenCostPer1000**: `number`

Token cost per 1000 tokens (in USD)

#### Defined in

[packages/agents/src/plugins/limits/types.ts:23](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L23)

---

### refillRate

• `Optional` **refillRate**: `number`

Bucket refill rate for token bucket strategy

#### Defined in

[packages/agents/src/plugins/limits/types.ts:25](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L25)

---

### bucketSize

• `Optional` **bucketSize**: `number`

Initial bucket size for token bucket strategy

#### Defined in

[packages/agents/src/plugins/limits/types.ts:27](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L27)

---

### costCalculator

• `Optional` **costCalculator**: (`tokens`: `number`, `model`: `string`) => `number`

Custom cost calculator

#### Type declaration

▸ (`tokens`, `model`): `number`

##### Parameters

| Name     | Type     |
| :------- | :------- |
| `tokens` | `number` |
| `model`  | `string` |

##### Returns

`number`

#### Defined in

[packages/agents/src/plugins/limits/types.ts:29](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/limits/types.ts#L29)
