Harness

Human tools

Tools the model calls to verify the person, pass on a code, check a push or an approval, and ask what its task allows.

Give the model the human tools and it can bring the person in mid-conversation, on voice or chat, without your code handling each step. Every answer has a say line the agent can speak or write as is.

import { jsonSchema } from "ai";const tools = { ...run.tools(myTools), ...run.humanTools(jsonSchema, { methods: ["email_otp", "totp"] }) };
LanguageWhat you get
TypeScriptAI SDK tools (description, inputSchema, execute). jsonSchema turns JSON Schema into the SDK's schema; any function with that shape works.
PythonHumanTool objects: name, description, parameters (JSON Schema), callable with an arguments dict
Rubyrun.ruby_llm_human_tools: RubyLLM::Tool instances. run.human_tools: a hash of description, parameters and call

methods limits the verification methods the model may choose. Default: email_otp, sms_otp, totp, entra_push.

The tools#

ToolInputDoesReturns
scute_verify_personmethod (optional, one of methods)run.startVerification(): sends a code or a pushstatus, say, remaining_attempts while pending
scute_submit_codecode (required, whitespace removed)run.submitCode()status, say, remaining_attempts while pending
scute_check_verificationnonerun.verificationStatus(), for a push or a linkstatus, say
scute_approval_statusid (required)run.approvalStatus(id)status, say
scute_whoaminonerun.whoami()acts_for, may, could_with_more_access, needs_verification, needs_approval, expires_in, warnings

scute_whoami reports may (the task's permissions now), could_with_more_access (in the ceiling but not allowed now), and the permissions that need verification or approval. warnings contains expires_soon when the task has under five minutes left.

Errors the model reads#

The tools never throw. A failure comes back as an object:

SituationAnswer
No method given and none asked for{ "error": "method_required", "say": "How would you like to verify: a code by email or text, or your authenticator app?" }
A code or status with no verification in progress{ "error": "no_verification", "say": "Let me send you a verification first." }
Scute refused the call{ "error": "<message>", "say": "<Scute's line, when it sent one>" }

How blocked calls point at them#

Once the human tools are offered:

  • A verify verdict tells the model ... Verify them with scute_verify_person, then try again.
  • run.toolApproval (Vercel AI SDK) answers denied for verify instead of asking your UI, so the model runs the verification itself.
  • run.prepareStep and run.allowedTools() always include the human tools.
  • run.toolApproval never asks for approval on a human tool, and guards do not check them when you pass them outside run.tools().

After scute_submit_code returns completed, the model retries the original call, and the check goes through.