Metadata-Version: 2.5
Name: thinkerwave-metis
Version: 0.1.3
Summary: Metis by ThinkerWave: measure, improve and prove the instructions your AI agent runs on.
Project-URL: Homepage, https://thinkmetis.io
Project-URL: Documentation, https://thinkmetis.io/docs
Project-URL: Source, https://github.com/thinkerwave-ai/thinkerwave
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=2.3
Requires-Dist: pydantic>=2.6
Requires-Dist: pyyaml>=6
Provides-Extra: bedrock
Requires-Dist: boto3>=1.34; extra == 'bedrock'
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: mcp
Description-Content-Type: text/markdown

# Metis by ThinkerWave

**Fewer wrong answers from a cheap model's agent, from a few dozen labelled cases.**

Measure it, improve its instruction, and prove the change on cases it never saw. Escalate, don't guess.

Metis measures how reliable your AI agent is on your own labelled cases, improves its instructions,
and proves the improvement on cases it never trained on. Measuring is free and runs on your machine,
with no account. It works for any agent whose answers you can check: triage, root-cause analysis,
classification, extraction, contract review, routing, compliance checks.

From the Metis paper (Dec 2026): on network fault diagnosis, Claude Haiku with a Metis instruction rose
from 119 to 260 net on held-out cases and its wrong answers fell from 80 to 27; its net was not
significantly different from Claude Opus 5.5 at about 1/13 of the cost per case (escalations unpriced).
It improved two of the five tasks tested. Paper and data: https://thinkmetis.io/paper/ and
https://github.com/thinkerwave-ai/metis-eval
See [`examples/`](https://github.com/thinkerwave-ai/thinkerwave/tree/main/metis/examples) for the numbers and how to rerun the tasks yourself.

## Install

```bash
pip install thinkerwave-metis        # the `metis` command
pipx run --spec thinkerwave-metis metis --version
```

Python 3.10 or newer. Package `thinkerwave-metis`, import `metis`, command `metis`, MCP server `metis-mcp`.

## Try it

```bash
metis init                 # writes metis/agent.yaml, instruction.md, cases.jsonl
# 1. metis/agent.yaml: replace `task: TODO` with what your agent decides, and pick your model
# 2. metis/instruction.md: write the instruction your agent runs on
# 3. metis/cases.jsonl: add labelled cases, one per line, e.g.
#    {"id": "t-001", "input": "Customer cannot log in.", "expected": "high"}
export ANTHROPIC_API_KEY=...
metis check                # a reliability card: right, wrong, escalated, consistency, cost
```

Full walk-through: [docs/quickstart.md](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/quickstart.md).

From Claude Code, Metis runs as a local MCP server:

```bash
claude mcp add metis -- uvx --from thinkerwave-metis metis-mcp
```

## What it does

| Command | What | Needs |
|---|---|---|
| `metis check` | Runs your cases several times each and writes a card | your model key |
| `metis compare` | Two instructions or two models on the same cases; `--ci` gates a pull request | your model key |
| `metis cases` | Builds an answer key from your logs, with a local labelling page | nothing |
| `metis optimise` | Rewrites the instruction, then proves it on held-out cases | a Metis API key |
| `metis accept` | Shows the diff and makes the new instruction yours | nothing |

Your model calls go to your own provider with your own key. Only `metis optimise` talks to ThinkerWave,
and it shows you what it will send before the first call.

## Your agent, not just a prompt

If your agent is a LangChain graph, an OpenAI Agents SDK app or a service in any language, point
`agent.yaml` at it and Metis tests the real thing: [docs/endpoint-mode.md](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/endpoint-mode.md).

## Docs

- [Quickstart](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/quickstart.md)
- [Endpoint mode: bring your own agent](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/endpoint-mode.md)
- [Why "same answer" is not "sure answer": what Metis promises](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/deterministic-vs-consistent.md)
- [Security and privacy](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/security.md)
- [Pricing](https://github.com/thinkerwave-ai/thinkerwave/blob/main/metis/docs/pricing.md)
- [Examples: TeleLogs and ContractNLI](https://github.com/thinkerwave-ai/thinkerwave/tree/main/metis/examples)

Cards from your own runs say "self-reported": measured by you, on your own cases.

Apache-2.0. Source: https://github.com/thinkerwave-ai/thinkerwave
