openadapt-types
Pydantic schemas for describing a screen and an action on it. Recorders emit them, the compiler stores and replays them, the grounding package resolves their targets, and the privacy package scrubs them. One definition, so nothing in the stack has to translate.
pip install openadapt-types
Optional, and not the product. If you want to record and replay a workflow, you
want openadapt-flow instead;
this is the contract underneath it, published separately for anyone building
their own computer-use agent. The API is not stable across minor versions yet.
Describe a screen, then act on it
from openadapt_types import (
Action, ActionTarget, ActionType,
ComputerState, UINode, BoundingBox,
)
state = ComputerState(
viewport=(1920, 1080),
nodes=[
UINode(node_id="n0", role="window", name="My App", children_ids=["n1"]),
UINode(node_id="n1", role="button", name="Submit", parent_id="n0",
bbox=BoundingBox(x=500, y=400, width=100, height=40)),
],
)
print(state.to_text_tree())
# [n0] window: My App
# [n1] button: Submit
action = Action(
type=ActionType.CLICK,
target=ActionTarget(node_id="n1"),
reasoning="Click Submit to proceed",
)
to_text_tree() exists so you can drop the element tree straight into a prompt.
Targeting
ActionTarget takes three kinds of answer to "which thing", and the runtime
prefers them in this order:
ActionTarget(node_id="n1") # an element the recorder saw
ActionTarget(description="the blue submit button") # resolved by the grounder
ActionTarget(x=550, y=420) # coordinates, last resort
ActionTarget(x=0.29, y=0.39, is_normalized=True)
An agent should produce a node_id or a description and let the runtime work
out the pixels. Coordinates are the thing that breaks when a window moves.
The rest of the types
| Type | What it holds |
|---|---|
ComputerState |
Screenshot, UI element graph, window context |
UINode |
One element: role, bbox, hierarchy, platform anchors |
Action |
A typed action plus its target |
ActionResult |
The outcome, with an error taxonomy and a state delta |
Episode / Step |
A whole trajectory: observation, action, result |
FailureRecord |
A classified failure, for dataset pipelines |
OracleObservation |
One independent effect read. Production VERIFIED needs tier 2 or 3 |
Plus the versioned wire contracts: ControlOverlayFrameV1/V2 and
ControlOverlayTimelineV1/V2 for PHI-safe execution overlays,
ExecuteRequestV1 / ExecuteStatusV1 / ExecuteEvidenceReceiptV1 for
asynchronous qualified execution, EffectStrengthV1, and the
BusinessDecision*V1 family for signed, finite human choices. What those
contracts may and may not carry is in
docs/CONTRACTS.md. Oracle tiers and the ten-line
adapter are in docs/ORACLE.md.
JSON Schema for everything else
import json
from openadapt_types import ComputerState
print(json.dumps(ComputerState.model_json_schema(), indent=2))
The same schemas ship as JSON under openadapt_types/schemas/ for TypeScript,
Rust, and anything else that isn't Python. Seventeen files, including
execute-v1-openapi.json, the public OpenAdapt Execute contract.
Converting from the older formats
from openadapt_types._compat import (
from_benchmark_observation, # openadapt-evals BenchmarkObservation
from_benchmark_action, # openadapt-evals BenchmarkAction
from_ml_observation, # openadapt-ml Observation
from_ml_action, # openadapt-ml Action
from_omnimcp_screen_state, # omnimcp ScreenState
from_omnimcp_action_decision, # omnimcp ActionDecision
)
state = from_benchmark_observation(obs.__dict__)
OpenAdapt Execute
A partner sends an authorized request, gets an execution ID back, and then
either reads a terminal receipt or waits for a signed webhook. The contract
exposes no runner, no customer data, no evidence bytes, and no control-plane
internals. A verified receipt needs an oracle at tier 2 or 3 (API, DB,
file, ack, or a counterparty artifact). Visual and OCR reads are tier 0
and cannot mint it.
from openadapt_types import ExecuteClient
client = ExecuteClient(
base_url="https://app.openadapt.ai/api",
bearer_token="partner-provisioned-token",
)
The client requires HTTPS and refuses to follow a redirect before it would send the bearer token somewhere else. It also doesn't poll forever, deliberately: a workflow can sit waiting for a human decision or a reconciliation, so treat the terminal receipt or the signed webhook as the completion signal, not a timeout.
Reference Python and TypeScript clients: examples/execute.
Design
Pydantic v2, so you get runtime validation, JSON Schema export, and fast
serialization. Pixels and structure are both captured, always, because either
one alone loses information the other has. The node graph is the full element
tree rather than the focused element. The same schema covers web, Windows,
macOS, Linux, RDP, and Citrix/VDI. raw, attributes, and metadata fields
exist everywhere so you can carry your own data through without forking.
The only dependency is pydantic>=2.0. No ML libraries.
License
Metadata
Release files for openadapt-types 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openadapt_types-0.12.0.tar.gz | 158.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openadapt_types-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 264.4 kB
Release files / openadapt_types-0.12.0.tar.gz
| Download URL | openadapt_types-0.12.0.tar.gz |
|---|---|
| Size | 158.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24bc131babbd9a4940df1c9c25cf4a7d63c859aeae4fe11b25b6672e303612f3
|
|
BLAKE2b-256 checksum How to use checksums |
9be5a7be12ac9b267b2a878b29c7e3b8908c9894b3cd0411cb9d8648dccf6914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 29, 2026.
Transparency logRelease files / openadapt_types-0.12.0-py3-none-any.whl
| Download URL | openadapt_types-0.12.0-py3-none-any.whl |
|---|---|
| Size | 105.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9d2ef67f7f82554881601484647d8f2f221896e382c9e586286e40164b125e5
|
|
BLAKE2b-256 checksum How to use checksums |
969d31a3042c07073eeb85177cbe2ad17f8790c769002aef222d0238bf23ecba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 29, 2026.
Transparency log