Skip to main content

A Logic Harness for abductive inference. Anomaly in → Hypothesis out.

Project description

Peircean Abduction

A Logic Harness for Abductive Inference.

"Abduction is the process of forming an explanatory hypothesis. It is the only logical operation which introduces any new idea." — Charles Sanders Peirce

Peircean Abduction is a Model Context Protocol (MCP) server that gives LLMs the ability to perform rigorous abductive reasoning. It forces models to generate multiple competing hypotheses for an observation and evaluate them using Inference to the Best Explanation (IBE).

✨ Features

  • MCP-First Design: Built to be used directly within Claude Desktop, Cursor, or any MCP-compliant client.
  • Provider Agnostic: Works with Anthropic, OpenAI, Gemini, and Ollama.
  • No API Key Required (Default): By default, it generates prompts for you to run. You only need an API key if you want the tool to execute the reasoning loop autonomously.
  • Council of Critics: Simulates a debate between a Logician, Empiricist, and Scientist to refine hypotheses.

🚀 Quick Start

1. Install

pip install peircean-abduction

2. Connect to Claude Desktop

Run the installer to automatically configure Claude Desktop:

peircean --install

3. Use it!

Open Claude and ask:

"Use the peircean_observe_anomaly tool to analyze why my server latency spiked but CPU usage is flat."

🛠️ Configuration

You can configure the provider and other settings via the interactive wizard:

peircean config wizard

Or by setting environment variables in a .env file:

# Provider Selection
PEIRCEAN_PROVIDER=anthropic  # anthropic, openai, gemini, ollama
PEIRCEAN_MODEL=claude-3-5-sonnet-20241022

# API Keys (Only needed for interactive/autonomous mode)
ANTHROPIC_API_KEY=sk-...
OPENAI_API_KEY=sk-...

# Feature Toggles
PEIRCEAN_ENABLE_COUNCIL=true
PEIRCEAN_INTERACTIVE_MODE=false # Set to true to let the tool call the LLM directly

📦 Supported Models

  • Anthropic: Claude 3.5 Sonnet (Recommended), Claude 3 Opus, Claude 3 Haiku
  • OpenAI: GPT-4o, GPT-4 Turbo
  • Gemini: Gemini 1.5 Pro
  • Ollama: Llama 3, Mistral

📚 Documentation

📄 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peircean_abduction-1.2.2.tar.gz (123.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peircean_abduction-1.2.2-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

File details

Details for the file peircean_abduction-1.2.2.tar.gz.

File metadata

  • Download URL: peircean_abduction-1.2.2.tar.gz
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for peircean_abduction-1.2.2.tar.gz
Algorithm Hash digest
SHA256 0a690c2c66a2fb857d6b00632035b5c25eb1f2407aa52d144a2221612e627222
MD5 3bf3536b40adeb6246e0bc1ef9fc0b7d
BLAKE2b-256 6a73e9161b5923f9e1f272519b29506137d5a865fc19058729b241cdab0fa1b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for peircean_abduction-1.2.2.tar.gz:

Publisher: publish.yml on Hmbown/peircean-abduction

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file peircean_abduction-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for peircean_abduction-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d277b646fd049457b0c17daba1d439e8b933927f0d0a00794b5817f8fb1b0b8
MD5 81b1fe4821f6dd0ad5a2baa43e89f29e
BLAKE2b-256 079ea5e09790fa54035852548c7d4302b55ef87dc8b6859dca81394748b57b75

See more details on using hashes here.

Provenance

The following attestation bundles were made for peircean_abduction-1.2.2-py3-none-any.whl:

Publisher: publish.yml on Hmbown/peircean-abduction

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page