06 / Agent creation

The agent definition stays readable.

The JSON defines what the model should return, then hands the repeatable work to a Cargo-AI tool.

The tool is a custom Rust binary behind the Cargo-AI contract. It can be tiny, or it can become a super tool with as much deterministic capability as the workflow needs.

Input

One photo

The agent handles a single animal photo per run so the workflow is easy to inspect.

Schema

Six fields

image_name, animal, count, confidence, garden_risk, and notes.

Action

record_finding

When the model has a finding, the action calls the Cargo-AI tool.

Tool

CSV super tool

The tool creates the CSV, checks headers, and appends durable rows.