Gradient Labs uses AI agents to resolve complex customer issues in financial services

Temporal enables engineers to focus on building our AI agent, rather than building the basics around the agents.

Gradient Labs White Logo

Industry

High Tech

Use Case

AI Agents

Company Size

<50

SDK

-

Temporal

Cloud


The Customer

Gradient Labs is a startup based in London that is building a customer operations AI agent for financial services. Its three co-founders previously worked together in data and machine learning at Monzo, the largest neobank in the UK, where they spent most of their time focusing on customer operations and financial crime.

Gradient Labs was born after they witnessed the high-risk, high-impact domain of customer support in banking: LLMs were beginning to emerge, and they realized AI could resolve challenges related to complex support procedures in insurance, banking, wealth management, and crypto.

Gradient Lab’s AI agents solve 40-60% of cases out of the box, which grows to 80% with further optimisation, a leading statistic in the industry. It consistently achieves higher Customer Satisfaction scores than human agents as well. Their business is growing quickly after raising their seed round from LocalGlobe and various angel investors.

The Challenge

The Engineering team, led by co-founder and CTO Neal Lathia, knew early on that an agentic architecture would pose different challenges. Like traditional distributed systems, agents can fail in a whole host of ways. But they can also succeed badly in a whole host of ways.

For example, if the third of many chained API calls to an LLM provider succeeds, the output may be invalid and the call may need to be retried - without retrying the sequence of LLM calls that have happened so far. Without a tool like Temporal, engineers would have been responsible for defining that retry behavior and solving for error handling.

Lathia wanted AI Engineers to focus their attention on building the AI agent—like prompt engineering and evaluations—not error handling and scaling.

It’s easy to end up in a murky state where AI folks have to build both an agent and the scaffolding to run all of its basic behaviors. It can become a diminished focus that slows you down” –Neal Lathia, Co-Founder & CTO

The Solution

The first engineer to join Gradient Labs had previously worked with Cadence, Temporal’s predecessor. They began to explore Temporal Cloud early in their product development. They built a new prototype agent with Temporal. They evaluated:

  • Did the agents get the same outcomes?
  • Did Temporal add complexity or obscure their understanding of the system?
  • How easy was debugging?

It was immediately clear that with Temporal, the workflows were faster to implement, and it was easy to identify which areas needed attention. They decided to adopt Temporal Cloud, as they’re a small team and didn’t want to manage the Temporal Server themselves.

Being able to observe Workflows in depth during evaluations enables us to see exactly where things were doing well or needed attention.

The current system is composed of multiple agents that perform distinct jobs, such as:

  • Handling customer service conversations
  • Evaluating the performance of the customer service agent
  • Editing customer service content and knowledge bases

Temporal orchestrates these workflows and allows the agents to execute their tasks reliably.

Gradient Labs Agent Architecture

The Results

Temporal enables Gradient Labs’ customer support agent, Otto, to behave more like a human. Every conversation Otto handles across live chat, emails, and tickets is a Temporal Workflow. The agent can easily:

  • Check back on the customer later if they’re being unresponsive, using a Temporal timer.
  • Remember a conversation that’s occurred over hours or days, with Temporal’s state maintenance.
  • Perform tasks the customer requests, like upgrading an account to premium or checking on the customer’s recent payments, using Temporal’s durable API calls to the organization’s APIs.

Without Temporal, these tasks would require complex “spaghetti” code and would be prone to reliability challenges.

On the platform side, there's the promise [with Temporal] that things run reliably. And on the AI engineer side, you can write your prompt, run it, and if something comes back that is not good, Temporal just throws an error and it will get retried.

From an engineering perspective, Temporal provides unique values for each of Gradient Labs’ teams:

  • AI engineers can write a prompt, and it just runs. When an LLM returns a bad response, the Temporal Workflow automatically throws an error and retries it, without the AI engineer having to code any of this behavior. Additionally, AI Engineers have been empowered to deploy side agents that do other tasks which communicate with the platform via Temporal Cloud.
  • Platform engineers can easily log and observe all LLM responses, plus monitor the reliability of Workflows.
  • Backend engineers can modify the behavior of AI agents without involving the AI team. For example, if a customer wants their agent to behave differently, such as checking in on a conversation every 30 minutes instead of every 10, the backend engineer can easily make this change.

The Takeaways

Temporal lets Gradient Labs’ engineers deliver greater value. In doing so, the startup can help financial institutions more effectively solve their high-stakes customer issues.

Looking to build reliable AI agents just like Gradient Labs did? Start today with a free trial of Temporal Cloud and $1,000 in credits.

Build invincible apps

Ready to learn why companies like Netflix, Doordash, and Stripe trust Temporal as their secure and scalable way to build and innovate?