Skip to main content

Unified toolkit for building, training, and testing digital and physical operators.

Project description

Operator (optr)

A unified Python framework for building, training, and deploying intelligent operators across digital and physical environments.

[!WARNING]
Early Alpha — APIs and behavior will change without notice.

Overview

optr provides a flexible architecture for creating operators that can:

  • Automate desktop applications via GUI interaction
  • Control physical robots through simulation and hardware interfaces
  • Learn from demonstrations using imitation learning and reinforcement learning
  • Record and replay episodes for testing and training
  • Bridge multiple environments with unified connector interfaces

Key Features

  • Desktop Automation - Click, type, and interact with GUI elements
  • Robot Control - MuJoCo simulation and physical robot support
  • Learning Algorithms - Imitation learning, Pi0, and custom algorithms
  • Episode Recording - Capture and replay operator sequences
  • Modular Connectors - Extensible interface for any environment
  • Validation & Safety - Built-in sentinel guards and validators
  • Training Pipeline - Dataset management and model training

Installation

Basic Install

pip install optr

Development Install (using uv)

git clone https://github.com/codecflow/optr

cd optr

uv sync --dev

Quick Start

Desktop Automation

Create an operator that automates login:

# my_app/operators/login.py

from optr.operator import Operator
from optr.connector.desktop import DesktopConnector

async def login_operator():
    op = Operator({"desktop": DesktopConnector()})
    
    # Click username field
    await op.execute_action("click", selector="#username")
    await op.execute_action("type", text="demo_user")
    
    # Click password field  
    await op.execute_action("click", selector="#password")
    await op.execute_action("type", text="secure_pass")
    
    # Submit form
    await op.execute_action("click", selector="#submit")
    
    return op

Robot Control (MuJoCo)

Control a simulated robot:

# my_app/operators/robot.py

from optr.operator import Operator
from optr.simulator.mujoco import MuJoCoSimulation

async def robot_operator():
    sim = MuJoCoSimulation("models/robot.xml")
    op = Operator({"robot": sim.get_connector()})
    
    # Move to target position
    await op.execute_action("move", 
                           connector_name="robot",
                           position=[0.5, 0.3, 0.2])
    
    # Grasp object
    await op.execute_action("grasp", 
                           connector_name="robot",
                           force=10.0)
    
    return op

Core Concepts

Operators

The main abstraction for defining automated behaviors. Operators can work with multiple connectors simultaneously.

Connectors

Interfaces to different environments (desktop, robot, web, etc.). Each connector provides state observation and action execution.

Algorithms

Learning algorithms for training operators from demonstrations or through reinforcement learning.

Episodes

Recorded sequences of states and actions that can be replayed or used for training.

Sentinel

Safety and validation layer that ensures operators behave within defined constraints.

Roadmap

  • Cloud API connectors
  • Distributed operator coordination
  • Model zoo with pre-trained operators
  • Real-time monitoring dashboard

License

MIT © CodecFlow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optr-0.0.0a3.tar.gz (21.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optr-0.0.0a3-py3-none-any.whl (114.9 kB view details)

Uploaded Python 3

File details

Details for the file optr-0.0.0a3.tar.gz.

File metadata

  • Download URL: optr-0.0.0a3.tar.gz
  • Upload date:
  • Size: 21.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for optr-0.0.0a3.tar.gz
Algorithm Hash digest
SHA256 3df1d134cd9ecd4eae0f3be024f0b0f51efa30e8a3bd0767ff64108f6785d2b0
MD5 84de1d1d7c10a48f23a200c8ec831d95
BLAKE2b-256 e19c50eaa0b570c00a4d212ce773a09a06dcefa4050b5b3035d55c414509b37a

See more details on using hashes here.

File details

Details for the file optr-0.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: optr-0.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 114.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for optr-0.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9cead9aef327117be0653560e10b344f7bdb1eb2c73b8cc86ebbcd6d0aefe8
MD5 c94837a9a7ffbcd42633a73a43072016
BLAKE2b-256 0da09bd53bde957bf9ddcd550568038e284b773a6a3087b9dbecba0fb1a36ef7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page