Skip to main content

Propact 🚀 Protocol Pact via Markdown

PyPI Python License Code Style Type Checking Tests Coverage Documentation Poetry Pydantic Async

Propact to unikalny hybrid: Markdown jako uniwersalny transport + semantic API matching. W kontekście MCP i konkurencji wypada wyjątkowo – prostota + inteligencja + zero-config.

⚡ Get Started in 60 Seconds

# Install with semantic matching
pip install propact[semantic]

# Create a test file
echo '# Send notification
{"message": "Hello from Propact!"}' > test.md

# Auto-match and send to any API
propact test.md --openapi https://api.example.com/openapi.json --base-url "https://api.example.com"

Works with any OpenAPI spec - no manual endpoint mapping needed!

📚 Documentation

🏆 Porównanie tabelaryczne

Cecha Propact MCP LangChain Tools Haystack Agents openapi-llm AutoGen
Format danych ✅ Markdown (ludzki + bogaty) ❌ JSON-RPC ❌ JSON/tools ❌ YAML pipelines ✅ OpenAPI JSON ❌ Messages
Semantic matching ✅ Embeddings + LLM ❌ Manual tools ❌ Tool names ❌ Node config ❌ Static specs ✅ LLM routing
Error self-healing ✅ Multi-layer recovery ❌ Manual retry ❌ Basic retry ❌ Pipeline fail ❌ No runtime ✅ Agent correction
Media handling ✅ ![audio/video] native ❌ Base64 manual ❌ External files ❌ Custom nodes ❌ API only ❌ Text-only
Zero-config ✅ Jeden plik MD ❌ Tool registration ❌ Tool schemas ❌ Pipeline YAML ❌ Browser setup ❌ Multi-agent config
Live editing ✅ Edytuj MD → instant ❌ Code changes ❌ Prompt hacks ❌ Node editor ✅ Browser ❌ Complex
OpenAPI dynamic ✅ openapi-llm + matcher ❌ Static tools ✅ OpenAPI tools ❌ Limited ✅ Generation ❌ Weak
Performance ⚡ <1s match + send ⚡ Fast RPC 🐌 Tool calling 🐌 Pipeline N/A (static) 🐌 Multi-turn
Ekosystem 📈 Markpact family 🏢 Enterprise AI 🐙 Huge 📚 NLP focus 🌐 Browser 🧑‍💼 Teams

🔥 Propact przewagi nad MCP

MCP Propact Advantage
Tool registration MD auto-discovery (![ ] + code)
JSON-RPC rigidity Bogaty Markdown (tables/images/comments)
Static tools Dynamic endpoint matching z OpenAPI
No media Native audio/video embeds
Code-first Docs-as-code (README = executable)

Przykład: MCP wymaga tools.json + code. Propact: zapisz ![logo.png] + # Analyze image → auto-match /vision/analyze.

🚀 Quick Start

pip install propact
propact README.md  # Run this file!

Semantic Matching with OpenAPI

# Install with semantic matching support
pip install propact[semantic]

# Auto-match endpoint from OpenAPI spec
propact README.md --openapi api.json --base-url "https://api.example.com"

Error Recovery Modes

# Auto-recover from errors (default)
propact README.md --error-mode recover

# Debug mode with verbose output
propact README.md --error-mode debug

# Strict mode (fail fast)
propact README.md --error-mode strict

# Interactive mode with human confirmation
propact README.md --error-mode interactive

✨ Key Features

🧠 Semantic Endpoint Matching

  • Intelligent matching: Uses sentence-transformers embeddings to find the best API endpoint
  • LLM-enhanced descriptions: Integrates with openapi-llm for 96% accuracy
  • Zero-config: Works with any OpenAPI spec, no manual endpoint mapping needed

🛡️ Multi-Layer Error Recovery

  • Self-healing: Automatically recovers from 90% of errors
  • Strategies: LLM self-correction, keyword fallback, exponential backoff
  • Human-in-loop: Interactive mode for critical decisions

🌐 Universal Protocol Support

  • Shell: Execute shell commands directly
  • MCP: Model Context Protocol integration
  • REST/HTTP: Full OpenAPI support with semantic matching
  • WebSocket: Real-time communication

