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.3.tar.gz (123.7 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.3-py3-none-any.whl (71.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peircean_abduction-1.2.3.tar.gz
  • Upload date:
  • Size: 123.7 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.3.tar.gz
Algorithm Hash digest
SHA256 9bb5b393afb157c92f0cd415ebab783ddc1fbbb51b3ba8abbc3dcf4ef7b2f251
MD5 c39a1a32dff247d53fff3d7a0efedf45
BLAKE2b-256 6743188778dc29612a2e36a22d33f80d41a13b00e5c71a7995bcc775921defb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for peircean_abduction-1.2.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for peircean_abduction-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 134d991570d274c8efb55e3d602e23248d98c347bba280aaf6b401c215c7c682
MD5 9c7e4f769ca23a10ecca731ef5f29efe
BLAKE2b-256 05d88686e2257cb66090c3befd7d3ce3d897fc7b9ec2807aec6abe951804f5ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for peircean_abduction-1.2.3-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