Skip to content
All case studies
AIConsumer AI

Building a Companion App on Amazon Bedrock

A consumer AI companion app moved its model calls to Amazon Bedrock on Amazon Web Services (AWS). Model cost per 1,000 calls fell 39% with prompt caching, 99.4% of calls succeed, and every Amazon Bedrock reply passes one safety policy.

ClientConsumer AI startup, Lagos
DurationLive in production
RegionAmazon Web Services (AWS), us-east-1
CategoryAI
Consumer AI companionConsumer AI
-39%Model cost per 1,000 calls with prompt caching
59%Input tokens served from the prompt cache
2,000+Conversations a month on Amazon Bedrock
99.4%Amazon Bedrock call success
THE PROBLEM

The problem.

Our client's app is an AI companion that people talk to the way they would talk to a friend: by text, by voice note and in live calls. Its replies came from Claude through a prepaid third-party API, and its only safety net was a fixed list of ten emergency phrases. There was no prompt caching to cut the cost of long conversations and no audit trail of what the model was asked.

The app ran on a single server, so one failure took everything down. When the prepaid balance ran out, calls failed at close to 900 an hour and users stopped getting replies. And no single policy kept the model from giving medical or other unsafe advice to someone in a difficult moment. For a companion, that mattered most.

THE APPROACH

What we built.

01

Replies on Amazon Bedrock

We moved the app into its own Amazon Web Services (AWS) account and rebuilt it around Amazon Bedrock. Chat, voice-note, report and proactive replies come from Claude Haiku 4.5 with cross-Region inference for capacity, reached over an interface endpoint in Amazon Virtual Private Cloud (Amazon VPC), so these replies never cross the public internet on their way to the model. The optional live speech-to-speech route uses a separate provider.

02

A guardrail written for a companion

We wrote an Amazon Bedrock Guardrails policy for this product. It refuses medical diagnosis and other unsafe advice, filters harmful content and attempts to override its instructions, and blocks or masks personal data. It is attached to every Amazon Bedrock call, so one policy covers every reply Amazon Bedrock writes.

03

Cheaper long conversations

A companion sends recent history with every message, so we turned on Amazon Bedrock prompt caching. 59% of input tokens are now served from the cache at a tenth of the normal price, and model invocation logging gives the team a full audit trail.

04

A managed service that runs itself

The API and voice service run on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate and auto scaling, behind Amazon CloudFront and AWS WAF, with Amazon Relational Database Service (Amazon RDS) for PostgreSQL and Amazon ElastiCache. Every component has an Amazon CloudWatch metric, an alarm and a runbook, and every change to the AWS resources goes through an AWS CloudFormation change set. We run it as a managed service.

STACK

AWS services in this engagement

Amazon BedrockClaude Haiku 4.5Amazon Bedrock GuardrailsPrompt cachingAmazon ECS on AWS FargateAmazon RDS for PostgreSQLAmazon ElastiCacheAmazon CloudFront + AWS WAF
THE OUTCOME

The results.

Prompt caching cut model cost from US$7.75 to US$4.70 per 1,000 calls on the same traffic, 39% less. The app serves more than 2,000 conversations a month on Amazon Bedrock, 99.4% of Amazon Bedrock calls succeeded after we fixed the model names, and model cost landed within 5% of plan. The company also reports retention up 50% and the cost of maintaining its keyword rules down 20% since the move.

LESSONS LEARNED

What we learned.

Moving model providers is never only a configuration change. After the switch, some code paths still sent model names the new service did not recognise, and we caught it from the logs within two days. Model names are now set in one place with a regression test, and an alarm fires on the first rejected call. We also size containers from real production load before every cutover.

THE PARTNER

About Manthic.

Manthic Technologies is an AWS Advanced Tier Services Partner based in Lagos, Nigeria. We design, build and run generative AI products on AWS for our clients.

WANT SOMETHING SIMILAR?

Tell us what you're trying to ship.

A 30-minute scoping call with the engineers who would do the work.