Metadata-Version: 2.4
Name: hugpy-engine
Version: 0.4.1
Summary: The engines of a host: install them, report what is there, start one on a model
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: hugpy-resources<0.2,>=0.1.17.29
Requires-Dist: hugpy-settings<0.2,>=0.1.18
Requires-Dist: abstract_essentials>=0.0.0.31
Provides-Extra: progressive
Requires-Dist: hugpy-resources[progressive]<0.2,>=0.1.19; extra == "progressive"

# hugpy-engine

The 0.4 series manages inference engines on a worker. It detects drivers and installed runtimes, describes the models and inputs each backend accepts, and prepares launch commands for Hugpy Wrapper.

## Installation

Install the worker edition in a Python 3.11 or later environment. Media and Oracle use the earlier Engine client library in a separate environment.

```sh
python -m pip install 'hugpy-engine>=0.4,<0.5'
```

## Quick start

Inspect the host before downloading any backend.

```sh
hugpy-engine engines
hugpy-engine drivers
hugpy-engine requirements
hugpy-engine install all --plan
```

Choose an engine name from the report. Run `hugpy-engine install ENGINE` to install it, then `hugpy-engine use ENGINE` to see its launch and request examples.

## Worker interface

`hugpy-engine inputs` reports the required and optional inputs for each task. `hugpy-engine ask ENGINE MODEL --say "Hello"` starts an engine on a compatible local model, sends a chat request and stops the process. `hugpy-engine calls` displays recent launch and call records.

`hugpy-engine sync` refreshes `export.sqlite3`. Discovery and Wrapper read backend declarations from the export. Wrapper uses `hugpy-engine request` for launch details and `hugpy-engine record` to return execution records. The Engine database retains the host’s settings, environment inventory and history.

## Compatibility with media services

For this release, the arms build uses `hugpy-engine 0.3.16.1`. That distribution provides Python client APIs such as `execute_prompt`. The worker build uses `0.4.0.21` and provides the `hugpy-engine` executable and export interface. Both builds have the same distribution name. Keep the worker and arms installations in separate virtual environments, and let Media or Oracle resolve the client requirement in the arms environment.

For an isolated check of the 0.3 arms environment, import the client there:

```python
from hugpy_engine import execute_prompt
```

A worker installation can be inspected separately with `hugpy-engine report --json`. This separation lets a media application submit work to the fleet without installing its inference backends in the application environment.
