Skip to main content

IntelliComm Protocol (ICP)

A powerful Python framework for intelligent communication protocol with x402 payment integration.

✨ Features

  • 🤖 Agent-based architecture - Register and execute intelligent agents
  • 💰 x402 Payment Protocol - Monetize your agents with crypto payments
  • 🔌 Dual Protocol Support - Socket-based (legacy) and HTTP (with payments)
  • 🎨 Beautiful Console Output - Rich terminal UI with colors and panels
  • 🔒 Secure Payments - Blockchain-based payments via Ethereum/Base/Solana
  • ⚙️ Per-Agent Configuration - Configure payments for individual agents
  • 🚀 Easy to Use - Simple decorators and intuitive API

🆕 What's New: x402 Payment Integration

IntelliComm Protocol now supports x402 payment protocol, allowing you to:

  • ✅ Require payment for specific agents (per-agent pricing)
  • ✅ Accept crypto payments on multiple networks (Base, Ethereum, Solana)
  • ✅ Automatic payment handling on the client side
  • ✅ Test with testnet and deploy to mainnet
  • ✅ Beautiful console output showing payment status

📁 Project Structure

IntelliComm-Protocol-ICP/
├── intellicomm/                 # Core Python framework package
│   ├── __init__.py              # Package exports
│   ├── models.py                # Data models (Request, Response)
│   ├── server.py                # Socket-based server (legacy)
│   ├── client.py                # Socket-based client (legacy)
│   ├── http_server.py           # HTTP server with x402 payments ⭐ NEW
│   ├── http_client.py           # HTTP client with x402 payments ⭐ NEW
│   ├── payments.py              # Payment configuration & utilities ⭐ NEW
│   ├── agent.py                 # Agent implementations
│   └── utils.py                 # Helper functions
├── tests/                       # Example & test files
│   ├── run_server.py            # Socket-based server example
│   ├── run_client.py            # Socket-based client example
│   ├── run_http_server.py       # HTTP server with payments example ⭐ NEW
│   └── run_http_client.py       # HTTP client with payments example ⭐ NEW
├── env.example                  # Environment configuration template ⭐ NEW
├── PAYMENT_GUIDE.md            # Complete payment integration guide ⭐ NEW
├── requirements.txt             # Python dependencies
└── README.md                    # This file

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/yourusername/IntelliComm-Protocol-ICP.git
cd IntelliComm-Protocol-ICP

# Install dependencies
pip install -r requirements.txt

# Configure environment (for payment features)
cp env.example .env
# Edit .env with your wallet details

Basic Usage (Socket-based - No Payments)

Server:

from intellicomm import Server

server = Server(host='localhost', port=5555)

@server.agent()
def greet(params):
    """Simple greeting agent"""
    name = params.get("name", "Guest")
    return {"greeting": f"Hello, {name}!"}

server.start()

Client:

from intellicomm import Client

client = Client(host='localhost', port=5555)
response = client.execute_agent("greet", {"name": "Alice"})
print(response.result)

HTTP with Payments (x402)

Server:

from intellicomm import HttpServer

server = HttpServer(host='0.0.0.0', port=8000)

@server.agent()  # Free agent
def free_service(params):
    """Free service - no payment required"""
    return {"data": "free content"}

@server.agent(payment_required=True, price="$0.001")  # Paid agent
def premium_service(params):
    """Premium service - requires $0.001 payment"""
    return {"data": "premium content"}

server.start()

Client:

from intellicomm import HttpClient
import asyncio

async def main():
    client = HttpClient(base_url="http://localhost:8000")
    
    # Call free service
    response = await client.execute_agent("free_service", {})
    print(response.result)
    
    # Call paid service (payment handled automatically!)
    response = await client.execute_agent("premium_service", {})
    print(response.result)

asyncio.run(main())

💰 Payment Configuration

Environment Setup

Create a .env file (copy from env.example):

# Client wallet (for making payments)
WALLET_PRIVATE_KEY=0x1234567890abcdef...

# Server address (for receiving payments)
PAYMENT_ADDRESS=0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7

# Network (testnet for development)
NETWORK=base-sepolia

# Facilitator (optional, uses default)
FACILITATOR_URL=https://x402.org/facilitator

Getting Test Funds

For Base Sepolia testnet:

  1. Visit Base Sepolia Faucet
  2. Enter your wallet address
  3. Receive test ETH

📚 Documentation

  • PAYMENT_GUIDE.md - Complete guide to x402 payment integration
  • env.example - Environment configuration template
  • API Docs - Auto-generated at http://localhost:8000/docs when server runs

🧪 Examples

Run the example server with payments:

python tests/run_http_server.py

In another terminal, run the client:

python tests/run_http_client.py

🔑 Key Features

Per-Agent Payment Configuration

Configure payment requirements for each agent individually:

@server.agent()  # Free
def free_agent(params):
    return {"data": "free"}

@server.agent(payment_required=True, price="$0.001")  # Costs $0.001
def cheap_agent(params):
    return {"data": "cheap"}

@server.agent(payment_required=True, price="$0.010")  # Costs $0.010
def premium_agent(params):
    return {"data": "premium"}

Automatic Payment Handling

Clients automatically handle payment flows - no manual transaction code needed:

# Just call the agent - payment is automatic!
response = await client.execute_agent("premium_agent", {})

Multiple Networks Supported

  • base-sepolia (testnet) - Recommended for development
  • base-mainnet (production)
  • ethereum-sepolia / ethereum-mainnet
  • solana-devnet / solana-mainnet

🛠️ Development

Project Status

✅ Core framework complete
✅ Socket-based communication
✅ HTTP layer with FastAPI
✅ x402 payment integration
✅ Beautiful console output
🔄 Documentation in progress

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

MIT License - See LICENSE file for details

🤝 Support

🌟 Acknowledgments


Made with ❤️ by Ahsen Tahir

Metadata

Release files for intellicomm 0.0.2

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

Source distribution (sdist)

Source distribution for intellicomm 0.0.2
File Size Uploaded Provenance
intellicomm-0.0.2.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 33.9 kB

Release files / intellicomm-0.0.2.tar.gz

Download URL intellicomm-0.0.2.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
38205bdfc7426c857bb76e975d0a7752fa7c3e06aaaa1fd56344c805287505c6
BLAKE2b-256 checksum
How to use checksums
878e7009cfdede52e4bef7e87324ddb7625332491ece38a76b513f88aa39c3a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / intellicomm-0.0.2-py3-none-any.whl

Download URL intellicomm-0.0.2-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c2336698c70ce1f2df338bb5d4d18cd71d1c65d5fd8f10c5ba095ebc2c49e16
BLAKE2b-256 checksum
How to use checksums
d58583efc2379e09f50948196a628d0f142a8d2dcb6462ff166cf38f036bc155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for intellicomm 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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