Multi-perspective reasoning harness for coding decisions.
Project description
midtry
Query multiple LLM CLIs in parallel and compare their responses.
pip install midtry
midtry "Explain the tradeoffs between REST and GraphQL"
What it does
MidTry spawns parallel calls to available AI CLIs (Claude, Gemini, Codex, etc.), each with a different reasoning perspective, and returns all responses for comparison.
$ midtry "Debug this function"
╭─────────────────────── Task ───────────────────────╮
│ Debug this function │
╰────────────────────────────────────────────────────╯
CLIs available: claude, gemini, codex, qwen
Mode: ORDERED
Timeout: 120s per call
claude (conservative): done (12.3s)
gemini (analytical): done (18.1s)
codex (creative): done (15.7s)
qwen (adversarial): done (22.4s)
=== RESPONSES ===
--- Response 1: Conservative (claude) ---
[methodical step-by-step analysis]
--- Response 2: Analytical (gemini) ---
[edge case focused breakdown]
--- Response 3: Creative (codex) ---
[alternative framing]
--- Response 4: Adversarial (qwen) ---
[challenges assumptions]
=== END RESPONSES ===
Install
pip install midtry
Requires at least one supported CLI installed:
| CLI | Install |
|---|---|
| claude | Claude Code |
| gemini | Gemini CLI |
| codex | OpenAI Codex |
| qwen | Qwen CLI |
| opencode | OpenCode |
| copilot | GitHub Copilot CLI |
Check what's available:
midtry detect
Usage
# Basic usage
midtry "Your question or task"
# Select specific models
midtry --models claude,gemini "Question"
# Quick mode (2 models only)
midtry --quick "Question"
# Random perspective assignment
midtry --random "Question"
# Demo mode (no API calls)
midtry demo
Python API
import midtry
result = midtry.solve("Optimize this SQL query", clis=["claude", "gemini"])
for r in result.results:
print(f"{r.cli} ({r.perspective.value}): {r.output[:100]}...")
Perspectives
Each CLI receives the task with a different framing:
| Perspective | Prompt style |
|---|---|
| Conservative | Careful, methodical, prioritizes correctness |
| Analytical | Systematic, considers edge cases |
| Creative | Alternative approaches, simpler reframings |
| Adversarial | Challenges obvious answers, looks for tricks |
Configuration
Create config.toml in your working directory:
[midtry]
timeout_seconds = 120
max_parallel = 4
mode = "random" # or "ordered"
[perspectives]
sources = ["claude", "gemini", "codex", "qwen"]
[perspectives.prompts]
conservative = "Solve carefully. Double-check each step. Task: {task}"
analytical = "Break down systematically. Consider edge cases. Task: {task}"
creative = "Consider unconventional approaches. Task: {task}"
adversarial = "Challenge the obvious answer. Task: {task}"
Or use environment variables:
MIDTRY_TIMEOUT=60 midtry "Question"
MIDTRY_CLIS="claude gemini" midtry "Question"
Limitations
- Requires external CLI tools installed and authenticated
- Latency scales with slowest model
- No automatic synthesis of responses (you aggregate manually)
- Quality depends on underlying models
When to use
- Complex problems where multiple viewpoints help
- Code review, debugging, architectural decisions
- When you want to see how different models approach a problem
- Building confidence through diverse perspectives
When not to use
- Simple factual questions
- Time-sensitive queries
- Problems with obvious single solutions
Background
MidTry applies ideas from DeepSeek-R1 (structured reasoning with verification) and mHC (multi-stream exploration) at inference time. The diversity comes from querying different models, not from training-time optimization.
License
MIT
Built with multi-agent consensus.
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 midtry-0.1.0.tar.gz.
File metadata
- Download URL: midtry-0.1.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51281b964af4623b4578f2668241b6904759e9772e254190807940515de6c17d
|
|
| MD5 |
6bbf389b74be29c58b843f6f23f03495
|
|
| BLAKE2b-256 |
9001f51b71822a433dcde0b68952e429822939712542197d1c5cb8710d363d10
|
Provenance
The following attestation bundles were made for midtry-0.1.0.tar.gz:
Publisher:
publish.yml on Hmbown/midtry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
midtry-0.1.0.tar.gz -
Subject digest:
51281b964af4623b4578f2668241b6904759e9772e254190807940515de6c17d - Sigstore transparency entry: 813342740
- Sigstore integration time:
-
Permalink:
Hmbown/midtry@3589bb8e7d2c430b255b97825b119fa19d54b474 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hmbown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3589bb8e7d2c430b255b97825b119fa19d54b474 -
Trigger Event:
release
-
Statement type:
File details
Details for the file midtry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: midtry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96606e5e063541d2dc42643bbd369b4e1fbf5a484735ef9a29a1189e643b1ac3
|
|
| MD5 |
eac9b46cfe0942be7c1ab12b28d4c894
|
|
| BLAKE2b-256 |
1885254afaf31410e38a21eacbc1c923714ec472fabec3e66bda7c5240e0f91a
|
Provenance
The following attestation bundles were made for midtry-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Hmbown/midtry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
midtry-0.1.0-py3-none-any.whl -
Subject digest:
96606e5e063541d2dc42643bbd369b4e1fbf5a484735ef9a29a1189e643b1ac3 - Sigstore transparency entry: 813342743
- Sigstore integration time:
-
Permalink:
Hmbown/midtry@3589bb8e7d2c430b255b97825b119fa19d54b474 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hmbown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3589bb8e7d2c430b255b97825b119fa19d54b474 -
Trigger Event:
release
-
Statement type: