ICAEW.com works better with JavaScript enabled.

I built my first AI Agent – using AI

Author: ICAEW Insights

Published: 29 Jan 2025

Dudley Gould, ICAEW member and VP of Business Development at Circit, explains how he utilised ChatGPT to build an AI agent that can standardise client data.

Please note that the AI agent developed in this article has been created to demonstrate a practical application and to explore how AI can be used by accountants and auditors. It is a very simple proof of concept that may produce inaccurate answers and the tool should not be relied upon for client work or replacing professional expertise. For more information on the risks and limitations of AI, see the ICAEW guidance on the risks and limitations of generative AI.

It’s still early days in the world of AI, but it’s evolving at lightning speed. Even the terminology can feel bewildering. ‘AI agents’, ‘agentic systems’, ‘co-pilots’, ’assistants’, ‘digitallabour’ – the industry is awash with terms for what often boils down to the same core idea: software that uses AI to make decisions and action them.

In my role at Circit I speak to hundreds of accountancy firms, and almost everyone I meet feels behind when it comes to AI. Technology companies themselves are grappling with what AI means for the future; no one really has all the answers. The best way to learn is by jumping in and trying it out. That’s what I decided to do over Christmas, building my first very simple AI agent. 

Technology challenges

I trained at Moore Kingston Smith and joined their newly formed data analytics team during my second year. This meant fewer audits and more Python tutorials. In a team of three, I often felt out of my depth – there’s a staggering amount of syntax to learn, plus endless battles with the terminal just to get your development environment running. I spent far more time sifting through Stack Overflow than actually coding.

With the arrival of AI-driven coding assistants such as GitHub Co-pilot, the game has changed entirely. Those little syntax nuances aren’t insurmountable hurdles any more. You can now focus on the ‘what’ and the ‘why’ of the project rather than fighting with the ‘how’. It unlocks a level of productivity that was hard to imagine before.

What are AI agents?

In simple terms, an AI agent is software that uses an AI model to reason and then act upon it. That’s where the term ‘ReAct agent’ comes from – reason and act.

It’s important to note there’s a spectrum of agents:

  • Structured ‘workflow’ agents have a more predefined path, where large language models (LLMs) are paired with specific tools or steps, so the AI has some guidelines to follow.
  • Fully autonomous agents dynamically decide what to do next, picking the right tools or processes on the fly without much human intervention.

The shift from SaaS to agents

To understand how this differs from a traditional Software as a Service (SaaS) model, imagine a manager handing an SaaS tool to a junior member of staff. The junior logs in, navigates the software, does the work, and returns the results to the manager. It’s still quite manual, even if the underlying software is powerful.

An AI agent, on the other hand, takes on much of the junior’s role. Rather than requiring a user to click through every step, the agent uses its own know-how to automatically retrieve data, analyse it, and present findings for final sign-off. This is what Microsoft CEO Satya Nadella means when he says: “AI Agents will transform SaaS as we know it.”

Ultimately, it all comes down to user experience. By handling the busywork behind the scenes, AI Agents begin to feel more like team members than just another piece of software.

The AI general ledger transformation agent

As an audit junior, I spent hours mapping client data, be it a chart of accounts or column headers, before uploading data into a tool. So that’s what I focused on for my first AI agent project: general ledger data transformation. 

Using AI for data mapping, rather than relying on hard-coded rules, offers several practical benefits, including adapting to changing inputs, reduced maintenance, scalability and, most importantly, a better user experience.

The AI provides suggestions, allowing the user to confirm or correct the mapping – something known as ‘human in the loop’. This interactive workflow makes the user experience more natural and could help the model improve over time:

  1. Upload CSV/Excel User selects a file with raw ledger data.
  2. AI Processing AI Agent analyses how each column aligns with the target schema.
  3. User Feedback The user approves or adjusts these suggestions.
  4. Transformation: The tool applies data conversions and outputs a ready-to-use file.

How I created my AI agent

  1. Choosing LangChain as the Core Framework

There are too many tools and frameworks to count, but I decided to use LangChain. It’s known for helping developers quickly build AI agents, and it has a robust ecosystem of integrations, tutorials and demos that make getting started much more straightforward.

  1. Brainstorming with ChatGPT

