The autonomous agent decides with every tool
ProvenThe autonomous agent SHALL receive the customer's message and certificate image, and SHALL decide through read-only tools: list_pets, check_vaccines, check_kennel, find_alternative_dates, and final_decision (confirm, offer_alternatives, or needs_human). Its loop SHALL stop at the final decision, a repeated call, an answer without a tool call, or 12 model calls. Any stop other than a final decision SHALL count as needs_human.
Scenarios
- Agent confirms after checking
WHEN the agent lists the pets, checks vaccines and the kennel, and calls
final_decisionwithconfirmTHEN the outcome is
confirmafter four model calls, and nothing is written to the database - Repeated call
WHEN the agent calls
check_kenneltwice with the same argumentsTHEN the run stops as
needs_humanwith a stuck reason - Vaccine check uses records on file and from the certificate
WHEN the agent passes a bordetella record read from the certificate, and the records on file hold rabies and DHPP
THEN
check_vaccinesjudges all three together
Tests (5)
- passedbackendtests.test_autonomous::test_agent_confirms_after_checking0.29 s
- passedbackendtests.test_autonomous::test_repeated_call_stops_as_needs_human0.09 s
- passedbackendtests.test_autonomous::test_answer_without_a_tool_is_needs_human0.04 s
- passedbackendtests.test_autonomous::test_vaccine_check_combines_on_file_and_certificate_records0.02 s
- passedbackendtests.test_autonomous::test_unknown_pet_is_an_error_the_agent_can_read0.07 s