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 remainsdap_types. Analogous toPillow→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
- Python 3.13+
- Pydantic 2.9+
- Semantic versioning. Breaking schema changes bump the major version
and ship a migration in
apps/engine/src/dap_engine/persistence/migrations.py.
See also
- DAP project README — architecture overview and quick-start.
docs/architecture.md— full schema relationships and the LangGraph state machine that consumes them.
License
See the main repository for licensing details.
Metadata
Release files for dap-schemas 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dap_schemas-0.4.1.tar.gz | 15.5 kB | With provenance | Details for dap_schemas-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dap_schemas-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for dap_schemas-0.4.1-py3-none-any.whl |
Total release size: 35.1 kB
Release files / dap_schemas-0.4.1.tar.gz
| Download URL | dap_schemas-0.4.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c3307bb9805307b0397c687849953ffae252e8730c5d7c7bb06fda399f08cc0
|
|
BLAKE2b-256 checksum How to use checksums |
1173c36e3bba7378eecf845f00ef38491b6ca1cc0e48d9fdbd1a59d2b88cbd89
|
| 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 logRelease files / dap_schemas-0.4.1-py3-none-any.whl
| Download URL | dap_schemas-0.4.1-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b417fc7f0662eea2a43b9bdf7c041dc6703f2e4ddd177f96de2020ca43b2aff5
|
|
BLAKE2b-256 checksum How to use checksums |
90df6dd86c18413aa27c28b333aa43be983f9ee337b9c66e1fa10e077f45b9f6
|
| 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 logSecurity for dap-schemas 0.4.1
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.
Attestation for dap_schemas-0.4.1.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 logA 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.