Skip to main content

AICoevolution SDK - Semantic Telemetry and Transformation Detection for Human-AI Conversations

Project description

AICoevolution SDK (Thin Client)

The aicoevolution PyPI package ships a thin HTTP client for the AICoevolution SDK Service. All computation happens on the hosted service (or your self-hosted deployment).

This README is the public contract: if it isn’t described here, it won’t be part of the published client API.


Install

pip install aicoevolution

What you get (Paper 03 release)

Real-time semantic telemetry (/v0/ingest)

  • SGI (Semantic Grounding Index): grounding quality of assistant replies relative to the user's query + context
  • Angular velocity: semantic movement per turn (degrees/turn)
  • Context phase: stable / protostar / split — topic coherence state
  • Context mass: accumulated turns in current topic
  • Attractor count: number of competing topic centers
  • Designed for live feedback (sub-second latency)

Batch runs (/v1/runs) (internal / platform)

  • Platform-oriented batch analysis with snapshot persistence (used by backend workflows)
  • Requires an internal service key (X-SDK-API-Key)

Authentication

The SDK Service supports two auth modes:

  • External users: Authorization: Bearer aic_...
  • Internal service-to-service: X-SDK-API-Key: <SDK_SERVICE_API_KEY>

Get a user API key from your AICoevolution profile (Profile → API Keys).


Quickstart (Python)

from aicoevolution_sdk import AICoevolutionClient
import time

sdk = AICoevolutionClient(
    base_url="https://sdk.aicoevolution.com",
)

# Option A: set env var AIC_SDK_API_KEY=aic_...
# Option B: pass it in code:
sdk.auth = sdk.auth.__class__(user_api_key="aic_your_key_here")

conversation_id = "conv_demo_001"

sdk.ingest(
    conversation_id=conversation_id,
    role="user",
    text="I keep repeating the same patterns and I don't know why.",
    timestamp_ms=int(time.time() * 1000),
)

resp = sdk.ingest(
    conversation_id=conversation_id,
    role="assistant",
    text="Let’s slow down and find the smallest concrete example of the pattern.",
    timestamp_ms=int(time.time() * 1000),
)

print("SGI mean:", resp.get("sgi_mean"))
print("Velocity mean:", resp.get("angular_velocity_mean"))
print("Context phase:", resp.get("context_phase"))
print("Context mass:", resp.get("context_mass"))

API (Thin Client)

Configure via environment

# SDK service base URL
AIC_SDK_URL=https://sdk.aicoevolution.com

# External user key (recommended for scripts / apps)
AIC_SDK_API_KEY=aic_...

# Internal-only (platform backend) key for /v1/runs
SDK_SERVICE_API_KEY=...

POST /v0/ingest (real-time metrics)

sdk.ingest(
    conversation_id="conv_123",
    role="user|assistant",
    text="...",
    timestamp_ms=1705234567890,
)

GET /v0/snapshot/{conversation_id}

sdk.snapshot(conversation_id="conv_123")

POST /v1/runs (internal / platform)

sdk.create_run(body={
    "journey_spec_id": "diagnostic_pulse_v1",
    "messages": [
        {
            "role": "user",
            "text": "...",
            "macro_topic_id": "perception",
            "session_idx": 1,
            "timestamp": "2025-12-29T12:34:56Z",
        },
    ],
})

Service architecture (high-level)

The SDK Service is part of a small ecosystem:

  • SDK Service (FastAPI): telemetry + batch runs
  • Embedding Sidecar: embedding generation via HTTP (POST /embed)
  • Platform backend: user keys, quotas, tier enforcement, hosted workflows

Support

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

aicoevolution-0.0.5.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

aicoevolution-0.0.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file aicoevolution-0.0.5.tar.gz.

File metadata

  • Download URL: aicoevolution-0.0.5.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for aicoevolution-0.0.5.tar.gz
Algorithm Hash digest
SHA256 72f1f5d4fd88442c8d7f640675de384ac4fd177e6db5fb67830bca5690bcc572
MD5 b2924639c62111339850e0896b2bb6a5
BLAKE2b-256 9f73be51c42a65272238324b9547f9a21d11500878f308b05b11a1993873d68a

See more details on using hashes here.

File details

Details for the file aicoevolution-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: aicoevolution-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for aicoevolution-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5660ae7de0f905e301c06f1d1f91e9ec0a8b042ac11b39df6466dd8393fdd726
MD5 09f5d4ae2992589b9e243550c73502fc
BLAKE2b-256 819a4297055d1f92c2b5fe0ac6635918dc709d9571c80b1e9d7e6410d63ae0f1

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