Define the models
Keep shared contracts in the rootmodels/ directory. Use Annotated to place media limits beside the field they protect.
models/conversation.py
Attach the contract
- Agent
- Server tool
- Client tool
agent.py
Choose content parts
Media constraints cover the values relevant to each type, including MIME type, byte size, dimensions, duration, pages, frame rate, channels, animation, and archive expansion.
Send media by reference
1
Upload into the session
The session must already exist. Harnest returns an opaque
assetId.2
Reference the asset
Enforcement and privacy
Client-supplied media metadata is never trusted. Asset access is bound to the authenticated user and session; deleting the session also deletes its assets.
See Checkpoints and storage and Neutral API.