Skip to main content

A deterministic safety controller for agentic workflows.

Project description

DASC-Core

DASC (Deterministic Agentic Safety Controller) is an open-source middleware designed to intercept outputs from AI orchestration frameworks (like LangGraph, AutoGen, and CrewAI) and enforce deterministic safety checks before actions are committed.

The Paradigm: Cognitive Fault vs. Committed Fault

DASC operates on the principle that AI agents will fail. These are Cognitive Faults (hallucinations, logic errors). Our goal is to prevent these from becoming Committed Faults (actual state changes). DASC provides the deterministic boundary where these faults are intercepted.

Installation

pip install dasc-core

Features

  • LangChain/LangGraph Integration: Use DASCCommitTool to wrap agent actions.
  • AutoGen Support: Use DASCGatekeeper to intercept and validate function calls.
  • Semantic OCC (Hashing): Use hash:<sha256> in version vectors for automatic file content verification.
  • Structured Observability: Built-in logging with detailed evaluation stages.
  • Programmable Rejections: Custom exceptions (OCCConflictError, etc.) for robust error handling.
  • Bitemporal SQLite Ledger: Persistent audit log of every decision.

Quick Start

Using the Kernel with Exceptions

from dasc.kernel import Kernel
from dasc.exceptions import OCCConflictError

kernel = Kernel()

try:
    kernel.evaluate(intent, raise_on_failure=True)
except OCCConflictError:
    # Trigger agent retry or state refresh logic
    pass

Using Semantic OCC (Hashing)

from dasc.utils import calculate_file_hash

file_hash = calculate_file_hash("data.json")
intent = Intent(
    ...,
    state_version_vector={"data.json": f"hash:{file_hash}"}
)

Documentation

DASC CLI

The project includes a command-line tool for inspecting the ledger and generating hashes:

# View the last 10 decisions
dasc inspect

# Generate a hash for a file for OCC
dasc hash my_data.csv

# Verify a JSON intent manually
dasc verify intent.json --state '{"my_data.csv": "v1.0"}'

Examples

Run the production features demo:

python -m examples.production_features

License

MIT

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

dasc_core-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

dasc_core-0.1.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dasc_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fec75d5c3a48b2bccfd5544c5ad3b7fd043e8c9dd66ada2263fec85baa232a6e
MD5 307b2a5ac38b26111a3d960a6ff5f376
BLAKE2b-256 b50f15095175c82814e72d4c1af1b9a1c91ed0d6670ab036966ab25dedb2a1e4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dasc_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6701f9ad377b46fb61d8750d3f941b445356b2bd940dde08d399493f521e811
MD5 9411fbac8fc3ed8613c7222033731423
BLAKE2b-256 84bbf066552fcc4a908caae94e013089e8ffdce2cd191a97a1e4f4a8bde8120f

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