Skip to main content

tai42-contract

License: Apache 2.0

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+. Install from PyPI into the environment that runs the server. Usually pulled in transitively via tai42-kit / tai42-skeleton, but it installs directly too:

uv add tai42-contract

Or from source — clone this repo and add it as an editable dependency:

git clone https://github.com/tai42ai/tai42   # next to your app checkout
cd /path/to/your/app
uv add --editable ../tai42/core/contract

Development

uv venv --python 3.13
uv pip install --no-sources --editable ".[dev]"   # pydantic + tooling + vendor libs (for pyright)
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .
uv run --no-sync pyright
uv run --no-sync pytest --cov --cov-report=term-missing                           # self-contained contract tests

Documentation

The whole platform — concepts, guides, and the generated reference — lives in the unified documentation site:

License

Apache-2.0. See LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tai42_contract-1.2.0.tar.gz (105.6 kB view details)

Uploaded Source

Built Distribution

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

tai42_contract-1.2.0-py3-none-any.whl (134.5 kB view details)

Uploaded Python 3

File details

Details for the file tai42_contract-1.2.0.tar.gz.

File metadata

  • Download URL: tai42_contract-1.2.0.tar.gz
  • Upload date:
  • Size: 105.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tai42_contract-1.2.0.tar.gz
Algorithm Hash digest
SHA256 569e40d1c04daa1ad5154bf1326276b90a37d7f49581446e90ffe44888365ddc
MD5 64965f213b0a675c316b587978a9f61e
BLAKE2b-256 4ef5a6199811387493c116cb08a5e6ba949171a48f5f860065dcd9e327a188df

See more details on using hashes here.

File details

Details for the file tai42_contract-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: tai42_contract-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 134.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tai42_contract-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7ce568be1e987efe6eec6913fa501e956ad9641a81ffba0b26f8ba77f4ba1c4
MD5 26af0dcb70a0d15fb3e056ba18889bcb
BLAKE2b-256 6af73ebb2269081f52955e0ebfed1d355ba2ff4ccba1f32f06b0007af1bbf911

See more details on using hashes here.

Release history Release notifications | RSS feed

8.0.0

2 files

7.1.0

2 files

7.0.2

2 files

7.0.1

2 files

7.0.0

2 files

6.5.0

2 files

6.4.0

2 files

6.3.0

2 files

6.2.0

2 files

6.1.0

2 files

6.0.2

2 files

6.0.1

2 files

6.0.0

2 files

5.11.0

2 files

5.10.0

2 files

5.9.0

2 files

5.8.0

2 files

5.7.0

2 files

5.6.0

2 files

5.5.0

2 files

5.4.0

2 files

5.3.0

2 files

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

4.2.0

2 files

4.1.0

2 files

4.0.0

2 files

3.0.0

2 files

2.3.0

2 files

2.2.2

2 files

2.2.1

2 files

2.1.0

2 files

2.0.0

2 files

1.11.0

2 files

1.10.0

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

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