Metadata-Version: 2.1
Name: pixeloffice-x402
Version: 1.0.3
Summary: Agent-Native x402 Micro-Payment Client & Scaffolder for PixelRouter on Solana
Home-page: https://pixeloffice.eu/router.html#x402
Author: Pixel Office EU
Author-email: karel@pixeloffice.eu
License: UNKNOWN
Description: # pixeloffice-x402
        
        Python client & 1-line wrapper for **Agent-Native x402 Micro-Payments on Solana**.
        
        Allow autonomous AI swarms (LangChain, CrewAI, AutoGPT, Claude Code) to pay per query directly from their Solana wallet with **0.24ms ed25519 cryptographic settlement** and zero credit card friction.
        
        ---
        
        ## 📦 Installation
        
        ```bash
        pip install pixeloffice-x402
        ```
        
        ---
        
        ---
        
        ## ⚡ Quickstart (Zero-Config with .env)
        
        Put your agent's Solana key into your `.env`:
        
        ```env
        # .env
        SOLANA_PRIVATE_KEY=5K2...your_phantom_or_solana_base58_private_key...
        ```
        
        Then in your Python code:
        
        ```python
        from pixeloffice_x402 import PixelRouterX402
        
        # Zero-config: Automatically picks up SOLANA_PRIVATE_KEY from .env / os.environ
        client = PixelRouterX402()
        
        # Autonomous LLM invocation with automatic 0.24ms Solana HTTP 402 micro-settlement
        response = client.chat_completion(
            model="blun-auto", # Or "deepseek-chat", "claude-3.5-sonnet", "ox-alpha"
            messages=[
                {"role": "user", "content": "Execute autonomous codebase refactor."}
            ]
        )
        
        print(response["choices"][0]["message"]["content"])
        ```
        
        ---
        
        ## 🔌 1-Line Drop-in for Official OpenAI SDK
        
        ```python
        from openai import OpenAI
        from pixeloffice_x402 import wrap_openai
        
        # Wrap standard OpenAI client
        client = wrap_openai(OpenAI(
            base_url="https://api.pixeloffice.eu/v1",
            api_key="x402"
        ), solana_private_key="YOUR_AGENT_SOLANA_KEYPAIR_BASE58")
        
        completion = client.chat.completions.create(
            model="blun-auto",
            messages=[{"role": "user", "content": "Hello autonomous agent world!"}]
        )
        ```
        
        ---
        
        ## 🧠 Stateful Memory Bridge Integration
        
        Pass `session_id` to retain cross-model state and eliminate up to 85% of redundant context tokens:
        
        ```python
        response = client.chat_completion(
            model="blun-auto",
            session_id="customer_support_thread_42",
            messages=[{"role": "user", "content": "Summarize previous conversation."}]
        )
        ```
        
        ---
        
        ## 🛡️ License
        
        MIT &copy; 2026 Pixel Office EU (https://pixeloffice.eu)
        
Keywords: ai,agents,x402,solana,usdc,pixelrouter,micropayments,langchain,crewai
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
