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 -- pattern transfer scoring and LLM reasoning regime detection.

Install

pip install kongenlabs

Quick Start

from kongen import KongenClient

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

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

# Transfer: Pattern scoring (50 KT)
result = client.transfer.score_signal({
    "complexity": 0.7,
    "constraint": 0.3,
    "boundary": 0.8,
    "coherence": 0.6,
    "magnitude": 1.5,
    "balance": 2.33,
    "gradient": 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 = [
    {"complexity": 0.7, "constraint": 0.3, ...},
    {"complexity": 0.5, "constraint": 0.6, ...},
    {"complexity": 0.9, "constraint": 0.1, ...},
]

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

MCP Integration

Use the Kongen MCP server with LLM agents:

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

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

Error Handling

from kongen import TokensExhaustedError, APIError

try:
    result = client.logic.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
logic.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 1,000 free Kongen Tokens on signup — no credit card required. Above the free allowance, 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.1.0.tar.gz (26.4 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.1.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kongenlabs-1.1.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kongenlabs-1.1.0.tar.gz
Algorithm Hash digest
SHA256 047527b21e3628dbea5c3baeae661485e36b1e2f22b7cdeee5af36d30cdb71a2
MD5 d2a464ef15a8996da5bbbe41f331c5d1
BLAKE2b-256 7bcb632959e1be61aa05f00c1d6ffa3e0499f72e2747ca95545b0c2715715eb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kongenlabs-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kongenlabs-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0694ecdfb0ce9810f889fda9dc9d09c072e35afc445f4a6d36c354d12f014024
MD5 d06e0ce70dafa7c7c169056ad2d16674
BLAKE2b-256 b6a3d1b3e90478a0624ce29b7a48800675257a3966b97f8c0eff5cf918454b8e

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