Agents and Tool Use

Suman SharmaSuman Sharma

Agents and Tool Use

An agent is a model that can take actions: search, query a database, run code, call an internal API.

The useful version is boring: a loop with a small tool list and a stop condition.

Robot hand reaching toward light — agents that take real actions

A simple agent loop

  1. Read the user request
  2. Decide: answer now, or call a tool
  3. Run the tool
  4. Inspect the result
  5. Repeat until done or a max-step limit hits
max_steps = 5 tools = [search_docs, get_order, create_ticket]

What to constrain

  • Which tools exist — fewer is safer
  • What arguments are allowed — schemas, not free text
  • How many steps — agents love to wander
  • What success looks like — validate tool output before sending it back to the model

When you should not use an agent

If one retrieval + one generation answers the question, skip the agent.

Extra tool calls add latency, cost, and new failure modes.

Next

Once the system can act, you need to know if it is any good:

Contact

Get in Touch

Want to call me? book a call and I'll respond in the available time slot. I will ignore all soliciting.