geny-harness
Rust-core Python library — A drop-in replacement for geny-executor, providing the same 16-stage dual-abstraction agent pipeline architecture.
pip install geny-harness
geny-executor vs geny-harness: What's Different?
Both libraries provide identical Python APIs — the same classes, same methods, same import paths. You can switch between them by changing a single import. The difference is where the code runs.
Architecture Comparison
geny-executor (v0.3.0) geny-harness (v0.3.0)
┌─────────────────────────┐ ┌─────────────────────────┐
│ Python Application │ │ Python Application │
├─────────────────────────┤ ├─────────────────────────┤
│ Pipeline Orchestration │ Python │ Pipeline Orchestration │ Python
│ 16 Stage Execution │ │ 16 Stage Execution │
│ EventBus / Session │ │ EventBus / Session │
├─────────────────────────┤ ├─────────────────────────┤
│ PipelineState (40+fld) │ Python │ PipelineState (40+fld) │ Rust (PyO3)
│ TokenUsage / Metrics │ dataclass │ TokenUsage / Metrics │ Rust struct
│ PipelineConfig │ │ PipelineConfig │
│ PipelineResult │ │ PipelineResult │
│ PipelineEvent │ │ PipelineEvent │
│ Error Hierarchy │ │ Error Hierarchy │ Rust enum
├─────────────────────────┤ ├─────────────────────────┤
│ N/A │ │ Full Rust Core Engine │ 148 .rs files
│ │ │ (16 stages, 60+ strat.)│ Pure Rust
│ │ │ reqwest HTTP client │
│ │ │ tokio async runtime │
└─────────────────────────┘ └─────────────────────────┘
176 Python files 144 Rust + 34 Python files
deps: anthropic, pydantic, mcp deps: Rust (compiled), anthropic
What's Actually in Rust
The data layer is implemented in Rust and exposed to Python via PyO3:
| Type | Python (executor) | Rust (harness) |
|---|---|---|
PipelineState |
@dataclass (40+ fields) |
Rust struct → #[pyclass] |
TokenUsage |
@dataclass + __add__ |
Rust struct + Add trait |
PipelineConfig |
@dataclass |
Rust struct with apply_to_state() |
PipelineResult |
@dataclass + from_state() |
Rust struct + class methods |
PipelineEvent |
@dataclass |
Rust struct |
ErrorCategory |
str, Enum |
Rust enum + is_recoverable() |
StageDescription |
@dataclass |
Rust struct |
| Exceptions (6 types) | Python Exception subclasses |
Rust error hierarchy → PyO3 exceptions |
Additionally, geny-harness contains a complete Rust implementation of the entire pipeline engine (148 .rs files), including all 16 stages and 60+ strategy implementations. This Rust core is designed for:
- Future native execution — bypassing Python entirely for maximum throughput
- Embedding in Rust applications — use the pipeline engine directly from Rust/C/C++
- WebAssembly compilation — run the pipeline in browsers or edge environments
What's Still in Python (Same as executor)
The pipeline orchestration layer remains in Python for both libraries:
Pipelineclass (3-phase execution engine)EventBus(pub/sub with pattern matching)Session/SessionManagerPipelineBuilder/PipelinePresets- All 16 stage implementations (using
anthropicSDK for API calls)
This means the actual pipeline execution flow is identical. The Anthropic API calls, streaming, tool execution, and agent loops work exactly the same way.
Performance Characteristics
| Operation | executor (Python) | harness (Rust+PyO3) | Notes |
|---|---|---|---|
| State creation | ~195ms/100K | ~96ms/100K | Rust 2x faster — 40+ field struct init |
| Field access | ~46ms/500K | ~393ms/500K | Python faster — PyO3 boundary cost |
| Token arithmetic | ~189ms/500K | ~234ms/500K | Similar — PyO3 overhead offsets Rust speed |
| Result.from_state | ~88ms/100K | ~90ms/100K | Identical |
Key insight: For the current Python-orchestrated usage pattern, there is no significant performance difference. The real performance advantage of geny-harness will emerge when:
- The Rust pipeline engine is used natively (without Python)
- Multiple pipelines run concurrently via tokio
- State serialization/deserialization is done in Rust (JSON, MessagePack)
When to Use Which
| Scenario | Recommendation |
|---|---|
| Standard Python project | geny-executor — simpler, pure Python, easier to debug |
| Want Rust core for future native use | geny-harness — invest in Rust ecosystem now |
| Embedding in Rust application | geny-harness — use geny-harness-core crate directly |
| Need to modify stage internals | geny-executor — all Python, easy to fork/modify |
| Production with high concurrency | geny-harness — Rust core ready for tokio-based scaling |
| Learning/prototyping | geny-executor — more straightforward |
Quick Start
# Identical to geny-executor — just change the import
from geny_harness import PipelinePresets
pipeline = PipelinePresets.agent(
api_key="sk-ant-...",
model="claude-sonnet-4-20250514",
system_prompt="You are a helpful assistant.",
)
result = await pipeline.run("Hello!")
print(result.text)
Drop-in Replacement
# Before (geny-executor)
from geny_executor import Pipeline, PipelineConfig, PipelinePresets
from geny_executor.session.manager import SessionManager
# After (geny-harness) — just change the package name
from geny_harness import Pipeline, PipelineConfig, PipelinePresets
from geny_harness.session.manager import SessionManager
Project Structure
geny-harness/
├── crates/
│ ├── geny-harness-core/ # Pure Rust library (148 .rs files)
│ │ └── src/
│ │ ├── core/ # Pipeline, State, Config, Errors, Builder
│ │ ├── events/ # EventBus, PipelineEvent
│ │ ├── session/ # Session, Manager, Freshness
│ │ ├── tools/ # Tool, Registry, MCP
│ │ └── stages/ # 16 stages × (interface + types + artifact)
│ └── geny-harness-py/ # PyO3 bindings (cdylib)
├── python/
│ └── geny_harness/ # Python package
│ ├── core/ # Pipeline, Builder, Presets, Stage
│ ├── events/ # EventBus
│ ├── session/ # Session, Manager
│ ├── stages/ # 16 stage implementations
│ └── tools/ # Tool, Registry
└── tests/
Supported Platforms
- Python: 3.10 — 3.14
- OS: Linux (x86_64), Windows (x64), macOS (arm64)
- Rust: 2021 edition (for building from source)
License
MIT
Metadata
Release files for geny-harness 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geny_harness-0.5.3.tar.gz | 18.2 MB | With provenance | Details for geny_harness-0.5.3.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geny_harness-0.5.3-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for geny_harness-0.5.3-cp312-cp312-win_amd64.whl |
| geny_harness-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details for geny_harness-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| geny_harness-0.5.3-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for geny_harness-0.5.3-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 81.6 MB
Release files / geny_harness-0.5.3.tar.gz
| Download URL | geny_harness-0.5.3.tar.gz |
|---|---|
| Size | 18.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77500210d64abdd27a1681f3a02f9aa59cfc84bdff54a199c45810185cc2c2e2
|
|
BLAKE2b-256 checksum How to use checksums |
9de6f720a17586a5b9dd40ae763dac2bf2ea422733c51942298661977a413cc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logRelease files / geny_harness-0.5.3-cp312-cp312-win_amd64.whl
| Download URL | geny_harness-0.5.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 20.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
913c88ee35a9f1bc8158f2c508ae8a84db2764d7c4160dae394b3f201b20bbbf
|
|
BLAKE2b-256 checksum How to use checksums |
f2a32de95e63929b06a5a6a9a8eb6c10f75ae80c36d083c6ac2229d781faeab4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logRelease files / geny_harness-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | geny_harness-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 21.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c462acad88e3ac3b33bc144227be67f6e4d96241d431b72087bc2b96faa39877
|
|
BLAKE2b-256 checksum How to use checksums |
93dd8e3291673db1e1e851ca3b08fecb99e47c8d30e714bc2d0e56e3905e27ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logRelease files / geny_harness-0.5.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | geny_harness-0.5.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 21.1 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a5835e4565ba7c9c6a08ca3401ee8f3652649f7b4b63d679c3edaeef589aacc3
|
|
BLAKE2b-256 checksum How to use checksums |
9c0103d932ada3510fedfbac5e5d2cb7cc0eed32c2d8409a3d5812750cd81111
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logSecurity for geny-harness 0.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for geny_harness-0.5.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.