Skip to main content

Kongen Labs SCI Pattern Intelligence SDK -- cross-domain pattern transfer and LLM reasoning regime detection

Project description

Kongen SDK

PyPI version Python versions License: MIT

Python SDK for the Kongen Labs Pattern Intelligence API -- cross-domain pattern transfer and LLM reasoning regime detection powered by morphogenetic reaction-diffusion dynamics.

Install

pip install kongen

Quick Start

from kongen import KongenClient

client = KongenClient(api_key="kl_live_...")

# Chiryu: LLM reasoning regime detection (1 KT)
result = client.chiryu.score("Prove that sqrt(2) is irrational")
print(result.regime, result.boost_factor)

# Transfer: Cross-domain pattern scoring (50 KT)
result = client.transfer.score_signal({
    "activator_strength": 0.7,
    "inhibitor_strength": 0.3,
    "boundary_strength": 0.8,
    "scale_coherence": 0.6,
    "field_magnitude": 1.5,
    "a_i_ratio": 2.33,
    "gradient_strength": 0.5,
})
print(result.classification, result.confidence)

Authentication

Get your API key at garden.kongenlabs.life.

# Pass directly
client = KongenClient(api_key="kl_live_...")

# Or set environment variable
# export KONGEN_API_KEY=kl_live_...
client = KongenClient()

Batch Scoring

Score multiple signals at a discount (40 KT/signal instead of 50):

signals = [
    {"activator_strength": 0.7, "inhibitor_strength": 0.3, ...},
    {"activator_strength": 0.5, "inhibitor_strength": 0.6, ...},
    {"activator_strength": 0.9, "inhibitor_strength": 0.1, ...},
]

results = client.transfer.score_batch(signals)
for r in results:
    print(f"{r.classification}: boost={r.boost_factor:.3f}")

MCP Integration

Use the Kongen MCP server with LLM agents:

# List available tools
tools = client.mcp.list_tools()
# Returns: chiryu_score, transfer_score, pattern_classify

# Call a tool
result = client.mcp.call_tool("chiryu_score", {
    "text": "Explain quantum entanglement"
})

Error Handling

from kongen import TokensExhaustedError, APIError

try:
    result = client.chiryu.score("...")
except TokensExhaustedError:
    print("Out of tokens -- add a payment method")
except APIError as e:
    print(f"API error {e.status_code}: {e.message}")

Token Usage

Every API call consumes Kongen Tokens (KT). Check your balance:

usage = client.token_usage
print(f"{usage.remaining} KT remaining")
Endpoint Cost
chiryu.score() 1 KT ($0.0007)
transfer.score_signal() 50 KT ($0.035)
transfer.score_batch() 40 KT per signal ($0.028)
mcp.call_tool() same as REST

Pricing

Pay-as-you-go. Every account gets 5,000 free credits on signup. After that, each Kongen Token costs $0.0007. No subscriptions, no commitments. Billed monthly based on actual usage.

Enterprise customers can negotiate custom volume pricing -- contact sales@kongenlabs.life.

Documentation

License

MIT -- see LICENSE for details.

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

kongenlabs-1.0.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

kongenlabs-1.0.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file kongenlabs-1.0.0.tar.gz.

File metadata

  • Download URL: kongenlabs-1.0.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for kongenlabs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 06ad72ed04f42157c721e50caea4692ea08c72bc4f41810e402cedd1907b8df3
MD5 37553190da9936a9e2f382106e2f7aaf
BLAKE2b-256 787794efad767ee38c25a0731e8878d92a649f725a3ba75c05b10dd4cd32cd01

See more details on using hashes here.

File details

Details for the file kongenlabs-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kongenlabs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for kongenlabs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c99a458dc3afcc3cc94755548d7daf1c4b39c56d6e2450769095d87540eaa1c7
MD5 2a120c27b1967d167902f59d1795c68a
BLAKE2b-256 2916a35f9ee3c1ff0f03e9b6c5cf5faad0fdce9ff70a482d5360a64f2f4b9229

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