SaaS & TechnologyAgentic AIEnterprise client (anonymized)

AI agents cut account setup from 15 minutes to under 1 and LLM API spend by 90%

Two AI agents generate onboarding and password-reset scripts on serverless AWS; script caching cut OpenAI API costs 90% and setup time to under a minute.

account setup time per user
15 min to < 1 min
reduction in OpenAI API expenses through script caching
90%
of transactions handled a month
Tens of thousands
security incidents reported after deployment
0
Illustration of a sign-in form with username and password fields, a sync icon and a green check mark

Client story

We implemented an AI-powered identity management system for an enterprise client. The goal was to automate account registration and password management using OpenAI’s API, with a caching mechanism to keep costs down and throughput up.

Challenge

Enterprises struggle with the manual workload of onboarding new users and handling password changes. These tasks are repetitive, time-consuming, prone to human error and scale poorly. We set out to build AI agents that handle them automatically, securely and at scale.

Solution

We built two AI agents and integrated them into the enterprise identity management platform:

  1. AI account registration agent. Automates user onboarding. It uses predefined templates for user information such as roles, permissions and contact details, and calls the OpenAI API to generate JavaScript scripts that interact with web forms and APIs to complete registration.
  2. AI password management agent. Automates password changes across enterprise systems. It analyses the structure of each target website and generates context-aware scripts for password resets, again through the OpenAI API.
  3. Caching mechanism. To reduce cost and improve performance, we built a cache for AI-generated scripts. Frequently used scripts are stored and reused, which sharply reduces calls to the OpenAI API.
  4. AWS cloud backend. The backend runs on AWS in a serverless architecture for script execution and secure credential storage.

Agent workflow

For account registration, the agent takes HR data such as name, role and email, then generates and executes automation scripts tailored to each web form. Successful registrations update the identity database automatically. For password management, users request a change through a self-service portal; the agent analyses the target website, generates the necessary scripts and executes them securely.

Caching optimization

The cache stores script prompts and their results, which removes redundant API requests. This produced a significant drop in OpenAI token usage and overall API spend.

Security measures

  • Agents authorize with OAuth 2.0 tokens.
  • All cached scripts and credentials are encrypted with AWS KMS.
  • Audit trails and real-time monitoring are enabled for security and compliance.

Architecture and tech stack

The system is serverless on AWS. Lambda executes the generated scripts, DynamoDB and S3 hold the script cache and artefacts, KMS encrypts credentials and cached scripts, and the agents call the OpenAI API for script generation.

  • OpenAI API
  • Python
  • JavaScript
  • AWS Lambda
  • Amazon DynamoDB
  • Amazon S3
  • AWS KMS
  • OAuth 2.0

Results

  • Account setup time fell from 15 minutes to under a minute per user.
  • OpenAI API expenses fell by 90% thanks to caching.
  • The system handles tens of thousands of transactions a month with high reliability.
  • No security incidents have been reported since deployment.

Combining OpenAI’s API, a robust caching layer and secure AWS infrastructure produced a solution that is efficient, cost-effective and secure. AI script caching, secure cloud execution and automated identity workflows are the patterns we now reuse for AI agent deployments in enterprise environments.

What made it work

Erbis’s takeaways from this engagement:

  • Cache what the model generates. Most onboarding and reset tasks repeat, so storing prompts and resulting scripts removed the bulk of LLM calls without changing agent behaviour.
  • Give each agent one narrow, templated job. Predefined templates for roles, permissions and contact details kept the generated scripts predictable and easy to verify.
  • Treat guardrails as infrastructure. OAuth 2.0 authorization, KMS encryption and audit trails were designed in from the start rather than added after the first incident.
  • Match execution to the workload. Serverless script execution absorbs bursty onboarding volumes without idle capacity.
Related

More from SaaS & Technology

Have a similar problem?

Tell us about the operation, the systems it runs on and the outcome you need. We will say directly whether custom AI is the right move.

AWS partner · Databricks partner · ISO 27001 · You own the code from day one