Skip to main content
Use models/ for shared Pydantic contracts and lib/ for reusable Python. Neither folder is scanned for capabilities.

models/

Import root models/ files through harnest.models. For example:
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/

Import root lib/ files through harnest.lib. Keep discovered tools in tools/:
1

Create lib/storage/queries.py

lib/storage/queries.py
2

Create tools/lookup_order.py

tools/lookup_order.py
These imports work in compilation, tests, evaluations, 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.

API reference

Reference: harnest.agent.