Cortex SDK for Python
Install
pip install cortex-suite-sdk
Quick start
import asyncio
from cortex_sdk import CortexClient
def on_message(msg):
print(msg["type"], msg["payload"])
async def main():
client = CortexClient(
api_key="your-api-key",
# auth_url="https://cortexsuite.app", # optional override
on_message=on_message,
)
await client.connect()
await client.send_message(content="Hello")
asyncio.run(main())
API
See the full API reference.
auth_url is optional; if omitted, the SDK uses its default auth base URL.
Error handling
from cortex_sdk import CortexClient, CortexError
def on_message(msg):
if msg["type"] == "system::error":
print("Runtime error:", msg["payload"]["code"])
if msg["payload"].get("fatal"):
pass # handle unrecoverable session
client = CortexClient(
api_key="your-api-key",
on_message=on_message,
)
try:
await client.connect()
except CortexError as err:
if err.code in ("auth_invalid", "auth_refresh_failed"):
pass # prompt re-authentication
Metadata
Release files for cortex-suite-sdk 1.1.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cortex_suite_sdk-1.1.21.tar.gz | 34.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cortex_suite_sdk-1.1.21-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.8 kB
Release files / cortex_suite_sdk-1.1.21.tar.gz
| Download URL | cortex_suite_sdk-1.1.21.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93b9d4e50a51c76cfc6991971e625d8cfd1e98e7d53665b4770b2cb65aca9a89
|
|
BLAKE2b-256 checksum How to use checksums |
5b60d1e11b8abf4d46f0457a4c491c9a9d15996ae416084fbceee8d1500e7d2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / cortex_suite_sdk-1.1.21-py3-none-any.whl
| Download URL | cortex_suite_sdk-1.1.21-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03c4334e86c364d2a5a979bc6a1f07a4e0fab67a50038df71e72b3c76a3fdf24
|
|
BLAKE2b-256 checksum How to use checksums |
4abd9e5fd20b4f4c42cb339ccea491b5a1361523b600c5136823f58bc3ba0ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logSecurity for cortex-suite-sdk 1.1.21
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cortex_suite_sdk-1.1.21.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logA 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.