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.1.tar.gz (17.7 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.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dasc_core-0.1.1.tar.gz
  • Upload date:
  • Size: 17.7 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.1.tar.gz
Algorithm Hash digest
SHA256 e9bc510eeb062e9f6afe76aa8e52833931c46324194e65bc3483815e868f8707
MD5 f255af273bff4ac821efebcaf4b66f14
BLAKE2b-256 43bfb05ef667a476fc2d9a3eb0512d4f59ea4bfcee31c1df27ad7c64164a8664

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dasc_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12776a25078a52f19093f15e735bd86f83c6f578f2baf0d7919c70c50d545a74
MD5 15e95a1ab02161a09386e6a4337d21d8
BLAKE2b-256 7e9441230b34ec41fd1ab1243fd6a40ca972687c2caa5aac669e57088d1274db

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