optr


Nameoptr JSON
Version 0.0.0a2 PyPI version JSON
download
home_pageNone
SummaryUnified toolkit for building, training, and testing digital and physical operators.
upload_time2025-08-13 13:42:35
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords automation desktop operators robotics sdk simulation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# 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
```bash
pip install optr
```

### Development Install (using uv)
```bash
git clone https://github.com/codecflow/optr

cd optr

uv sync --dev
```

## Quick Start

### Desktop Automation

Create an operator that automates login:

```python
# 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:

```python
# 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


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "optr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "automation, desktop, operators, robotics, sdk, simulation",
    "author": null,
    "author_email": "CodecFlow Team <team@codecflow.ai>",
    "download_url": "https://files.pythonhosted.org/packages/8b/76/50fd36a2298a2d1cfdbbb73c99fa5a46ac9b51db43d9c1b76dc96b878cc5/optr-0.0.0a2.tar.gz",
    "platform": null,
    "description": "\n\n# Operator (`optr`)\n\nA unified Python framework for building, training, and deploying intelligent operators across digital and physical environments.\n\n> [!WARNING]  \n> **Early Alpha** \u2014 APIs and behavior will change without notice.\n\n## Overview\n\n`optr` provides a flexible architecture for creating operators that can:\n- **Automate desktop applications** via GUI interaction\n- **Control physical robots** through simulation and hardware interfaces  \n- **Learn from demonstrations** using imitation learning and reinforcement learning\n- **Record and replay** episodes for testing and training\n- **Bridge multiple environments** with unified connector interfaces\n\n## Key Features\n\n- **Desktop Automation** - Click, type, and interact with GUI elements\n- **Robot Control** - MuJoCo simulation and physical robot support\n- **Learning Algorithms** - Imitation learning, Pi0, and custom algorithms\n- **Episode Recording** - Capture and replay operator sequences\n- **Modular Connectors** - Extensible interface for any environment\n- **Validation & Safety** - Built-in sentinel guards and validators\n- **Training Pipeline** - Dataset management and model training\n\n## Installation\n\n### Basic Install\n```bash\npip install optr\n```\n\n### Development Install (using uv)\n```bash\ngit clone https://github.com/codecflow/optr\n\ncd optr\n\nuv sync --dev\n```\n\n## Quick Start\n\n### Desktop Automation\n\nCreate an operator that automates login:\n\n```python\n# my_app/operators/login.py\n\nfrom optr.operator import Operator\nfrom optr.connector.desktop import DesktopConnector\n\nasync def login_operator():\n    op = Operator({\"desktop\": DesktopConnector()})\n    \n    # Click username field\n    await op.execute_action(\"click\", selector=\"#username\")\n    await op.execute_action(\"type\", text=\"demo_user\")\n    \n    # Click password field  \n    await op.execute_action(\"click\", selector=\"#password\")\n    await op.execute_action(\"type\", text=\"secure_pass\")\n    \n    # Submit form\n    await op.execute_action(\"click\", selector=\"#submit\")\n    \n    return op\n```\n\n### Robot Control (MuJoCo)\n\nControl a simulated robot:\n\n```python\n# my_app/operators/robot.py\n\nfrom optr.operator import Operator\nfrom optr.simulator.mujoco import MuJoCoSimulation\n\nasync def robot_operator():\n    sim = MuJoCoSimulation(\"models/robot.xml\")\n    op = Operator({\"robot\": sim.get_connector()})\n    \n    # Move to target position\n    await op.execute_action(\"move\", \n                           connector_name=\"robot\",\n                           position=[0.5, 0.3, 0.2])\n    \n    # Grasp object\n    await op.execute_action(\"grasp\", \n                           connector_name=\"robot\",\n                           force=10.0)\n    \n    return op\n```\n\n## Core Concepts\n\n### Operators\nThe main abstraction for defining automated behaviors. Operators can work with multiple connectors simultaneously.\n\n### Connectors\nInterfaces to different environments (desktop, robot, web, etc.). Each connector provides state observation and action execution.\n\n### Algorithms\nLearning algorithms for training operators from demonstrations or through reinforcement learning.\n\n### Episodes\nRecorded sequences of states and actions that can be replayed or used for training.\n\n### Sentinel\nSafety and validation layer that ensures operators behave within defined constraints.\n\n## Roadmap\n\n- [ ] Cloud API connectors\n- [ ] Distributed operator coordination\n- [ ] Model zoo with pre-trained operators\n- [ ] Real-time monitoring dashboard\n\n## License\n\nMIT \u00a9 CodecFlow\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unified toolkit for building, training, and testing digital and physical operators.",
    "version": "0.0.0a2",
    "project_urls": {
        "Issues": "https://github.com/codecflow/optr/issues",
        "Repository": "https://github.com/codecflow/optr"
    },
    "split_keywords": [
        "automation",
        " desktop",
        " operators",
        " robotics",
        " sdk",
        " simulation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2332b997fd735d5f2ab51363a07c2d44054518fea7114e8df4f57fc147e3be34",
                "md5": "30fb2ede9ffbaf0f4d2cbba193c73384",
                "sha256": "37e43a633359395056dc556dcd6d3b07ab6953633be921917ee12cbf94458c09"
            },
            "downloads": -1,
            "filename": "optr-0.0.0a2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30fb2ede9ffbaf0f4d2cbba193c73384",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 52018,
            "upload_time": "2025-08-13T13:42:33",
            "upload_time_iso_8601": "2025-08-13T13:42:33.689376Z",
            "url": "https://files.pythonhosted.org/packages/23/32/b997fd735d5f2ab51363a07c2d44054518fea7114e8df4f57fc147e3be34/optr-0.0.0a2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8b7650fd36a2298a2d1cfdbbb73c99fa5a46ac9b51db43d9c1b76dc96b878cc5",
                "md5": "ff4401e9d4ce51435dbb063cb52dd9ea",
                "sha256": "97965946c31570c5419aa4ef5a1567d6fece281a19bddbedc456a6c6d99c5968"
            },
            "downloads": -1,
            "filename": "optr-0.0.0a2.tar.gz",
            "has_sig": false,
            "md5_digest": "ff4401e9d4ce51435dbb063cb52dd9ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 33971,
            "upload_time": "2025-08-13T13:42:35",
            "upload_time_iso_8601": "2025-08-13T13:42:35.129538Z",
            "url": "https://files.pythonhosted.org/packages/8b/76/50fd36a2298a2d1cfdbbb73c99fa5a46ac9b51db43d9c1b76dc96b878cc5/optr-0.0.0a2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-13 13:42:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "codecflow",
    "github_project": "optr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "optr"
}
        
Elapsed time: 1.41213s