Agent Output Quality Evaluation and Experience Tracking System
Project description
Meta-Harness
Agent Output Quality Evaluation and Experience Tracking System
Overview
Meta-Harness is an enterprise-grade Agent quality assurance system, based on the Stanford paper Meta-Harness: End-to-End Optimization of Model Harnesses.
Core Features
| Feature | Description |
|---|---|
| Auto Evaluation | Multi-dimensional scoring after each Agent output |
| Experience Storage | SQLite-based structured storage for all task executions |
| Smart Indexing | Auto-mark high/low score experiences |
| Statistics | Success rate, tool effectiveness analysis |
Evaluation Dimensions
| Dimension | Weight | Description |
|---|---|---|
| Correctness | 30% | Syntax, logic correctness |
| Completeness | 20% | Requirements coverage |
| Efficiency | 15% | Time/space complexity |
| Maintainability | 15% | Code structure |
| Security | 10% | No injection risks |
| Test Coverage | 10% | Has test cases |
Installation
# PyPI (recommended)
pip install meta-harness
# From source
pip install .
Quick Start
1. Evaluate Output
from meta_harness import quick_evaluate
# Evaluate Agent output
result = quick_evaluate("Implement user login", login_code)
print(f"Score: {result.overall_score}")
print(f"Dimensions: {result.scores}")
print(f"Feedback: {result.feedback}")
2. Record Experience
from meta_harness import ExperienceTracker
# Create tracker (auto-creates DB at ~/.meta_harness/)
tracker = ExperienceTracker()
# Record execution experience
record = tracker.record(
task="Implement user login",
output=login_code,
evaluation={"overall_score": 85},
tools_used=["code", "file_writer"],
success=True,
duration_seconds=30
)
print(f"Record ID: {record.id}")
3. Statistics
# Get overall statistics
stats = tracker.get_stats(days=30)
print(f"Total: {stats['total']}")
print(f"Success Rate: {stats['success_rate']}%")
print(f"Average Score: {stats['avg_score']}")
# Tool effectiveness analysis
tool_stats = tracker.analyze_tool_effectiveness()
for tool, stat in tool_stats.items():
print(f"{tool}: {stat['success_rate']} success rate")
Advanced Features
Batch Evaluation
from meta_harness import batch_evaluate
pairs = [
("Task 1", "Output 1"),
("Task 2", "Output 2"),
("Task 3", "Output 3"),
]
results = batch_evaluate(pairs)
for r in results:
print(f"{r.task}: {r.overall_score}")
Experience Search
# Search similar tasks
similar = tracker.search_similar("user auth", limit=5)
for r in similar:
print(f"- {r.task} (score: {r.evaluation.get('overall_score', 'N/A')})")
# Get low score records (need improvement)
low_score = tracker.get_low_score_records(threshold=60)
Data Export
# Export to JSON
tracker.export_json("backup.json", days=30)
# Archive old records
tracker.archive_old(days=90)
# Cleanup (keep only recent 1000)
tracker.cleanup(keep_recent=1000)
CoPaw Integration
For integration with CoPaw Agent framework, see INTEGRATION.md
Project Structure
meta-harness/
├── pyproject.toml
├── README.md # English (this file)
├── README_zh.md # 中文
├── LICENSE
├── CONTRIBUTING.md
├── CHANGELOG.md
├── src/
│ └── meta_harness/
│ ├── __init__.py
│ ├── evaluator/
│ └── tracker/
├── tests/
└── docs/
└── INTEGRATION.md
Dependencies
- Python >= 3.10
- SQLAlchemy >= 2.0
Optional:
memorycoreclaw- For memory system integration
License
Related Links
- MemoryCoreClaw - Human-like memory system
- CoPaw - Agent framework
⭐ If you find this useful, please star!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meta_harness-1.0.0.tar.gz.
File metadata
- Download URL: meta_harness-1.0.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3c0aaff0f90051a5ec1b50c0b534a2080237ac8bd05bdd4bbdfc93326abc392
|
|
| MD5 |
92679d961fb44f660b1818bc16ed85d5
|
|
| BLAKE2b-256 |
3442bd24d7313953a677c390e58607ef4d42ef890537ca008311bb25418887df
|
File details
Details for the file meta_harness-1.0.0-py3-none-any.whl.
File metadata
- Download URL: meta_harness-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab7faee961e3a6a5463dae3ed4bb9e7f126d0570428369594ffa316fa0f23b3c
|
|
| MD5 |
627ead1af669a1508b00867efbf611bf
|
|
| BLAKE2b-256 |
5317005dc741d89c1788f0c9c15adf836bfc7006d5b4408e8f8fe1cdbff27e19
|