Skip to main content

Official CGOS client: intake, proof validation, execution gateway, observability hooks

Project description

NerveMind CGOS Python SDK

Developer-oriented client for decision intake (v2), proof validation, and execution invoke (gateway).

Install (local / editable)

cd sdks/python
pip install -e .

Quick start

from cgos_sdk import CGOSClient

client = CGOSClient(
    base_url="https://cgos-api.example.com",
    api_key="your-api-key",
    internal_service_token="...",  # for verify_proof / invoke_execution
)

out = client.submit_decision(
    source_system="core-payments",
    sector="banking",
    decision_type="limit_increase",
    decision_id="dec-001",
    context={"amount": 5000},
    policy_set="ORGANIZATION_POLICY_V1",
    callback_url="https://your-bank.example/callbacks/cgos",
    correlation_id="trace-abc",
)

proof_check = client.verify_proof(out.get("proof_id") or "prf_...")
exec_resp = client.invoke_execution(
    proof_id="prf_...",
    path="/api/v1/payments/transfer",
    organization_id="org_123",
    http_method="POST",
    json_body={"to": "x", "amount": 1},
)

Auth

Call Header
Intake v2 X-API-Key or Authorization: Bearer <api_key> (matches brain-api)
Proof validate / execution X-CGOS-Internal-Token (S2S)

Optional bearer JWT (UI / ops) enables wait_for_decision() polling on GET /api/v1/cgos/decisions/{id}.

Reliability

CGOSClient supports timeout_s, max_retries, Idempotency-Key on intake (passed as header when provided), and optional traceparent / correlation_id on every request.

External attestation

This SDK cannot prove mesh or gateway posture. Pair with SPIFFE/SPIRE, signed policy bundles, and CI validators — see docs/CGOS_EXTERNAL_ATTESTATION_AND_SDK.md at repo root.

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

nervemind_cgos-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

nervemind_cgos-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file nervemind_cgos-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for nervemind_cgos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 820b74924862b147744fc7b6944892e6583d59e0ad7cda0b177c24299ae7112a
MD5 f164decc38dd59d185bdcceab1b86e61
BLAKE2b-256 87719e9a523e0afff86ad0d77b2c117fc87f9f627ca4e6aa0148f091a0cf5a33

See more details on using hashes here.

File details

Details for the file nervemind_cgos-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for nervemind_cgos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a7696962880dac79e6b39c5e86a94dd75fcfa536f96966007326643a50692b5
MD5 ba193e2aaca999d8e34d4f4fca1e7b0b
BLAKE2b-256 43b6dcce6be819b4b86660ccc1d33744b25f9c10a9192ef2195808d9afbce4d6

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