Core loop: the LLM plans, picks a tool, reads the result, and repeats until done, with a hard cap on steps.
Tools: search flights, check calendar, hold booking, pay; each with a strict JSON schema.
Separate roles: the LLM proposes; the application validates arguments, checks the user's permissions, enforces policy and rate limits, and executes.
Irreversible actions: require explicit user confirmation before paying or booking, use idempotency keys so retries never double-book, and support cancel or undo.
State: store trip constraints and decisions outside the prompt so the agent can resume after a failure.
Failure handling: tool timeouts, retries, falling back to asking the user, and logging every tool call for audit.
Evaluate on task success, tool-call accuracy, steps taken, and cost.
Loading…