Skip to content

How to Build an AI Agent for Your Organisation

Published Updated

To build an AI agent for your organisation, give it one job, connect only the tools it needs and test the result against cases your team has already handled. Start with read-only access and have a person approve any consequential action. That gives you a way to measure whether the agent helps before you let it change anything.

Pick a Task an Agent Can Own

Choose a task that repeats, has a clear stopping point and can be checked against a known result. You need to know which systems the agent may use and how the team will recover from a wrong answer. For a first build, try work where a mistake is easy to catch and reverse, such as preparing a draft for a staff member to review.

Consider a service desk that receives requests in free text. An agent could read a request, look up routing rules and suggest the right queue. Measure how often staff agree with its suggested queue and how long they spend reviewing each request. Similar candidates include preparing a weekly report from several systems and checking supplier documents against an intake checklist.

Use a fixed workflow when the same rules determine every action. For example, a workflow can route a form submission by its selected department. A chatbot is enough when staff need an answer from a policy and no further action. An agent is useful when it must choose whether to fetch another record or hand the case to a person based on what it finds.

What You Need Before You Build

Set up a test environment with permission to use each system and its application programming interface (API). Make sure the model’s data terms suit the job. Ask the people who handle the work for sample cases and agreed answers. Name the owner who can pause the agent and decide where staff approval is required.

Before sending personal information to a model, map what the agent reads, what the provider receives and what ends up in logs. Check with your privacy lead whether the proposed use or disclosure is permitted. Review provider terms and settings for retention, training, access by third parties and processing overseas. Use synthetic cases for initial tests and strip personal details the task does not need before sending it real inputs. The Office of the Australian Information Commissioner (OAIC) provides privacy guidance for commercial AI products.

Steps to Create an AI Agent

Build the shortest path from one input to a result your team can inspect. The service desk illustration assumes the agent can read a request and produce a draft for internal review.

  1. Write the instructions. Tell the agent to propose one queue, cite the matching routing rule and hand the case to a reviewer when the available information cannot settle it. Define the output fields, such as suggested queue, rule reference and reason for referral.
  2. Define one tool per operation and restrict what it can access. For example, get_request(request_id) accepts one ticket ID and returns the subject, category and a redacted description. The service desk checks the caller’s access to that ticket and rejects an ID outside the pilot queue. Use a read-only account with no update permission.
  3. Connect the approved knowledge sources. Give the agent access to the current routing policy and return the rule reference with each search result. Have it flag cases where two rules conflict or the relevant rule is missing.
  4. Choose the build platform. Microsoft Copilot Studio connects agents to tools through connectors, while n8n lets you link an AI Agent node to tools and a chat model. A code framework such as LangGraph lets you write the control flow yourself when the pilot needs custom branching or state.
  5. Add memory only if the job needs it. A request that can be routed from its ticket and the current policy can run from scratch each time. If a reviewer needs to resume a paused case, save the case ID and approval status with an expiry and access controls.
  6. Run a sample and inspect the trace, which is the record of the steps taken during the run. In this illustration, look for the call to get_request with the test ID, the returned ticket fields, the routing rule used and the final draft. The checkpoint passes when that draft names the expected queue, cites the right rule and leaves the ticket untouched.

The Model Context Protocol (MCP) tool specification describes a shared way for compatible agents to discover and call tools. If another agent needs the same service desk lookup, it can use the same MCP server. The server still has to check what each caller is allowed to read.

Add Guardrails and Human Approval

Put approval in the application that runs the agent. Before it sends a message, makes a payment, deletes data or changes a record, pause the action. Show the reviewer what will change, what evidence the agent used and the exact recipient, amount or record involved.

Execute only the version they approve and record their decision. If the parameters change, ask again. See how to design human-in-the-loop approvals for those handoffs.

Check incoming requests against expected types and sizes. Before calling a tool, validate its arguments and check that the caller can access the target. Validate the final output against the fields you expect and screen it for personal or confidential data the recipient must not see. Set rate limits and put a ceiling on tool calls and spend per run, with a separate budget for the pilot. Send work to a person when a limit stops a run.

An email, document or web page can contain text that tries to change the agent’s instructions. This is prompt injection. Treat retrieved content as data and enforce permissions outside the model, so text in a ticket can never grant permission to run a tool or release private information. Limit retrieval to approved sources where the job allows it. Test with synthetic content that tries to push the agent outside its task, and confirm the application prevents the action.

Test the Agent Before Release

Build an evaluation set from past cases with expected outcomes agreed by the people who handle them. Include routine requests, ambiguous ones and cases where the right result is to hand the work to a person. Reserve some cases for the final check. Score the share of correctly handled cases, cost per completed case and time to produce a usable result. Compare staff review time with the time staff spend doing the task manually.

Have an authorised colleague try to make the agent break its rules in a test environment. Use synthetic records and harmless actions to see whether it attempts an unauthorised lookup, skips approval or discloses restricted content. Inspect the trace as well as the final answer. A blocked action is a useful result only if you can confirm it never ran.

Agree the pilot’s release criteria before seeing the scores. For the service desk illustration, an example target is at least 95 of 100 held-out cases routed correctly or referred as expected, with zero unauthorised actions. The pilot must also stay within the agreed cost ceiling and leave staff with less work per case. These thresholds are an example for a low-risk pilot. The owner sets them for the actual job.

Start with a small group and let staff review drafts while the existing process stays available. Log every run with its ID, model and instruction version, tool calls, approval outcomes, duration and cost. Limit what those logs store and who can see them. Expand access once the pilot meets its criteria on real work. The National AI Centre’s Guidance for AI Adoption sets out testing, monitoring and human oversight practices.

Run and Improve the Agent After Launch

Give the named owner access to run traces, failure rates, spend and staff feedback. Review where staff correct the agent or take over, and turn recurring problems into evaluation cases. Version the instructions, tools and model. Before promoting a model upgrade or other change, rerun the same cases, compare accuracy, time and cost, then release to a small group with a way to revert. Use AI observability to investigate changes in behaviour over time.

Symptom What to check What to change
The agent loops Look for the same tool arguments or failure repeated in the trace. Stop on repeated calls and refer the case to a person.
It calls the wrong tool Check which tools were available and what their descriptions said. Remove tools the task cannot use or narrow their inputs.
It uses stale knowledge Check the source version in the retrieval record. Refresh the source and remove superseded copies from retrieval.
Costs jump Compare model calls, input size and tool retries per run. Limit the source material passed to the model or cap retries where they drove the increase.

Before expanding the agent to decisions about people, check the Australian Privacy Principles (APPs) under the Privacy Act 1988. The OAIC’s APP 1 guideline gives the commencement date.

APP 1.7 applies to decisions made after commencement, including under arrangements made earlier. The entity must have arranged for the program to make the decision or perform a step substantially and directly related to making it. The program must use personal information about the individual to make that decision or perform that step. The decision must be one that could reasonably be expected to significantly affect the individual’s rights or interests.

Under APP 1.8 the entity’s privacy policy must identify the kinds of personal information used. It must describe separately the kinds of decisions the program makes on its own and those for which the program performs that qualifying step. Privacy and Other Legislation Amendment Act 2024, Schedule 1 Part 15