Skip to main content

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

Metadata

Release files for dasc-core 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dasc-core 0.1.1
File Size Uploaded
dasc_core-0.1.1.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dasc-core 0.1.1
File Interpreter ABI Platform
dasc_core-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 38.4 kB

Release files / dasc_core-0.1.1.tar.gz

Download URL dasc_core-0.1.1.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e9bc510eeb062e9f6afe76aa8e52833931c46324194e65bc3483815e868f8707
BLAKE2b-256 checksum
How to use checksums
43bfb05ef667a476fc2d9a3eb0512d4f59ea4bfcee31c1df27ad7c64164a8664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / dasc_core-0.1.1-py3-none-any.whl

Download URL dasc_core-0.1.1-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12776a25078a52f19093f15e735bd86f83c6f578f2baf0d7919c70c50d545a74
BLAKE2b-256 checksum
How to use checksums
7e9441230b34ec41fd1ab1243fd6a40ca972687c2caa5aac669e57088d1274db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page