penInput

Build a new input plugin

Overview

This guide walks you through creating a new input plugin for OM1. Input plugins allow you to integrate various data sources and sensors into your agent.

Prerequisites

  • Understanding of Python classes and inheritance

  • Familiarity with async programming

  • Knowledge of the data source you're integrating

Implementation Steps

Step 1: Create a Provider class (Optional)

If your plugin requires complex initialization or external service integration, create a provider class.

Location: /src/providers/your_provider.py

Step 2: Create a new Plugin File

To proceed with a new input plugin integration, create a python file. Location: /src/inputs/plugins/your_plugin.py

Required imports -

from inputs.base import Sensor, SensorConfig
from inputs.base.loop import FuserInput
from providers.plugin_provider import PluginProvider # import your provider class (if defined)
from providers.io_provider import IOProvider

Step 3: Implement Your Plugin Class

Step 4: Implement Required Methods

Implement any methods that will be required for the setup. Here are a few examples-

Plugin Registration

Automatic Discovery - Plugins are automatically discovered by the system. No manual registration required!

How it works:

Requirements for auto-discovery:

Last updated

Was this helpful?