Deconvolute SDK
API ReferencePython SDK

Observability

Observability and event logging classes and utilities.

deconvolute.observability

configure_observability

def configure_observability() -> None

Initializes the global observability backend.

This sets up the local SQLite outbox for telemetry and starts the background synchronization worker if platform credentials are provided.

get_backend

def get_backend() -> BaseObservabilityBackend

Retrieves the active observability backend, initializing it if necessary.

worker

TelemetrySyncWorker Objects

class TelemetrySyncWorker()

Background worker for syncing audit events to the remote platform.

Runs in a dedicated daemon thread, waiting for signaling from the SQLiteStore. It reads pending events and processes them asynchronously without blocking the main application execution.

Attributes:

  • store SQLiteStore - The local database instance.

__init__

def __init__(store: SQLiteStore) -> None

Initializes the sync worker.

Arguments:

  • store SQLiteStore - The local database instance containing the audit queue and event signal.

start

def start() -> None

Starts the background worker thread if not already running.

stop

def stop() -> None

Signals the worker thread to stop gracefully.

local

LocalObservabilityBackend Objects

class LocalObservabilityBackend(BaseObservabilityBackend)

A unified local observability backend powered by SQLite.

All security telemetry, tool discoveries, and agent execution logs are written to the audit_queue table. If an API key is present, the background worker will securely transmit these events to the remote platform. If not, they are retained locally with a cap to prevent disk bloat.

__init__
def __init__(*args: Any, **kwargs: Any) -> None

Initializes the SQLite-backed local observability layer.

log_event
def log_event(event_type: str, payload: dict[str, Any]) -> None

Records a telemetry event to the database.

Arguments:

  • event_type str - Categorizes the event (e.g. 'SESSION_DISCOVERY', 'SESSION_ACCESS').
  • payload dict[str, Any] - The full contextual payload to record.
close
def close() -> None

Cleans up resources. SQLite connections are handled via context managers in the store, so no explicit teardown is strictly required here.

backends

base

BaseObservabilityBackend Objects

class BaseObservabilityBackend(abc.ABC)

Abstract base class for all Deconvolute observability backends.

A backend is responsible for durably recording security telemetry, tool discoveries, integrity violations, and agent execution events.

log_event

@abc.abstractmethod
def log_event(event_type: str, payload: dict[str, Any]) -> None

Records a telemetry event to the underlying storage mechanism.

Arguments:

  • event_type str - A string categorizing the event (e.g. 'SESSION_DISCOVERY', 'SESSION_ACCESS').
  • payload dict[str, Any] - A dictionary containing the full context of the event. This must be JSON serializable.

close

@abc.abstractmethod
def close() -> None

Cleans up any open resources (like database connections, background threads, or file handles) used by the backend before the application exits.

On this page