Metadata-Version: 2.4
Name: coreason_assay
Version: 0.3.1
Summary: Quality Control (QC) laboratory of the CoReason platform
License: # The Prosperity Public License 3.0.0
         
         Contributor: CoReason, Inc.
         
         Source Code: https://github.com/CoReason-AI/coreason_assay
         
         ## Purpose
         
         This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
         
         ## Agreement
         
         In order to receive this license, you have to agree to its rules.  Those rules are both obligations under that agreement and conditions to your license.  Don't do anything with this software that triggers a rule you can't or won't follow.
         
         ## Notices
         
         Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
         
         ## Commercial Trial
         
         Limit your use of this software for commercial purposes to a thirty-day trial period.  If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
         
         ## Contributions Back
         
         Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
         
         ## Personal Uses
         
         Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
         
         ## Noncommercial Organizations
         
         Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
         
         ## Defense
         
         Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
         
         ## Copyright
         
         The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
         
         ## Patent
         
         The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
         
         ## Reliability
         
         The contributor can't revoke this license.
         
         ## Excuse
         
         You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
         
         ## No Liability
         
         ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
License-File: LICENSE
License-File: NOTICE
Author: Gowtham A Rao
Author-email: gowtham.rao@coreason.ai
Requires-Python: >=3.11
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Dist: anyio (>=4.12.1,<5.0.0)
Requires-Dist: coreason-identity
Requires-Dist: fastapi
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: jsonschema (>=4.26.0,<5.0.0)
Requires-Dist: pydantic (>=2.12.5,<3.0.0)
Requires-Dist: pydantic-settings (>=2.12.0,<3.0.0)
Requires-Dist: python-multipart
Requires-Dist: typer (>=0.21.1,<0.22.0)
Requires-Dist: uvicorn
Project-URL: Documentation, https://github.com/CoReason-AI/coreason-assay
Project-URL: Homepage, https://github.com/CoReason-AI/coreason-assay
Project-URL: Repository, https://github.com/CoReason-AI/coreason-assay
Description-Content-Type: text/markdown

# coreason-assay

**The Scientific Testing Engine for AI Agents.**

[![CI/CD](https://github.com/CoReason-AI/coreason-assay/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/CoReason-AI/coreason-assay/actions/workflows/ci-cd.yml)
[![Docker](https://github.com/CoReason-AI/coreason-assay/actions/workflows/docker.yml/badge.svg)](https://github.com/CoReason-AI/coreason-assay/actions/workflows/docker.yml)
[![codecov](https://codecov.io/gh/CoReason-AI/coreason-assay/graph/badge.svg)](https://codecov.io/gh/CoReason-AI/coreason-assay)
[![PyPI version](https://badge.fury.io/py/coreason_assay.svg)](https://badge.fury.io/py/coreason_assay)
[![Python versions](https://img.shields.io/pypi/pyversions/coreason_assay.svg)](https://pypi.org/project/coreason_assay/)
[![License](https://img.shields.io/badge/license-Prosperity--3.0-blue)](LICENSE)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)

`coreason-assay` is the Quality Control (QC) laboratory of the CoReason platform. It provides a rigorous framework for evaluating the performance, safety, and alignment of AI agents before they are deployed to production.

## Features

-   **Benchmark Evaluation Corpus (BEC) Management**: Easily ingest test cases from CSV, JSONL, or ZIP archives.
-   **Simulation**: Run agents in a controlled sandbox with mocked tools and injected context.
-   **Glass Box Grading**: Evaluate not just the answer, but the reasoning process (Faithfulness, Alignment, Tone).
-   **Report Cards**: Generate detailed reports with drift detection and pass/fail metrics.

## Quick Start

### Installation

```sh
poetry install
```

### Usage

Run the CLI to upload a test corpus:

```sh
poetry run coreason-assay upload path/to/bec_archive.zip
```

### Server Mode (Service C)

`coreason-assay` can also be run as a containerized microservice exposing a REST API.

```sh
# Start the server (requires Docker)
docker build -t coreason-assay:0.3.0 .
docker run -p 8000:8000 coreason-assay:0.3.0
```

The service exposes endpoints for uploading corpora (`POST /upload`) and running assays (`POST /run`). See `docs/usage.md` for details.

### Documentation

For full documentation, including architecture details, usage guides, and examples, please visit the [docs](docs/) folder.

-   [Architecture](docs/architecture.md)
-   [Usage Guide](docs/usage.md)
-   [Vignette](docs/vignette.md)
-   [Product Requirements](docs/prd.md)

## License

This software is proprietary and dual-licensed. See `LICENSE` for details.

