upryaga
For now it is personal research project with goal to understand and build recurrent self-improving harnesses.
Name derived from Упряж - means harness in ukraninan, russian and may be other slavic languages.
A reasoning harness framework for Anthropic Claude. Runs a Propose-Critique-Refine-Verify loop over reasoning problems, with Reflexion-style memory that accumulates failure experiences across runs.
Personal research project exploring recurrent self-improving harnesses — learning by building.
Install
pip install upryaga
Or for development:
git clone https://github.com/walnutgeek/upryaga.git
cd upryaga
uv sync --all-extras
Quick Start
import asyncio
from upryaga import Harness, Problem
from upryaga.reasoner import ClaudeReasoner
from upryaga.critic import ClaudeCritic
from upryaga.memory import ReflexionMemory
from upryaga.verifier import MathVerifier
harness = Harness(
reasoner=ClaudeReasoner(model="claude-sonnet-4-6"),
critic=ClaudeCritic(model="claude-haiku-4-5-20251001"),
memory=ReflexionMemory(path="./memory"),
verifier=MathVerifier(),
max_iterations=3,
)
solution = asyncio.run(harness.solve(Problem(question="What is 247 * 83?")))
print(solution.answer)
Benchmarking
Evaluate harness configurations against GSM8K or MATH:
from upryaga.benchmark.runner import BenchmarkRunner
runner = BenchmarkRunner(harness=harness, verifier=MathVerifier())
results = asyncio.run(runner.run("gsm8k", split="test", limit=50))
print(results.summary())
# Dataset: gsm8k
# Accuracy: 41/50 (82.0%)
# Avg iterations: 2.3
# Avg tokens/problem: 4,120
# Total cost: $1.47
Architecture
Problem in
|
v
Memory ----> retrieves similar past experiences
|
v
Reasoner --> generates solution (Claude API)
|
v
Critic ----> evaluates solution (Claude API)
|
|-- unsatisfactory --> loop back with feedback
|
+-- satisfactory ----> final answer
|
v
Verifier --> checks against ground truth
|
v
Memory <--- stores experience + reflection
All components are pluggable Python Protocols — swap any implementation without changing the rest.
Components
| Component | Default Implementation | Purpose |
|---|---|---|
| Reasoner | ClaudeReasoner |
Generates step-by-step solutions |
| Critic | ClaudeCritic |
Evaluates solution quality |
| Memory | ReflexionMemory |
TF-IDF episodic memory, failure-prioritized |
| Verifier | MathVerifier |
Deterministic answer comparison |
Development
make install # uv sync
make lint # ruff + basedpyright + codespell
make test # pytest
License
MIT
Release files for upryaga 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| upryaga-0.0.1.tar.gz | 217.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| upryaga-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 231.7 kB
Release files / upryaga-0.0.1.tar.gz
| Download URL | upryaga-0.0.1.tar.gz |
|---|---|
| Size | 217.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecd3173d79aaaf99969d2ee99616ae5158ad00e8a7222aa49bcfc59516a71a86
|
|
BLAKE2b-256 checksum How to use checksums |
e5f097fbcf93cd8a17a9a8ad4c460209c476f1eb86da3195053fb9e68a942403
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.13
|
Release files / upryaga-0.0.1-py3-none-any.whl
| Download URL | upryaga-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c98c0be81e275f6794ec771c548d6a779a4e7b21de536f02e217cf874d501624
|
|
BLAKE2b-256 checksum How to use checksums |
a4b98a2a8508ec9fbfe9b66048ad97a66e5e971c0a3c498c38aeb7d1bc19b041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.13
|