AI agents & tool use
AI-Native Systemsconcept · 7 मिनट · अपडेट 19 जुल॰ 2026

AI agents & tool use

लेखक Rajendra Sharma, RN, CPC, CPBसमीक्षक Rajendra Sharma, RN, CPC, CPB · 29 जून 2026

An LLM in a loop: reason, call a tool, observe the result, repeat — turning a text generator into a system that does things.

In one line

An agent is a model given tools (functions with typed parameters) and a goal; it decides which tool to call, reads the result, and continues until the task is done — the ReAct pattern of interleaved reasoning and acting.

LLM (reason) call toolAPI, search observe → loop goal
An agent runs a loop — reason, call a tool, observe the result, repeat — until the goal is met, with a human supervising high-risk steps.

From text generator to actor

A plain LLM only produces text. An agent wraps it in a loop and hands it tools — so it can search, look up a code, write to a system, or call another model — and act on the world, not just describe it. The foundational pattern is ReAct: the model alternates a reasoning step ("I need the patient's last HbA1c") with an acting step (call getObservation(...)), reads the result, and reasons again — until the goal is met.

How the loop actually runs

  1. The application declares toolssearchKosha(query), lookupConcept(code) — each with a JSON schema for its arguments.
  2. The model emits a structured tool call instead of prose.
  3. The runtime executes it and feeds the result back into the context.
  4. The loop repeats until the model produces a final answer (or hits a limit).

Tools are often delivered over the Model Context Protocol so the same tool server works across assistants.

Safety is engineering, not model magic

This is the part that matters in healthcare. None of the following come from the model — they come from how you build the harness:

  • Schema-validated arguments — reject malformed or out-of-range tool calls.
  • Scoped permissions / least privilege — the agent can only touch what its task needs.
  • Human-in-the-loop confirmation for consequential actions (anything that writes, orders, or sends).
  • Loop limits & budgets — prevent runaway or looping behaviour.
  • Full audit logs — every tool call recorded, for review and accountability.

Multi-agent systems are just this pattern composed — specialist agents calling each other as tools — which multiplies both the capability and the need for the controls above.

Where it shows up in digital health

  • Prior-authorisation drafting that reads payer policy and the chart.
  • Data-quality agents that scan records and flag issues.
  • Lab tutors that inspect a learner's working state before hinting — Vaidya in this platform's labs reads your mapping state as a tool call, never as guesswork.

The non-negotiable in health: agents act under least privilege, on synthetic or consented data, with every action logged, and a human owns any decision that affects a patient (see AI ethics & governance).

Common pitfalls

  • Giving broad write access "to be helpful" — scope tools tightly; an over-powered agent is a liability.
  • No human gate on irreversible actions — confirmation isn't optional for orders/sends.
  • Trusting tool output blindly — a tool can return wrong data; the loop should validate.
  • Unbounded loops — always cap steps and cost.

Key takeaways

  • An agent = LLM + tools + a goal, run in a reason→act→observe loop (ReAct).
  • Capability comes from tools; safety comes from the harness (schemas, scopes, human gates, logs).
  • MCP standardises how tools are exposed to agents.
  • In health: least privilege, synthetic/consented data, audit everything, human owns the call.

अपना स्मरण जाँचें

2 में से 0 याद

दोबारा पढ़ने से बेहतर है सक्रिय स्मरण — पहले उत्तर सोचें, फिर देखें।

  1. What turns an LLM into an 'agent'?

  2. In an agent, where does safety actually come from?

संदर्भ

  1. Yao et al. — ReAct: Synergizing Reasoning and Acting (2022)

संबंधित entries