Connekt Studio.

The technical infrastructure for building on the African internet. Connekt Studio provides the protocol (RACP), the optimization (CompRes), and the Marketplace APIs that let third-party teams run stores, catalogs, carts, orders, and payments from their own frontend or backend while Connekt stays the system of record.

CompRes™ Optimization API

CompRes is a high-efficiency media and document compression service. It drastically reduces file sizes (up to 99% for documents) by returning highly compressed "DNA" payloads that are reconstructed dynamically on the client side using the CompRes Universal Viewer.

Compression Benchmarks

  • PDF/DOCX Savings ~95.4%
  • Audio Savings ~98.1%
  • Example 197KB from 17MB File

CompRes™ Integration

Integrate CompRes directly into your frontend using the Javascript SDK. The SDK handles file compression, DNA resolution, and client-side reconstruction.

1. SDK Injection

Include the SDK and Universal Viewer scripts in your application's HTML head.

<!-- CompRes SDK Client -->
<script src="https://connekt.social/static/sdk/compres-service/compres-sdk-v1.js"></script>
<!-- CompRes Universal Viewer (For rendering documents and media) -->
<script src="https://connekt.social/static/sdk/compres-service/compres-viewer-v1.js"></script>
<link rel="stylesheet" href="https://connekt.social/static/sdk/compres-service/compres-viewer-v1.css">

2. Secure Initialization

Instantiate the SDK using your Public API Key. Because CompRes uses strict security, you must generate an HMAC-SHA256 signature using your Backend Secret Key. Never expose your Secret Key to the frontend.

const sdk = new CompResSDK("YOUR_PUBLIC_API_KEY");

// Handshake data must be signed by your backend
const timestamp = 1712560000; 
const signature = "HMAC_SHA256(payload, 'YOUR_BACKEND_SECRET_KEY')"; 

await sdk.initialize(signature, timestamp);
console.log("CompRes SDK Initialized:", sdk.isInitialized);

3. Optimization & Resolution

Compress a file to get a DNA token, then resolve it later to render in the DOM.

// 1. Compress a file (e.g. from an file input)
const { token, metrics, compressedData } = await sdk.optimize(file);
console.log(`Saved ${metrics.savings}%! Token: ${token}`);

// ... Later ...

// 2. Fetch and render a stored DNA token into a DOM container
const result = await sdk.resolveDNA(token);
await sdk.mountViewer('my-container-id', result);

4. Legacy & Direct Binary

For legacy applications or non-standard integrations, the SDK also returns the raw compressedData blob which you can process directly without the Universal Viewer.

Rate Limits & Tiers

CompRes API usage is tiered based on your developer plan. Limits are enforced via Redis sliding windows.

Hacker (Free)
  • 50 Sessions / day
  • 200 Media Optimizations / day
  • 60 Heartbeats / min
Developer ($5.00/mo)
  • 500 Sessions / day
  • 2,000 Media Optimizations / day
  • 200 Heartbeats / min
Pro / Scale ($15.00/mo)
  • 5,000 Sessions / day
  • 10,000 Media Optimizations / day
  • 600 Heartbeats / min

Looking for Enterprise pricing? View full pricing details here.

Quick Start

01.

Create your identity in the Developer Dashboard to receive your **Agent ID** and **Secret Key**.

02.

Install the official Python SDK v1.2.4 (Modular Full Library).

pip install https://dev.connekt.social/sdk/download
03.

Example file structure for your Connekt Node:

my_connekt_node/
├── venv/                 # Python virtual environment
├── .env                  # Secret keys and environment variables
├── agent.py              # Main logic using from connekt import ConnektAgent
└── requirements.txt      # Deployment dependencies

SDK: Sync Agent

from connekt import ConnektAgent
from flask import Flask, request

app = Flask(__name__)

# Hardened with connection pooling, retries, and RACP signing
agent = ConnektAgent(
    agent_id="YOUR_AGENT_ID", 
    secret_key="YOUR_SECRET_KEY"
)

@app.route('/connekt/racp', methods=['POST'])
def handle_connekt_events():
    payload = request.get_data(as_text=True)
    signature = request.headers.get('X-Connekt-Signature')

    # 1. Verify the platform signature
    if not agent.verify_signature(payload, signature):
        return "Unauthorized", 401

    data = request.json
    event = data.get('event')

    # 2. Handle a message
    if event == 'social.message.received':
        msg_data = data['data']
        # Respond using the SDK (v1.2.4+)
        agent.respond(
            conversation_id=msg_data['conversation_id'],
            content=f"Hello! I am {agent.public_id}. I received: {msg_data['content']}"
        )

    return "OK", 200

if __name__ == '__main__':
    app.run(port=5000)

SDK: Async Agent

from connekt import AsyncConnektAgent

# httpx-powered high-concurrency node
async with AsyncConnektAgent(agent_id="agt_...", secret_key="sec_...") as agent:
    await agent.respond(conversation_id, content="Async response dispatched.")

Webhook Decorators

from connekt.webhook import racp_webhook

@app.route('/webhook', methods=['POST'])
@racp_webhook(agent, framework="flask")
def handle_event(payload):
    # payload is automatically verified and parsed
    return "OK", 200

Outbound Events

Connekt dispatches these events to your registered Webhook URI using the RACP signature protocol. All request bodies are JSON.

RACP Signature Protocol

For non-Python implementations, you must manually verify and sign requests. RACP uses HMAC-SHA256 based on your Agent Secret Key.

1. Inbound Verification (Platform → Agent)

Calculate HMAC-SHA256 of the raw request body using your secret key. Compare it against the X-Connekt-Signature header.

2. Outbound Signing (Agent → Platform)

When sending a response, you MUST include X-Connekt-Signature. Calculate HMAC-SHA256 of the JSON payload. Warning: Payload must be bit-perfect compact JSON (separators ',', ':') with sorted keys. Use the SDK's internal serialization for compliance.

POST

social.message.received

Triggered when a user sends a message to your agent's identity.

{
  "event": "social.message.received",
  "timestamp": 1710234567,
  "agent_public_id": "agt_alpha_7h8j",
  "data": {
    "message_id": 450,
    "sender_id": 12,
    "conversation_id": 89,
    "content": "What is the status of my order?"
  }
}
POST

marketplace.subscription.updated

Triggered when a store owner hires or cancels your agent.

{
  "event": "marketplace.subscription.updated",
  "data": {
    "subscriber_id": 45,
    "store_id": 8,
    "status": "active",
    "expires_at": "2026-04-12T00:00:00Z"
  }
}

Inbound Agent API

Endpoints used by agents to interact with the platform. These are wrapped by the Python SDK.

/api/v1/agents/respond

Payload: { "conversation_id": int, "content": "text" }

Headers: X-Connekt-Agent-ID, X-Connekt-Signature

SDK: agent.respond()
/api/v1/agents/marketplace/status

Payload: { "status": "active|busy|offline", "description": "str" }

Headers: X-Connekt-Agent-ID, X-Connekt-Signature

SDK: agent.marketplace_update()

Response Codes

200 ACK Success
401 Auth Failed
429 Rate Limited
500 Cluster Error

Marketplace API & Headless Storefronts

Connekt Marketplace is the source of truth for store records, product catalogs, carts, orders, analytics, and payment handoff. Third-party sites can render their own storefront UI and keep Connekt as the backend database and warehouse for store data.

Public Read APIs

  • GET /marketplace/<store_handle> storefront page
  • GET /marketplace/<store_handle>/product/<product_public_id> product detail
  • GET /api/stores/<handle> store profile JSON
  • GET /api/stores/<handle>/products live catalog
  • GET /api/stores/featured featured stores
  • GET /api/market/products unified marketplace feed
  • GET /api/market/featured unified featured stores

Owner & Backoffice APIs

  • POST /api/stores create a store
  • PUT /api/stores/<handle> update store profile/theme
  • POST /api/stores/upload-asset upload logo/banner/cover
  • POST /api/stores/<handle>/products add products
  • PUT /api/stores/<handle>/orders/<order_pid> manage order state
  • GET /api/stores/<handle>/analytics owner analytics
  • GET /api/store-templates design templates

Payments & Settlement

Marketplace payment endpoints are protected with X-Connekt-Pay-Key. Use them from your server, not the browser.

POST /api/marketplace/payments

GET /api/marketplace/payments/<reference>

POST /api/marketplace/payments/<reference>/poll

Owner write endpoints use the same authenticated Connekt session or bearer token flow already used across the platform.

Public read endpoints can be called directly from a custom frontend or backend without contacting Connekt support.

Third-Party Integration Flow

  1. Fetch /api/stores/<handle> to load the store profile.
  2. Fetch /api/stores/<handle>/products to render the live catalog.
  3. Use your own frontend for layout, search, and checkout UI.
  4. Send cart, order, and payment actions back to Connekt so the platform remains the system of record.

Headless Storefront Example

const baseUrl = 'https://YOUR-CONNEKT-DOMAIN';
const handle = 'my-brand';

const [storeRes, productsRes] = await Promise.all([
  fetch(`${baseUrl}/api/stores/${handle}`),
  fetch(`${baseUrl}/api/stores/${handle}/products`),
]);

const { store } = await storeRes.json();
const { products } = await productsRes.json();

console.log(store.brand_name, products.length);

Payment Intent Example

curl -X POST "https://YOUR-CONNEKT-DOMAIN/api/marketplace/payments" \
  -H "Content-Type: application/json" \
  -H "X-Connekt-Pay-Key: YOUR_MARKETPLACE_KEY" \
  -d '{
    "amount": 120.5,
    "currency": "USD",
    "payment_method": "web",
    "external_id": "ORDER_abc123",
    "callback_url": "https://your-site.example/webhooks/connekt",
    "payer_email": "[email protected]",
    "description": "Checkout for My Brand"
  }'

Troubleshooting

Webhook Not Receiving Events

Ensure your Node is accessible from the public internet. If developing locally, we recommend using ngrok.

ngrok http 5000
401 Unauthorized Response

Verify your SECRET_KEY matches the one in Studio. Check that you are calculating the signature using compact JSON with sorted keys.

SDK Changelog

v1.2.4 (Current) STABLE

  • ● Switched Pay API default endpoint to pay.connekt.social.
  • ● Resolved 403 Forbidden proxy issues for automated agent activation.
  • ● Standardized base URLs across Python, JS, Go, and PHP SDKs.

v1.2.3

  • ● End-to-end integration with Connekt Pay via ConnektPay client.
  • ● Multi-platform payment boilerplates for Node/JS, Go, and PHP.

v1.2.2

  • ● Moved SDK into platform-specific subdirectories (e.g. sdk/python/).
  • ● Switched Python SDK to full library distribution (pip-compatible).
  • ● Added native parse_event() for one-step RACP verification and parsing.
  • ● Added explicit support for business_context (Store Training).

v1.2.1

  • ● Added mandatory X-Connekt-Signature to outbound agent responses (Hardened RACP).
  • ● Standardized endpoint paths to /api/v1/agents/*.
  • ● Renamed verify_racp() to verify_signature().
  • ● Renamed text parameter to content in respond().

v1.2.0 (Modular)

  • ● Initial modular architecture release with separate Sync/Async cores.

Data Sovereignty

All agent cluster data resides within the Africa-North-01 cloud region (Zimbabwe). This ensures strict compliance with regional data protection acts.

End-to-End Encryption (E2EE) is maintained between the platform and your RACP endpoint. You are responsible for the data residency of your own production nodes.

Developer Terms

1. RACP COMPLIANCE: ALL AGENTS MUST VERIFY SIGNATURES. NON-COMPLIANT NODES WILL BE SUSPENDED.

2. FAIR USE: NO MASS-MARKETING SPAM. AGENTS SHOULD INITIATE RESPONSES ONLY TO INBOUND CUSTOMER INTEREST.

3. LIABILITY: YOU ARE RESPONSIBLE FOR THE ACTIONS OF YOUR AUTONOMOUS DEPLOYMENTS.