Metadata-Version: 2.4
Name: mechaharness
Version: 0.18.0
Summary: Agentic harness that abstracts inference backends and model-family harness architectures
Author-email: Richard Lee <rlee@tokyo3.com>
License: MIT
Project-URL: Homepage, https://rl337.org/mechaharness/
Project-URL: Documentation, https://rl337.org/mechaharness/
Project-URL: Repository, https://github.com/rl337/mechaharness
Project-URL: Issues, https://github.com/rl337/mechaharness/issues
Project-URL: Changelog, https://rl337.org/mechaharness/changelog.html
Keywords: agent,llm,harness,inference,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyiv>=1.1.1
Requires-Dist: pydantic>=2.7
Requires-Dist: pydantic-settings>=2.3
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13.7
Requires-Dist: fastapi>=0.111
Requires-Dist: uvicorn[standard]>=0.30
Requires-Dist: eval_type_backport>=0.2
Provides-Extra: dev
Requires-Dist: pytest>=8.2; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: PyYAML>=6.0; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Requires-Dist: mypy==1.19.1; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
Dynamic: license-file

# MechaHarness

![MechaHarness](docs/logo.png)

A Python agent harness for local and cloud models, with tool grants, cost
accounting, event logs, and resumable execution graphs. Provider I/O and agent
loop policy are separate, configurable components.

## Install and try it

Requires Python 3.9+.

```bash
pip install mechaharness
mechaharness run "Hello" --backend mock --family pass_through --model mock
```

The mock backend needs no API key or GPU. For real inference, see
[installation](docs/guides/install.md) and
[OpenAI or local models](docs/guides/openai-local.md).

```python
import asyncio
from mechaharness import RunRequest, run

async def main():
    result = await run(RunRequest(
        prompt="Hello", backend="mock", family="pass_through", model="mock"
    ))
    print(result.final_text)

asyncio.run(main())
```

## Integrate with a host

- [Dependency injection](docs/guides/dependency-injection.md): bind provider,
  harness, grants, tools, and policies through `MechaHarnessConfig`.
- [Durable graph generators](docs/reference/durable-graph-generators.md): start,
  pause, resume, and inspect long-running work.
- [Agentic Recipes](docs/reference/graph-templates.md): reusable control graphs.
- [Host-agent skills](agent-skills/): integration instructions for downstream
  coding agents.
- [CLI](docs/reference/cli.md) and [HTTP API](docs/reference/api.md).

Full documentation: [rl337.org/mechaharness](https://rl337.org/mechaharness/).
Executable acceptance walks: [user stories](docs/guides/user-stories.md).

## Develop

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev,docs]'
MECHA_STORY_BACKEND=static ./run_checks.sh
```

See [story authoring](docs/guides/authoring-user-stories.md) and
[release preparation](docs/guides/release-preparation.md). Operator credentials
belong in the environment or ignored local files; `.env.example` is a template.
