Skip to main content

Protocol Pact: Universal Markdown for Shell/MCP/REST/WS

Project description

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.

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

propact-0.0.7.tar.gz (67.6 kB view details)

Uploaded Source

Built Distribution

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

propact-0.0.7-py3-none-any.whl (76.3 kB view details)

Uploaded Python 3

File details

Details for the file propact-0.0.7.tar.gz.

File metadata

  • Download URL: propact-0.0.7.tar.gz
  • Upload date:
  • Size: 67.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for propact-0.0.7.tar.gz
Algorithm Hash digest
SHA256 7164efbdc7a5df5f3ba15f6cd2382536ad7aea40674d6bf8bad358efc69353cf
MD5 4ba6b45c9a517ac777db861d85176f60
BLAKE2b-256 4934d004231343ae7051d08f7b21169de7aa0736174da0f8e2592375331f3066

See more details on using hashes here.

File details

Details for the file propact-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: propact-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for propact-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2a3b9cd55d404d5bbbb31506f049fa5b13fca69b55f491ebf893e099d2816322
MD5 033d8eba88d681f6e48076ac43fab6f4
BLAKE2b-256 f2a01f01b72e38c04e3086fda67318bda921a9874d9688b76491e460c275808a

See more details on using hashes here.

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