models/ and lib/ contain shared Python used by the agent bundle. Unlike tools, subagents, MCP clients, and extensions, neither folder is capability discovery.
models/
Put shared Pydantic contracts under root models/ and import them through the compiler-owned harnest.models namespace. For example, models/orders.py becomes harnest.models.orders:
models/orders.py
__init__.py.
Accept multimodal data
Validate images, audio, video, files, and custom data with Pydantic.
Store and retrieve media
Choose a named store and access scoped assets.
lib/
Put ordinary reusable implementation under root lib/ and import it through harnest.lib. For example, lib/storage/queries.py becomes harnest.lib.storage.queries, while the discovered tool stays under tools/:
lib/ is root-only.
Add third-party packages used by either namespace to the agent’s pyproject.toml. Add __init__.py only for intentional library initialization, not to make discovery work.