An agent is useful when a task has enough variation that software must decide which step or tool to use next. That flexibility also creates more ways to fail. The practical question is not whether an agent can produce an impressive demonstration. It is whether a specific workflow can meet a quality bar, respect its permissions, and be supervised at a cost that makes sense.
This guide is for business owners and product teams planning an agent that can read information, prepare work, or take action in connected systems. It gives you a way to scope the first use case, choose an implementation pattern, and decide when the system is ready for real users. It does not assume a particular model or vendor.
Start with a task, not a technology#
Write down the job in one sentence: “Given a new inbound inquiry, prepare a short account brief and draft a reply for a sales representative to review.” That is narrow enough to observe and evaluate. “Automate sales” is not.
Map the existing work before changing it. Who starts the task? Where do they find reliable information? Which judgment calls are routine, and which require a person? What happens when the data is missing or the customer asks for an exception? Record a baseline sample of completed work and the time spent correcting mistakes. Without that baseline, there is no credible way to judge a pilot.
Use the simplest system that can do the job:
| Situation | First pattern to consider | Why |
|---|---|---|
| Steps and rules are known | Conventional automation | Behavior is easier to test and explain. |
| A person needs an answer from approved documents | Search or retrieval-assisted answer | No external action is necessary. |
| A model must choose among tools or steps | Bounded agent | The task requires flexible decisions. |
| Several specialists must coordinate over time | Orchestrated workflow | State, ownership, and recovery become explicit. |
Do not add multiple agents because the architecture sounds advanced. Split a workflow only when separate roles, permissions, or evaluation criteria make it clearer.
Define the agent's operating contract#
A one-page contract prevents a prototype from silently expanding into a system that can act beyond its purpose. For each proposed use case, specify:
- Trigger and owner. What starts a run, and who is accountable for its result?
- Allowed inputs. Which records, documents, and user messages may it read? Are they current and permissioned?
- Expected output. A draft, recommendation, classification, or completed action? What format must downstream systems accept?
- Tool permissions. Which exact operations are available? Separate read, create, update, and delete permissions.
- Approval boundary. Which actions need a person to confirm, and what evidence must that person see?
- Failure path. When should the agent stop, retry, ask a question, or hand off to a person?
- Success measure. Which task outcomes, error types, review time, and costs will determine whether to continue?
For an inquiry brief, the agent might read a submitted form and public company page, draft a summary, and cite the inputs it used. It should not send email or edit the CRM at first. A reviewer can accept, edit, or reject each brief and label the reason. Those labels become evaluation data.
Build around explicit boundaries#
A production design has more than a model prompt. The application authenticates the user, retrieves only permitted data, validates tool arguments, performs actions through server-side code, and records what happened. The model can propose a tool call; application code decides whether it is allowed.
A useful sequence is: receive a task, load approved context, let the model choose from a small tool set, validate the proposed call, run the tool, inspect the result, and either finish or request review. Set limits on steps, time, and spend. Plan what happens when a tool times out, a provider is unavailable, or a run is interrupted. Use idempotency or equivalent safeguards where retries could create duplicate records or messages.
Keep knowledge separate from instructions
Retrieval-augmented generation can help an agent answer from current documents. It does not make the answer automatically correct. Store document ownership and update dates, enforce access at retrieval time, and include source references that a reviewer can open. Test missing, conflicting, outdated, and maliciously edited documents. Fine-tuning may help with a stable output style or specialized behavior, but it is not a substitute for access to current facts.
Treat web pages, uploaded files, email, and retrieved documents as data from another trust level. Their text can contain instructions that attempt to redirect the agent. OWASP's prompt injection guidance describes why retrieval and fine-tuning do not eliminate this risk. Restrict the tools and data available to the run, and test the boundary with adversarial inputs.Choose a framework for the workflow you have
Framework names change faster than the core engineering questions. Compare a small representative implementation on tool control, persistence, review pauses, trace visibility, deployment, and team familiarity.
| Option | Useful capability to evaluate | Check before adopting |
|---|---|---|
| OpenAI Agents SDK (Python) | Tools, handoffs, guardrails, sessions, and tracing | Where authorization runs and what trace data is retained. |
| LangGraph | Stateful orchestration, persistence, and human review | Checkpoint storage, recovery, and operational complexity. |
| Vercel AI SDK | TypeScript agent loops and streaming interfaces | Tool validation, step limits, and server deployment fit. |
These are implementation options, not a universal ranking. A straightforward application function with a model call and carefully controlled tools may be the clearest first version.
Use MCP deliberately
Model Context Protocol describes a common interface for exposing tools and context. It can reduce integration work when a suitable client and server exist, but a protocol does not grant safe access by itself. Review server ownership, scopes, authentication, tool descriptions, network access, and the data each tool returns. Treat a third-party MCP server like any other connected application with privileges.Design approval and security into the workflow#
Start with the smallest permissions that support the task. A draft is safer to test than a sent message; a record lookup is safer than an unrestricted update. For writes, validate the user's authority at execution time, not only when the model chooses a tool. Show the reviewer the proposed action and relevant evidence before approving a consequential change.
Define what counts as consequential for your organization. Sending customer messages, changing prices, issuing refunds, altering access, or deleting records usually require stronger controls than summarizing a document. If a human approval step is essential, test that it works during retries, timeouts, and handoffs. The OpenAI Agents SDK handoff documentation notes that guardrails do not automatically cover every handoff; the application must enforce authorization before side effects. Consider the information retained in logs and traces. They are useful for debugging, but may contain customer data or tool outputs. Limit access, set retention rules, and check your provider's trace behavior before enabling detailed logging. The OpenAI tracing documentation explicitly calls out sensitive-data considerations. For a broader risk process, the NIST AI Risk Management Framework and its generative AI profile organize work around governing, mapping, measuring, and managing risk.No prompt or guardrail guarantees that an agent will not invent an answer or follow a malicious instruction. Technical permissions, review, evaluation, and incident response have to work together.
Evaluate against real work#
Collect a representative set of tasks before launch, including ordinary requests, incomplete information, conflicting sources, ambiguous instructions, and attempts to cross permission boundaries. Remove or protect sensitive data in evaluation fixtures. Keep this set fixed for comparisons, then add new failures as they are discovered.
Score the final result and the path taken. An agent can give a plausible answer while calling the wrong tool, reading a record it should not see, or making an unnecessary update. Review traces and tool events alongside the final text.
| Measure | What to record |
|---|---|
| Task acceptance | Share of outputs a qualified reviewer accepts without material correction. |
| Correction effort | Reviewer minutes and common reasons for edits. |
| Unsafe attempts | Forbidden tool calls, data exposure, or actions attempted without approval. |
| Grounding | Unsupported statements and broken or irrelevant source references. |
| Reliability | Timeouts, retries, duplicate actions, and incomplete runs. |
| Operating cost | Model use, tool fees, hosting, review time, and support. |
Agree on pass thresholds for the actual workflow. A draft assistant may tolerate some edits; a system that changes a financial record needs a much stricter standard. Do not report a single “accuracy” score without saying what was tested, by whom, and on how many cases.
Roll out in controlled stages#
Stage 1: Offline evaluation. Run the agent on historical or synthetic cases without affecting live systems. Fix the common errors and permission failures. Confirm that the reviewer can understand each result. Stage 2: Shadow use. Process live tasks in parallel with the existing workflow, but do not let the agent's output change customer records or messages. Compare results with the human process. Stage 3: Assisted use. Give a small group drafts or recommendations. Require review and collect accept, edit, and reject reasons. Watch how much time the review actually takes. Stage 4: Limited action. Allow narrowly defined writes only after quality, authorization, retry, and rollback behavior meet the agreed standard. Set volume and spend limits. Keep a fast way to pause the workflow. Stage 5: Operate and revisit. Assign an owner for prompt, tool, and model changes. Re-run evaluations when any of these change. Monitor failure rates, cost, latency, user feedback, and the work still done by people. Review incidents and retire workflows that do not earn their operating cost.There is no universal five-day pilot or guaranteed payback period. Integration quality, data cleanup, approval design, and the cost of failure determine the schedule.
Estimate value without invented ROI#
Use observed work to build a business case. For a draft-producing agent, estimate monthly value as the number of usable drafts multiplied by the time saved per accepted draft and the value of that time. Subtract model, infrastructure, integration maintenance, reviewer time, and error recovery costs. Count a benefit only when the changed workflow produces it.
For example, if a team processes 200 inquiries a month and a pilot shows that 100 accepted briefs each save four reviewer minutes, the measured time saving is 400 minutes per month. That is a hypothetical calculation, not a forecast for your business. The next question is whether those minutes are valuable enough, after review and operating costs, to justify continued use. If the answer is no, simplify the task or stop the pilot.
For customer-facing work, include quality and trust in the decision. A faster reply is not a win if it is wrong, intrusive, or hard to correct. Keep a way for users to reach a person and for staff to understand what the agent did.
A planning worksheet for the first pilot#
Before choosing a vendor or writing code, fill in these lines with the process owner:
- Task: What exact request does the agent handle?
- Current process: How is it done now, and what evidence establishes the baseline?
- Inputs: Which data sources are allowed, who owns them, and how current are they?
- Output and reviewer: What will the agent produce, and who can accept it?
- Permissions: Which tools can it read or write? What is explicitly out of scope?
- Failure rule: When does it stop and hand the work to a person?
- Evaluation set: Which normal and difficult cases will be tested?
- Release threshold: What quality, risk, cost, and latency results must be met?
- Owner after launch: Who investigates failures, approves changes, and can pause the system?
