Confidential client, name withheld under NDA

Built a Redis-Powered Deterministic Lead Gen AI Runtime for a US Lead Generation SaaS Company

Quick answer: A deterministic AI agent runtime keeps workflow state and session memory in Redis, so agents make consistent, auditable decisions while scoring and routing leads. Bacancy Technology built it for a US B2B lead generation SaaS serving millions of users.

Outcomes deliveredDelivered March to August 2025 by a team of 3 developers
30%

Less time to qualify a lead

Deterministic AI workflows

40%

Lower lead processing response time

Redis caching and real-time pipelines

20%

Higher lead conversion

From automated lead routing

Client name withheld under NDA. To honour our non-disclosure agreement and compliance obligations, we describe this client by industry and region only. The project scope, technology and outcomes are shared without details that could identify them.

About the Client

The client is a global B2B lead generation SaaS platform that serves millions of users. Its AI agents power lead discovery, sales content generation and negotiation workflows. The client needed every agent decision to be consistent, reproducible and auditable, with strict control over cost.

Agent decisions varied across lead workflows. Real-time lead data risked latency, throughput and memory bottlenecks. Session memory also had to hold across multi-step interactions while lead volumes kept growing.

A 3-person Bacancy Technology team built a deterministic AI agent runtime on Redis, Python and FastAPI. It keeps agent state and session memory in Redis and processes lead data in real time. Containerized microservices scale the agent workloads as lead volumes grow.

Client type
B2B lead generation SaaS
Industry
Information Technology
Location
USA
Team
3 developers
Timeline
March 2025 to August 2025
Project size
Non-disclosable

Challenges & Solutions

Our engineers solved each runtime problem as one part of a single, auditable lead workflow.

Challenge 1: Keeping agent decisions consistent across workflows

AI agents made inconsistent decisions across the client's lead generation workflows.

Solution: Our engineers built Redis-backed deterministic state management. Agents now behave the same way across workflows and user sessions, so every decision can be reproduced and audited.

Challenge 2: Processing lead data in real time

Real-time lead data hit latency, throughput and memory bottlenecks.

Solution: Our data engineers designed real-time pipelines for low-latency lead ingestion. Leads are qualified and routed faster, with Redis caching cutting infrastructure latency.

Challenge 3: Holding session memory across multi-step interactions

The runtime lost context across multi-step AI-driven user interactions.

Solution: Our Redis developers built persistent session memory on Redis Streams. Agents keep conversational and behavioral context from one step to the next.

Challenge 4: Scaling the runtime with lead volume

The agent runtime had to scale efficiently as lead volumes kept growing.

Solution: Our team built a containerized microservices architecture on AWS. Agent workloads scale horizontally based on lead demand.

Agent workflow

How the lead gen agent runtime works

Each lead moves from real-time ingestion to a deterministic decision, with Redis holding state and memory at every step.

  1. The client's AI agent system
    1. Ingest
      Real-time lead intakeLow-latency data pipelines
    2. Remember
      Session memoryRedis Streams context
    3. Decide
      Deterministic engineRedis-backed agent state
    4. Act
      Real-time lead scoringFaster qualification
      Automated lead routingLeads sent to the right workflow
    5. Scale
      Containerized servicesHorizontal scaling on AWS

State held in Redis makes every agent decision reproducible and auditable.

How the Platform Works

The client deterministic AI agent runtime for lead generation

Core Features

  • Deterministic agent runtimeConsistent, reproducible agent decisions across lead workflows.
  • Redis-based agent memorySession context kept across multi-step interactions with Redis Streams.
  • Real-time lead scoringLeads ingested and scored as they arrive, with low latency.
  • Automated lead routingQualified leads routed to the right workflow without manual triage.
  • Scalable microservicesContainerized services scale out as campaign demand grows.

The stack behind the agent runtime

Frontend
React
Backend
Python | FastAPI
Database
PostgreSQL
In-memory data store
Redis | Redis Streams
Cloud and DevOps
AWS | Containers
Architecture
Microservices | REST APIs

Ready to start?

2500+ projects delivered by Bacancy Technology

Get access to an experienced team of developers and engineers from Bacancy Technology, handpicked to ace your goals. Kickstart within 48 hours, no-risk trial.

Book A 30 Min Call
14+Years of business experience
1458+Happy customers
30+Countries with happy customers
1050+Agile-enabled employees

More Case Studies

View All Case Studies