Skip to main content
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
Use these contracts for agent, graph, tool, and client-tool input or output. The folder is root-only and needs no __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/:
Library functions do not become tools or agents by themselves. The same namespace works in compilation, tests, evals, and serving. 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.