Skip to main content
Use this path when your Python application should ask Sector8 whether a proposed action may execute, then honor the returned decision before local dispatch. Telemetry helpers are available on the same client. Telemetry alone is not enforcement.
Enforcement requires your runtime to call evaluate before dispatch and honor the result. Unconnected tool paths are not automatically covered.

Prerequisites

  • Python 3.10 or later
  • SECTOR8_API_KEY
  • SECTOR8_CLIENT_ID
  • A runtime path where you can block dispatch and fail closed on errors

Install the SDK

Source repository: https://github.com/sector8-ai/sector8-sdk-python

Set your credentials

Public examples use the production host. Use the endpoint and credentials issued for your environment.

Evaluate before dispatch

Sector8 returns the verdict. Your application owns honoring that decision at dispatch time.
REST /api/v1/evaluate responses use the field decision. This SDK exposes the same value as outcome. Check for ALLOW the same way either way.
Never execute an action unless decision.outcome == "ALLOW". Fail closed on evaluate errors. Fail-closed applies to tools routed through this SDK path; it does not stop bypassed or unconfigured tool paths.
See Evaluate for the shared ALLOW | DENY contract and Non-MCP integration for custom runtime wiring.

Optional: send telemetry

Telemetry records what happened. It does not replace evaluate-before-dispatch.
Short helper:
The Python SDK defaults to https://sdkapi.sector8.ai. Override base_url only when targeting a non-default environment you intentionally control.

Verify the integration

  1. Check health:
  1. Confirm an evaluate call returns a decision artifact
  2. Confirm your runtime dispatches only on ALLOW and fails closed on unknown/error
  3. Optionally confirm telemetry appears in Sector8 if you send it
You are done when your Python runtime evaluates before dispatch, blocks on DENY, and fails closed on missing/unknown/error responses.

Common mistakes

  • Logging telemetry without calling evaluate before tool dispatch
  • Dispatching on any non-error response instead of checking decision.outcome == "ALLOW"
  • Missing SECTOR8_CLIENT_ID
  • Overriding base_url to an older host by accident

Next steps