
From Customer Conversations to Service Jobs: Building KaamSetu with AWS
KaamSetu turns unstructured customer conversations into structured service jobs while preserving customer, appliance, and service history. This article explains how I built the system using Amazon Bedrock, Nova Lite, AWS Lambda, API Gateway, DynamoDB, CloudWatch, IAM, and AWS SAM.
From Customer Conversations to Service Jobs: Building KaamSetu with AWS
The problem
Small local service businesses often run on conversations.
A customer doesn't usually submit a structured service ticket saying:
- Customer ID: 1042
- Appliance: LG Split AC
- Problem: Not cooling
- Preferred time: Tomorrow after 5 PM
Instead, they send something like:
"Bhaiya LG AC phir se thanda nahi kar raha. Kal 5 ke baad aa sakte ho?"
The owner has to understand the message, identify the customer, figure out which appliance they mean, remember what happened during previous visits, and manually turn the conversation into a job.
When a customer owns multiple appliances, the problem becomes even harder. A message saying "AC thanda nahi kar raha" may refer to either of two air conditioners.
KaamSetu was built around this gap.
Its core idea is simple:
Conversation → Work → Service Memory
What is KaamSetu?
KaamSetu is a service management platform designed for small local service businesses such as AC and appliance repair businesses, electricians, plumbers, water-purifier technicians, and other field-service teams.
Instead of starting with a form, KaamSetu starts with the customer's own words.
The system:
- Accepts a natural-language service request.
- Uses AI to extract structured information.
- Resolves the customer and appliance using deterministic application logic.
- Retrieves the appliance's previous service history.
- Creates a structured service job when the request is sufficiently resolved.
- Allows a technician to be assigned and the job to progress through its lifecycle.
- Records completed work as a new Service Event.
- Makes that history available the next time the appliance needs service.
The goal is not to replace the conversation.
The goal is to turn that conversation into useful operational data.
Why I designed it this way
One of the most important architectural decisions in KaamSetu is separating what the customer actually said from what the AI thinks it means.
There are four distinct layers:
Layer | Purpose |
|---|---|
Customer words | Preserve the original request exactly |
AI interpretation | Extract structured information from the request |
Operational state | Customer, appliance, job and technician records |
Service Memory | Recorded work performed on a specific appliance |
This creates an important boundary:
The model proposes. The application decides.
The AI can understand language, but it does not get to decide which database record should be modified or whether a job should transition to a new state.
Those decisions are handled by deterministic application code.
AI-powered intake with Amazon Bedrock
The AI intake is implemented using Amazon Bedrock and Amazon Nova Lite.
A customer message is sent to the model with a schema-constrained extraction task.
The model can extract information such as:
- service intent
- appliance type
- brand and model
- reported problem
- symptoms
- urgency
- preferred date and time
- confidence
- missing information
- provenance of extracted values
The extraction schema is defined explicitly rather than accepting arbitrary model output.
The application then validates the result before using it.
For example, if the customer does not mention a model number, the system does not invent one.
Unknown information remains unknown.
This distinction is important because a service-management system cannot afford to turn an AI guess into operational truth.
Deterministic customer and appliance resolution
The AI may understand that a message is about an LG air conditioner, but it does not select the database record itself.
Customer resolution happens through application rules.
For example, a phone number that matches exactly one customer can be used as evidence for that customer.
A name alone is not enough to silently select a record.
The same principle applies to appliances.
An appliance is resolved only among the appliances belonging to the identified customer.
If a customer has one AC and the request clearly refers to an AC, the system can resolve it.
If the customer has two ACs and simply says:
"AC thanda nahi kar raha"
KaamSetu does not guess.
Instead, the request enters a human review flow where the person chooses the correct appliance.
This is one of the core design principles of the project:
When the system is uncertain, it asks instead of inventing.
Service Memory
One of the main ideas behind KaamSetu is that service history belongs to the appliance.
Consider a customer who owns:
- an LG AC
- a Samsung AC
- a refrigerator
- a water purifier
The history of these assets should not be mixed together.
KaamSetu therefore associates Service Events with individual assets.
For example, an LG AC might have:
- Annual service
- Gas refill
- Follow-up visit
When a new request arrives for that AC, the previous service history is immediately available.
After a job is completed, the completed work becomes another Service Event.
This creates a simple feedback loop:
New request → Service Memory → Job → Completion → Updated Service Memory
The system gets more useful as service work is recorded.
Safety handling
Another important part of the system is safety-related wording.
Customer messages can contain signals such as:
- sparks
- burning smell
- smoke
- electric shock
- fire
- short circuit
- exposed wiring
- gas smell
- melting
These signals are detected using deterministic application rules rather than relying entirely on the language model.
A request can therefore be raised to
safety_critical independently of the model's interpretation.The customer's original wording is preserved and displayed prominently.
KaamSetu deliberately does not attempt to diagnose the appliance or provide repair instructions.
The system's role is to surface the reported safety signal, not to pretend to be a technician.
The Architecture
The deployed architecture looks like this:
Browser → Vercel → Amazon API Gateway → AWS Lambda → DynamoDB / Amazon Bedrock
The frontend is implemented using Next.js, React, TypeScript and Tailwind CSS.
The frontend communicates with the backend through server-side requests, keeping the demo API credential away from the browser.
The backend is implemented using Python and FastAPI.
FastAPI is packaged for AWS Lambda using Mangum.
The main AWS components are:
Amazon API Gateway
API Gateway provides the HTTP entry point for the deployed backend.
It exposes the application's versioned API and provides throttling at the API layer.
AWS Lambda
Lambda runs the FastAPI application without requiring a continuously running server.
The same application can also run locally under Uvicorn.
Amazon DynamoDB
DynamoDB is the deployed source of truth for the application's operational data.
It stores entities such as:
- customers
- appliances
- technicians
- service requests
- jobs
- service events
- audit records
The data model uses a single-table approach with secondary indexes for the application's access patterns.
Amazon Bedrock
Amazon Bedrock provides access to the AI model used for service intake.
KaamSetu currently uses Amazon Nova Lite for structured extraction.
Amazon CloudWatch
CloudWatch provides Lambda logging and helped validate the deployed application during development and testing.
It was particularly useful for observing API requests, Lambda execution and Bedrock latency.
AWS IAM
IAM is used to restrict the Lambda execution role to the resources required by the application.
The deployed backend does not need unrestricted AWS permissions.
AWS SAM
AWS SAM is used to define and deploy the serverless backend infrastructure through CloudFormation.
This keeps the deployment reproducible rather than relying on manually configured AWS resources.
Running the same application locally
One of the goals of KaamSetu was to keep the application portable.
The backend has a repository abstraction that separates business logic from persistence.
For local development, the application can run with:
- an in-memory data provider, or
- DynamoDB Local
The same FastAPI application can therefore run locally or on AWS Lambda.
DynamoDB Local can also be populated with a deterministic demo dataset containing fictional customers, appliances, service requests, jobs and service history.
This made it possible to develop and test the application without requiring AWS for every local development cycle.
The technician workflow
Once a service request is resolved, KaamSetu creates a structured job.
Jobs move through an explicit lifecycle:
NEW → ASSIGNED → SCHEDULED → ON_THE_WAY → IN_PROGRESS → COMPLETED A job can also be cancelled before completion.
The backend enforces the state machine rather than relying only on frontend controls.
When a job is completed, the system records the work as a Service Event and updates the appliance's Service Memory.
This means the operational workflow and historical memory remain connected.
Human-in-the-loop design
I deliberately avoided making the system fully autonomous.
There are several cases where KaamSetu stops and asks for human confirmation:
- ambiguous customer
- new customer
- ambiguous appliance
- new appliance
- insufficient information
- low-confidence extraction
- unavailable AI model
This makes the AI useful without giving it unrestricted control over operational records.
For a system dealing with real customers and physical equipment, this distinction is important.
Testing and validation
The project was tested across the backend and frontend.
The backend includes a large automated test suite covering domain rules, repository behaviour, API behaviour, AI extraction, safety handling, idempotency and seeded data.
The frontend includes tests for application logic, along with TypeScript type checking, linting and production builds.
The deployed application was also tested end-to-end through the actual AWS stack.
The demo dataset is deterministic and idempotent, which makes it possible to repeatedly reproduce the same scenarios during development and demonstrations.
What I learned
The biggest lesson from building KaamSetu was that adding an LLM to an application is not the same as making the application intelligent.
The important engineering work happens around the model.
The model is good at understanding language.
The application must still be responsible for:
- identity
- validation
- persistence
- authorization
- state transitions
- idempotency
- safety rules
- auditability
This led to the architectural principle I kept returning to throughout the project:
AI handles language. Deterministic code handles business truth.
Working with AWS also gave me practical experience in connecting several managed services into a complete deployed system rather than treating each service independently.
Future directions
KaamSetu's current version focuses on proving the core workflow.
The next planned additions include:
- voice-based intake
- richer multilingual support
- WhatsApp integration
- persistent photo and attachment storage
- semantic search across Service Memory
- real authentication and role-based access
- smarter technician recommendations
- customer portal
- recurring service reminders
- analytics and reporting
- route planning
- a proper evaluation dataset and accuracy benchmarks
- local and open-source model support
The longer-term goal is to evolve KaamSetu from a system that turns conversations into jobs into an intelligent operating layer for small service businesses.
Conclusion
KaamSetu started with a simple observation:
Local service businesses already have the conversations. What they lack is the structure and memory around those conversations.
By combining AI-based language understanding with deterministic application logic and AWS serverless services, KaamSetu turns an unstructured customer message into a structured service workflow while preserving the history of the physical asset being serviced.
The project is currently deployed with a Next.js frontend and an AWS backend using API Gateway, Lambda, DynamoDB, Bedrock, CloudWatch and IAM.
The core idea remains simple:
Conversation → Work → Service Memory.
And that is KaamSetu.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article