> For the complete documentation index, see [llms.txt](https://docs.openmind.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmind.com/build/concepts/4_inputs.md).

# Inputs

Input Plugin Overview

"Input Plugins" provide the sensory capabilities that allow robots to perceive their environment. These plugins capture, process, and format various types of input data, making them available to the robot's core runtime for decision-making.

### Basic Architecture

* `Sensor` interface defines the core contract for all input plugins ([internal/inputs/sensor.go](https://github.com/OpenMind/OM1/blob/main/internal/inputs/sensor.go))
* `Orchestrator` (`internal/inputs/orchestrator.go`) manages multiple input sources
* Custom input plugins implement the `Sensor` interface and register themselves with `inputs.Register(...)`

```go
// Sensor is the base interface for all input sensors.
type Sensor interface {
    // Listen creates a channel that continuously yields raw input events.
    Listen(ctx context.Context) (<-chan any, error)

    // Poll retrieves a single raw input event.
    Poll(ctx context.Context) (any, error)

    // RawToText converts raw input data into Message format.
    RawToText(ctx context.Context, rawInput any) (*Message, error)

    // FormattedLatestBuffer returns the formatted buffer string.
    FormattedLatestBuffer() string

    // Stop signals the sensor to stop listening and clean up resources.
    Stop()
}
```

### Examples

[Input plugin code examples](https://github.com/OpenMind/OM1/blob/main/plugins/inputs)

Here are a few examples for you to reuse and build on:

* [Google ASR](https://github.com/OpenMind/OM1/blob/main/plugins/inputs/asr/google_asr.go)
* [Face Presence](https://github.com/OpenMind/OM1/blob/main/plugins/inputs/face_presence.go)
* [VLM (Gemini)](https://github.com/OpenMind/OM1/blob/main/plugins/inputs/vlm/vlm_gemini.go)

Learn how to build a new input plugin [here](https://docs.openmind.com/developer-cookbook/introduction/input.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openmind.com/build/concepts/4_inputs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