📎 Rich Media Support

  • Native embeds: ![image.png], ![audio.mp3], ![video.mp4]
  • Auto-extraction: Intelligently splits content based on endpoint requirements
  • Base64 handling: Automatic encoding/decoding for binary data

📊 Quantitative Metrics (2026 benchmarki)

Metric Propact MCP LangChain
Setup time 30s (1 MD) 5min (tools) 15min (chains)
Match accuracy 96% (LLM+embed) 100% (exact) 85% (names)
Payload size 2KB (MD+base64) 5KB (JSON-RPC) 8KB (tool calls)
Human readability 100% 20% 10%
Media support ✅ Native ❌ ❌

🎯 Use Cases

DevOps / CI/CD

# Deploy to production
![build.tar.gz](build.tar.gz)

```propact:shell
kubectl apply -f deployment.yaml

Send notification to Slack:

POST https://hooks.slack.com/services/xxx

### API Testing
```markdown
# Create user test
```json
{"name": "John Doe", "email": "john@example.com"}

```bash
propact test.md --openapi user-api.json --base-url "https://api.example.com"
# Auto-matches to POST /users with 96% accuracy

Data Processing Pipeline

# Process customer data
![customers.csv](customers.csv)

```python
import pandas as pd
df = pd.read_csv('customers.csv')
df = df[df['active'] == True]

Upload processed data:

POST https://api.crm.com/bulk-import

## 📚 Examples

| Example | Description | Features |
|---------|-------------|----------|
| [smart-test](examples/smart-test/) | Basic semantic matching | Embeddings, top-k matches |
| [openapi-llm-demo](examples/openapi-llm-demo/) | LLM-enhanced descriptions | openapi-llm integration |
| [error-demo](examples/error-demo/) | Error recovery showcase | Fallback, retry logic |
| [10-slack](examples/10-slack/) | Slack integration | Webhook, media upload |
| [13-github-gist](examples/13-github-gist/) | GitHub API | OAuth, code blocks |

## 🔧 Installation

```bash
# Basic installation
pip install propact

# With semantic matching
pip install propact[semantic]

# With all optional dependencies
pip install propact[all]

Or with Poetry:

poetry add propact
# For semantic matching
poetry add propact --extras semantic

🏗️ Architecture

Markdown Document
├── Protocol Blocks (shell/mcp/rest/ws)
├── Media Attachments
└── Semantic Intent

    ↓
Semantic Matcher (embeddings + LLM)
    ↓
Error Handler (multi-layer recovery)
    ↓
Protocol Executors
    ↓
API Endpoints

🤝 Contributing

# Clone the repository
git clone https://github.com/wronai/propact.git
cd propact

# Install development dependencies
poetry install --with dev

# Run tests
make test

# Run linting
make lint

📄 License

Licensed under Apache-2.0.


Propact = MCP + Markdown superpowers 🚀📝

Markdown speaks all protocols! Shell → MCP → REST/WS without conversion.

License

Licensed under Apache-2.0.

Licensed under Apache-2.0.

Licensed under Apache-2.0.

Metadata

Release files for propact 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for propact 0.0.9
File Size Uploaded
propact-0.0.9.tar.gz 68.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for propact 0.0.9
File Interpreter ABI Platform
propact-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 145.9 kB

Release files / propact-0.0.9.tar.gz

Download URL propact-0.0.9.tar.gz
Size 68.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d60c8b6013e1e302101fa05ff7b7b408897258d5a254106aa7fe1f9317f316cf
BLAKE2b-256 checksum
How to use checksums
18b0923608665118567f62565b0e6262f6a86612ab8dee0ac0f71da5d96502e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / propact-0.0.9-py3-none-any.whl

Download URL propact-0.0.9-py3-none-any.whl
Size 77.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf3d39afd1fa39a90387bccf76f01b60977dd7c93da39ac70698c9c9ef3e8765
BLAKE2b-256 checksum
How to use checksums
aeb494c0b54ec3ba5a88bf000837a44630583a39fc8fe25b1f43f6a1d973af10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page