Skip to main content

DNA — Domain Notation of Anything: microkernel + extensions for declarative agent notation

Project description

dna-sdk (Python)

Python SDK for DNA — Domain Notation of Anything: a microkernel + extensions runtime for declarative agent notation. See the repository README for the thesis, the architecture and the full Kind catalog.

Install

pip install dna-sdk        # or: uv add dna-sdk

Pre-release / exact-pin alternative — from the repo:

cd packages/sdk-py
uv sync            # or: pip install -e .

Optional extras: postgres, sqlite, sql (SqlAlchemySource — one adapter for both SQL dialects, same tables; see docs/PORT-CONTRACT.md § "Using the SQLAlchemy adapter"), redis, s3, tools (langchain @dna_tool decorator), safety-ml (PII/toxicity models), all, dev.

Minimal example

from dna import Kernel

# Scan a scope (directory of YAML/Markdown manifests under .dna/)
mi = Kernel.quick("hello-genome", base_dir="examples/hello-genome/.dna")

# Every document is identified by (apiVersion, kind, name)
for d in mi.documents:
    print(d.api_version, d.kind, d.name)

# Compose agent + soul + skills + guardrails into one system prompt
print(mi.build_prompt(agent="greeter"))

Runnable version: examples/hello-genome/run.py.

Layout

dna/
├── kernel/       # Kernel (mediator over 5 ports), Document, ManifestInstance
├── adapters/     # filesystem (core); sqlite/postgres/sqlalchemy_/redis/s3 via extras
├── extensions/   # helix (core Kinds) + market formats + governance
├── sync/         # lockfile + document hashing
└── safety/       # safety pipeline (optional ML extras)

Tests

uv run pytest tests/ -v

The suite includes the market-fidelity conformance tests (tests/test_market_conformance.py) and the Py↔TS parity fixtures shared with the TypeScript twin.

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

dna_sdk-0.8.0.tar.gz (942.4 kB view details)

Uploaded Source

Built Distribution

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

dna_sdk-0.8.0-py3-none-any.whl (682.8 kB view details)

Uploaded Python 3

File details

Details for the file dna_sdk-0.8.0.tar.gz.

File metadata

  • Download URL: dna_sdk-0.8.0.tar.gz
  • Upload date:
  • Size: 942.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dna_sdk-0.8.0.tar.gz
Algorithm Hash digest
SHA256 a83086cd95a34de69088e6b3caf272fb959721c4932f4691d7a55817a6fc1f22
MD5 0be6a28f1c6a7bf2b04a70feecb94fba
BLAKE2b-256 43386ca41b807ef96c75debaa4b9296d83f66fa18e5e0d3dcf41d54da41499fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for dna_sdk-0.8.0.tar.gz:

Publisher: release.yml on ruinosus/dna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dna_sdk-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: dna_sdk-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 682.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dna_sdk-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5b0b407d99d30cf73573bf7375cfb9b6e6c907c7a546d337d94f7853c0ec43b
MD5 5b2a43bb69cc8e7924f6a2081fc0b618
BLAKE2b-256 632dd4855299408374c52ddd1fa1adf02c276bd717524a7b5cc84a97618b0807

See more details on using hashes here.

Provenance

The following attestation bundles were made for dna_sdk-0.8.0-py3-none-any.whl:

Publisher: release.yml on ruinosus/dna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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