On this page
In short
- Use agents for multi-step work that gathers information and prepares an output. Keep single-step tasks as simpler, fixed pipelines.
- An agent's risk is set by its tools, not its prompt. Give it the narrowest tools and credentials the task needs.
- Reads can run freely; writes that are hard to undo, or that leave the company, wait for a person to approve them.
- Log every tool call, cap steps and spend, and test the agent on a fixed set of tasks before and after every change.
What an agent is, in practical terms
Every major provider's API supports tool use (also called function calling): you describe a set of tools, the model decides which to call and with what arguments, your code runs the call and returns the result, and the model continues until it has an answer. An agent is that loop, plus instructions, plus a set of tools chosen for a job.
The model never touches your systems directly. Your code runs every tool call, which means your code decides what's allowed. That's the lever every guardrail in this guide pulls on. For an assistant that only reads documents, see connecting AI to your internal data safely.
Where agents help inside a company
Good first candidates share three traits: the work is mostly gathering and assembling information, a person already reviews the result, and a mistake is caught before it matters.
Internal tasks that suit an agent, and what it produces
Answer questions about internal policies and procedures
- Tools it needs
- Search over approved documents
- Output
- Answer with links to the source sections
Prepare a weekly quality or production summary
- Tools it needs
- Read-only queries on reports and databases
- Output
- Draft summary for a manager to edit
Triage IT or facilities requests
- Tools it needs
- Read the ticket, look up assets and past tickets
- Output
- Suggested category, priority and next step
Research a supplier or customer issue across systems
- Tools it needs
- Read-only lookups in the relevant systems
- Output
- Timeline of what happened, for a person to act on
Keep procedures consistent
- Tools it needs
- Read procedures and change requests
- Output
- Flagged conflicts and a proposed redline
| Task | Tools it needs | Output |
|---|---|---|
| Answer questions about internal policies and procedures | Search over approved documents | Answer with links to the source sections |
| Prepare a weekly quality or production summary | Read-only queries on reports and databases | Draft summary for a manager to edit |
| Triage IT or facilities requests | Read the ticket, look up assets and past tickets | Suggested category, priority and next step |
| Research a supplier or customer issue across systems | Read-only lookups in the relevant systems | Timeline of what happened, for a person to act on |
| Keep procedures consistent | Read procedures and change requests | Flagged conflicts and a proposed redline |
Notice that every output is a draft or a suggestion. That's deliberate for a first agent. Once its drafts are consistently accepted with few edits, you can consider letting it take some actions itself, with the controls below.
Tool permissions: the real guardrail
Instructions like "never delete records" are requests, not controls. The dependable guardrail is what the agent's tools can physically do. Design tools the way you'd design access for a new contractor.
- Narrow tools, not generic ones.
get_open_quality_holds(line)is safer and more reliable thanrun_sql(query). The tool enforces the scope, so the prompt doesn't have to. - Separate read and write tools. An agent typically needs many read tools and few, if any, write tools. Keep them in different lists so you can grant them separately.
- The agent's own credentials. Each agent runs as a service identity with only the permissions its tools need, never with an administrator's or the requesting user's full access.
- Respect the requester's access. When an agent acts for a person, check that person's permissions too, so the agent can't become a way around them.
- Validate every argument. Tool code checks inputs like any API would: allowed values, record ownership, sensible sizes.
The Model Context Protocol (MCP), an open standard for connecting AI applications to tools and data, is supported by a growing number of AI tools. It's a convenient way to package tools once and use them with several models, but the same rules apply: an MCP server's permissions are the agent's permissions.
Human approval for actions
Sort every tool the agent could use by what happens if it's used wrongly, and let that decide whether a person approves it first.
Approval levels by type of action
Read
- Examples
- Search documents, query reports, look up a record
- Approval
- None; logged
Draft
- Examples
- Write a summary, prepare a reply, propose a change
- Approval
- None to create; a person uses it or not
Reversible internal write
- Examples
- Add a note, set a category, create a draft ticket
- Approval
- Optional, once measured accuracy supports it
Hard to reverse or external
- Examples
- Send email outside the company, change master data, anything involving money
- Approval
- Always, by a named person, before it runs
| Action type | Examples | Approval |
|---|---|---|
| Read | Search documents, query reports, look up a record | None; logged |
| Draft | Write a summary, prepare a reply, propose a change | None to create; a person uses it or not |
| Reversible internal write | Add a note, set a category, create a draft ticket | Optional, once measured accuracy supports it |
| Hard to reverse or external | Send email outside the company, change master data, anything involving money | Always, by a named person, before it runs |
- Approval happens in code. When the agent calls a gated tool, the call is paused and queued; it runs only after a person approves it in a screen that shows exactly what will happen.
- Show the reasoning and the evidence. The approver sees the proposed action, the arguments and the sources the agent used, not just "Approve?".
- Approvals are specific. Approving one email doesn't approve the next one.
A reference design
The model proposes; the gateway decides. Nothing reaches an internal system without passing the gateway.
Runtime limits
- A maximum number of steps per task, after which the agent stops and hands over to a person.
- A spending cap per task and per day, with usage tracked per agent.
- Timeouts on every tool call, and a clear failure message when one fails.
- A way to switch an agent off immediately without a deployment.
Treat everything the agent reads as untrusted
An agent reads documents, tickets, emails and web pages, and any of them can contain text written to redirect it (prompt injection). OWASP's guidance on the risk notes that it's unclear whether any method prevents it completely, so the defense is in the design.
- Don't combine, in one agent, the ability to read untrusted outside content and the ability to send data outside the company.
- Keep instructions in the system prompt and treat retrieved content as data, clearly separated.
- Gate outbound and hard-to-reverse actions behind approval, as above, so an injected instruction still stops at a person.
- Include injection attempts in your test set, and check that tool permissions hold even when the model is fooled.
Audit logs and evaluation
When someone asks "why did the agent do that?", you need to be able to answer from the record. And when you change a prompt, a tool or a model, you need to know whether the agent got better or worse.
What to log for every task
- Who or what triggered it, and when.
- The model and version, the instructions version and the tool list in effect.
- Every tool call with its arguments, result and duration.
- Every approval or rejection, and who made it.
- The final output, and any edits a person made to it.
- Token usage and cost.
- Build a set of realistic tasks with known good outcomes, including edge cases and a few deliberate injection attempts.
- Score the final outputs, and check the path too: did it call the right tools, stay within its permissions and stop when it should?
- Rerun the set before any change to the prompt, tools or model goes live, and compare with the last run.
- Add real tasks where a person rejected or heavily edited the output, so the set tracks what actually goes wrong.
Have a process in mind for an agent?
Tell us which process takes too many steps across too many systems. On a scoping call we'll talk through the tools it would need, where approvals belong, and what a fixed-price build would cover.
Not ready to talk yet? Draft a project brief first
Choosing a model provider
Claude, OpenAI, Gemini and Grok all support tool use, and we've integrated all four providers' APIs. How well each handles your tools, instructions and edge cases is something to measure on your own evaluation set rather than assume, and the answer can change with each model release. Keep the provider behind one internal interface so switching or comparing is a configuration change, and weigh hosting options, such as access through Amazon Bedrock, Google Cloud Vertex AI or Microsoft Azure, and data-use terms alongside quality.
Our own product, Round Table, runs Claude, ChatGPT, Grok and Gemini side by side in one conversation, with usage tracking (token accounting) built in. Our experience also includes AI agents, agent skills, and AI-driven policies and procedures. See AI integration for how we'd approach your process, and AI Velocity Training if your developers want to work with coding agents themselves.
Sources
- Tool use with Claude (Anthropic)
- Function calling (OpenAI)
- Function calling with the Gemini API (Google)
- Function calling (xAI)
- What is the Model Context Protocol? (MCP project)
- LLM01: Prompt injection and LLM06:2025 Excessive Agency (OWASP GenAI Security Project)
- Cloud hosting: Claude on Amazon Bedrock, models on Vertex AI, Azure OpenAI
About the publisher
Published by Webb Technologies, drawing on 15+ years of professional software development. Our experience includes document and email processing, classification, summarization, automated workflows and AI agents with Claude, OpenAI, Grok and Gemini APIs. Round Table, our live multi-agent platform, runs at round-table.ai (opens in a new tab).
See it applied
- Demo with simulated data. Not client work.Try the AI workflow demo →Invoices read, checked and routed to a review queue, with thresholds you can move. It runs in your browser.
- Illustrative sample. Not client work.See a sample scope for an AI workflow →An invented supplier-invoice intake with a person reviewing low-confidence items and large amounts, on the company's own AI provider account and accepted on a labeled test set of its own invoices.
Share this guide
Related services
Topics