> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Plugin Registry • Rust AI Agent SDK

> PluginRegistry: Plugin registry for managing loaded plugins

# PluginRegistry

> Defined in the [**plugins**](../modules/plugins) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Plugin registry for managing loaded plugins

## Fields

| Name      | Type                | Description |
| --------- | ------------------- | ----------- |
| `plugins` | `HashMap&lt;String` | -           |
| `enabled` | `HashMap&lt;String` | -           |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new plugin registry

### `register`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn register(&mut self, metadata: PluginMetadata) -> ()
```

Register a plugin

**Parameters:**

| Name       | Type             |
| ---------- | ---------------- |
| `metadata` | `PluginMetadata` |

### `get`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn get(&self, name: &str) -> Option<&PluginMetadata>
```

Get plugin metadata by name

**Parameters:**

| Name   | Type   |
| ------ | ------ |
| `name` | `&str` |

### `has`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn has(&self, name: &str) -> bool
```

Check if plugin is registered

**Parameters:**

| Name   | Type   |
| ------ | ------ |
| `name` | `&str` |

### `is_enabled`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn is_enabled(&self, name: &str) -> bool
```

Check if plugin is enabled

**Parameters:**

| Name   | Type   |
| ------ | ------ |
| `name` | `&str` |

### `enable`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn enable(&mut self, name: &str) -> ()
```

Enable a plugin

**Parameters:**

| Name   | Type   |
| ------ | ------ |
| `name` | `&str` |

### `disable`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn disable(&mut self, name: &str) -> ()
```

Disable a plugin

**Parameters:**

| Name   | Type   |
| ------ | ------ |
| `name` | `&str` |

### `list`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn list(&self) -> Vec<&str>
```

List all registered plugins

### `list_enabled`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn list_enabled(&self) -> Vec<&str>
```

List enabled plugins

### `len`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn len(&self) -> usize
```

Get plugin count

### `is_empty`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn is_empty(&self) -> bool
```

Check if registry is empty

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/plugins.rs#L445">
  `praisonai/src/parity/plugins.rs` at line 445
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Plugins" icon="plug" href="/docs/rust/plugins" />
</CardGroup>
