Skip to the page

Agents and tools · senior

Agents that act: rules in code and human approval

An agent that can spend money or change data needs business rules inside its tools, risk-based human approval and a design that covers hand-off, logging and measurement.

The notes

What you must know

  • A rule that lives only in the prompt can be argued around. A customer message that persuades the agent is a form of direct injection.
  • Put rules in code inside the tool: status and policy checks, amount at most the order value, limits per customer and per day, and an idempotency key so it cannot pay twice.
  • Human approval by risk: automatic for small actions that pass every rule, and a pending request for anything above the limit or unclear. The run pauses with its state saved.
  • First response to an incident: pause or limit the tool, review every action taken, recover what you can and inform finance and support leads.
  • A support agent design: load the user's identity and active orders first, route by intent, use fixed flows for the biggest intents and an agent with tools for the long tail, plus RAG over policies.
  • Hand over to a person on low confidence, a request for a human, anger, or money above limits, and pass a summary and the trace.
  • Mask personal data in logs and refuse off-topic requests politely.
  • Measure that it helps: resolution without a human, repeat contact, escalations, cost per case, and quality by language.

The red pen

Common traps: mistake → fix

  • Mistake: Tell the agent never to refund without a reason

    Fix: enforce it in the tool code.

  • Mistake: Human approval on every action is the safe design

    Fix: approve by risk, so people see the cases that matter.

  • Mistake: Success means the agent says it is done

    Fix: check the end state.

Easy to hard

Questions interviewers ask, easy to hard

  1. Our agent refunded 40,000 rupees because a customer asked. What went wrong?
  2. How should human approval work?
  3. Design a support agent for a food-delivery app.
  4. When does the agent hand over to a human?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview