Skip to main content

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

Metadata

Release files for aicoevolution 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aicoevolution 0.0.5
File Size Uploaded Provenance
aicoevolution-0.0.5.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aicoevolution 0.0.5
File Interpreter ABI Platform
aicoevolution-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / aicoevolution-0.0.5.tar.gz

Download URL aicoevolution-0.0.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
72f1f5d4fd88442c8d7f640675de384ac4fd177e6db5fb67830bca5690bcc572
BLAKE2b-256 checksum
How to use checksums
9f73be51c42a65272238324b9547f9a21d11500878f308b05b11a1993873d68a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / aicoevolution-0.0.5-py3-none-any.whl

Download URL aicoevolution-0.0.5-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5660ae7de0f905e301c06f1d1f91e9ec0a8b042ac11b39df6466dd8393fdd726
BLAKE2b-256 checksum
How to use checksums
819a4297055d1f92c2b5fe0ac6635918dc709d9571c80b1e9d7e6410d63ae0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for aicoevolution 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page