Pure interface contracts (protocols, ABCs, models) for the TAI ecosystem. No logic; pydantic-only at runtime.
Project description
tai42-contract
Pure interface contracts for the TAI ecosystem: the protocols, ABCs, pydantic
models, and enums every other package builds against. At runtime this package
imports nothing but pydantic, and its behaviour is limited to a narrow
whitelisted surface — the tai42_app forwarding handle, model-level
validators/normalizers, the storage path guard, and Agent's default
astream/terminal-drain; everything else is a pydantic model, Protocol, ABC, or
enum. Vendor types (fastmcp, langchain, starlette, mcp) appear only inside
TYPE_CHECKING blocks, so they are never loaded when the code runs.
Position in the ecosystem
TAI is an open-source runtime for MCP tools, agents, and workflows — the server that hosts a capability and supplies the operational layer around it (manifest loading, access control, OAuth connectors, background execution, monitoring, storage, and human-in-the-loop steps). Everything plugs in against the interfaces this package defines.
Three packages; each depends only on the ones to its left:
tai42-contract <-- tai42-kit <-- tai42-skeleton
(interfaces) (helpers) (the server)
tai42-contract is the leaf: it depends on no other tai-* package, so anything —
the skeleton, a plugin, a helper — can import it without pulling in an
implementation.
Install
Requires Python 3.13+. Nothing is on PyPI yet, so install from source —
clone this repo alongside your tai-skeleton checkout and add it as an editable
dependency of the environment that runs the server. Usually pulled in
transitively via tai42-kit / tai42-skeleton, but it installs directly too:
git clone https://github.com/tai42ai/tai-contract
cd tai-skeleton # or your own app checkout
uv add --editable ../tai-contract # once published: uv add tai42-contract
Development
uv sync --extra dev # pydantic + tooling + vendor libs (for pyright)
uv run ruff check .
uv run pyright
uv run pytest # self-contained contract tests
Documentation
The whole platform — concepts, guides, and the generated reference — lives in the unified documentation site:
- Layering & the contract/kit/skeleton split: https://tai42.ai/concepts/layering
- Python SDK reference (this package's public API): https://tai42.ai/reference/python-sdk
License
Apache-2.0. See LICENSE and NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tai42_contract-0.1.0.tar.gz.
File metadata
- Download URL: tai42_contract-0.1.0.tar.gz
- Upload date:
- Size: 89.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60af4993637fbe16c510085b82736247730a07ca6edbc36505f9566fb078c1f5
|
|
| MD5 |
62f3cde1c918153c31e7c49ebc4901dd
|
|
| BLAKE2b-256 |
1b7fbe4cf861f84059ab26022cef899c0d014b2944231b21c19eaec3b17a4bec
|
File details
Details for the file tai42_contract-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tai42_contract-0.1.0-py3-none-any.whl
- Upload date:
- Size: 113.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97548ce3de77439f1b0626404c4bea6ca6b947398d416d42610738fc3bbc681d
|
|
| MD5 |
f5650340376a4c0948ccc4abb34e0ed5
|
|
| BLAKE2b-256 |
b34c59488d3775b0016f87644a618e6d15684230007c93f57237c51df7a0f7a7
|