For the complete documentation index, see llms.txt. This page is also available as Markdown.

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)

  • InputOrchestrator manages multiple input sources

  • Custom input plugins implement the Sensor interface

// 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

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

Learn how to build a new input plugin here

Last updated

Was this helpful?