Skip to main content

dap-schemas

Shared Pydantic v2 schemas for the DAP (Deterministic Agent Pipeline) ecosystem. This package defines the data contract every other first-party package uses to exchange agents, pipelines, runs, and runtime tasks.

Distribution vs. import name. The PyPI distribution is dap-schemas; the Python module remains dap_types. Analogous to Pillow → from PIL import Image. The discrepancy is intentional — the original short name was squatted on PyPI when the project went public.

What's in here

Schema Lives in dap_types. Purpose
Agent + AgentRole agent Versioned agent definition: runtime, prompt template, input/output schema, role enum
Pipeline + PipelineNode / PipelineEdge / PipelineDefaults + EdgeCondition (ComparisonCondition, LogicalCondition) pipeline DAG of agent nodes + edges + entry point + run defaults
PipelineState + StateSnapshot + FinalStatus / VerificationStatus state Execution state passed between nodes; every agent's input_schema / output_schema references fields here
Run + NodeExecutionLog + NodeStatus run A single execution of a pipeline, with status, started_at, final_status, cost
Project + RECOMMENDED_PIPELINE_KINDS project Workspace layer — binds workflow kinds to pipelines, env-var overrides
RuntimeAdapter (Protocol) + RuntimeKind + HealthStatus runtime The interface every adapter in dap-runtimes implements
RuntimeTask / RuntimeResult runtime I/O shape exchanged between the engine and runtime adapters
agent_output_model / role_output_model / resolve_output_validator / ROLE_FIELDS role_outputs Helpers for building Pydantic validators against an agent's declared output_schema

Audit, user, and API-token schemas live in the engine package (dap_engine.persistence.models) rather than here — they don't need to cross the wire to third-party consumers.

All models use model_config = ConfigDict(extra="forbid") — unknown fields are rejected on parse, so a typo in a pipeline export is caught at import time rather than silently ignored.

Installation

You usually install this transitively via dap-cli:

pipx install dap-cli   # pulls dap-engine + dap-runtimes + dap-schemas + dap-prompt-dsl + dap-cortex

Standalone (e.g. if you're writing a third-party tool that exchanges DAP payloads):

pip install dap-schemas

Usage

from pathlib import Path
import json
from dap_types import Agent, Pipeline, PipelineState

# Parse a pipeline bundle from JSON.
bundle = json.loads(Path("my-pipeline.json").read_text())
pipeline = Pipeline.model_validate(bundle["pipeline"])

# PipelineState is the canonical execution state — every agent
# reads/writes a subset of its fields.
state = PipelineState(
    run_id="run-abc",
    repo="me/my-project",
    branch="feature/foo",
    description="Sketch a 5-step plan for issue #42",
)

The full schema catalogue is enforced by the engine on every write: a Pipeline with an unknown node agent_id, a malformed PipelineState reference in an agent's output_schema, etc., is rejected with HTTP 422 carrying a Pydantic error trace pinpointing the offending field.

Compatibility

See also

License

See the main repository for licensing details.

Metadata

Release files for dap-schemas 0.4.0

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

Source distribution (sdist)

Source distribution for dap-schemas 0.4.0
File Size Uploaded Provenance Actions
dap_schemas-0.4.0.tar.gz 15.5 kB With provenance Details for dap_schemas-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dap-schemas 0.4.0
File Interpreter ABI Platform Actions
dap_schemas-0.4.0-py3-none-any.whl Python 3 none any Details for dap_schemas-0.4.0-py3-none-any.whl

Total release size: 35.1 kB

Release files / dap_schemas-0.4.0.tar.gz

Download URL dap_schemas-0.4.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b01b628ed58accf5fbc0f5f1be4d5b0e2484b003c3c73efc60efbefbe7bf19ca
BLAKE2b-256 checksum
How to use checksums
28f2ba522eec2dd3276578c3fdfb515cacca2c226936d17a2c49a90c694bd885
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / dap_schemas-0.4.0-py3-none-any.whl

Download URL dap_schemas-0.4.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b1ca0fd383adb1e88ec5e37675a027439c73bea7040e36810698b43ccc1714a
BLAKE2b-256 checksum
How to use checksums
138a09ef403e1c26548263d6da49b048b95910d12ed4deeec78bedf1a1f5bb5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for dap-schemas 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dap_schemas-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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