Before writing any code, I spent a few sessions just brainstorming with ChatGPT. I asked for instructions on how to transform a random general ledger into a standardised format. It broke the process into manageable steps – data ingestion, schema mapping, data cleaning, field transformation, validation, and so on.

inline 1 AI article guide

3. Gathering technical instructions

Once I had the broad outline, I asked ChatGPT for more detailed technical guidance: how to set up my developer environment, what dependencies to install, and how to structure my project. This acted like a personalised tutorial way more interactive than a standard blog post or video.

inline 2 AI guide article
  1. Selecting the tech stack and UI

I wanted something quick and easy to display my results. ChatGPT suggested Streamlit – a popular tool for building simple, interactive user interfaces (UIs) in Python. ChatGPT outlined exactly how to integrate Streamlit with my back-end AI logic, from installing the package to creating a basic file uploader widget so users could drag in their ledger CSV.

  1. Moving to VS Code and GitHub Copilot

Once I had the bare bones of the project in place, I switched from copying and pasting ChatGPT snippets to coding directly in VS Code with GitHub Copilot. This was a game-changer. 

Not once did I have to write a single line of code, or even copy and paste them. Whenever I needed an update, like changing how decimal fields got parsed, I’d simply add a comment, and Copilot would propose the fix. It does help, however, to have an understanding of the code you’re using, or to check the code with someone who does, to make sure it works as intended

image inline  3 Ai guide

The result

You can try the app here. Please do not use actual client data when trying it out – you can ask ChatGPT to create a demo data set.

Users can upload their raw ledger file, see AI-suggested mappings, adjust them via dropdown menus, and then click ‘Transform’. Instantly, they get a preview of the final data and can download a CSV.

Allow StreamAMG video

This video is provided by StreamAMG. We ask for your permission before anything is loaded as they place a few cookies on our site. For more information on how we handle cookies, please see our privacy policy and cookies policy. To view this content on the website, please accept and continue.

Embrace the learning curve

AI tools are becoming easier to build. The real challenge is knowing what to create. This is your time to shine by leveraging your accounting expertise. 

LLMs are incredibly smart and are only getting better. But they need access to data to work on. Connecting systems and accessing the right data remains a big challenge. 

Embrace the learning curve, it’s fun. Experimenting with AI allows you to be creative and combine your accounting knowledge with emerging tech in a way that feels fresh and rewarding.

For more on getting started, check out ICAEW’s resources on generative AI and prompt engineering, and don’t hesitate to reach out to me (dudley@circit.io) if you have questions about this project or want access to the GitHub repo.

Webinar: AI - how will it transform analytics?

On 18 February, ICAEW's Data Analytics Community is hosting a webinar where Monica Odysseos, AI and Data Lab Leader at Grant Thornton Cyprus, will explore how AI is transforming data-driven decision-making for organisations. The webinar is free to attend for ICAEW and Data Community Members and offers 1 hour of verifiable CPD.

Accounting Intelligence

This content forms part of ICAEW's suite of resources to support members in business and practice to build their understanding of AI, including opportunities and challenges it presents.

Computer screen with text relating to generative AI

You may also be interested in

ICAEW courses
Prompt engineering
Learn and grow your career

Our learning shop platform is designed to help you future-proof your skills and advance your career, with a range of courses available to purchase.

Find your course
Support
Generative AI Guide

Explore the possibilities of generative AI in accounting through ICAEW's guide to Gen AI, covering use cases, risks, limitations, ethics and how to get started.

Read more
ICAEW support
A person holding  a tablet device displaying various graphs
Training and events

Browse upcoming and on-demand ICAEW events and webinars focused on making the most of the latest technologies.

Events and webinars CPD courses and more
Open AddCPD icon

Add Verified CPD Activity

Introducing AddCPD, a new way to record your CPD activities!

Log in to start using the AddCPD tool. Available only to ICAEW members.

Add this page to your CPD activity

Step 1 of 3
Download recorded
Download not recorded

Please download the related document if you wish to add this activity to your record

What time are you claiming for this activity?
Mandatory fields

Add this page to your CPD activity

Step 2 of 3
Mandatory field

Add activity to my record

Step 3 of 3
Mandatory field

Activity added

An error has occurred
Please try again

If the problem persists please contact our helpline on +44 (0)1908 248 250